# LaTex: Large gap in Tabular 'longtable' between content and 'subsubheading'

I'm working on my CV and I have a spacing issues when I use longtable. I noticed that using \justifying instead of \justify give better spacing between the body and a header, however this does not seem to work with longtable. I did find another question regarding this problem, however their answer did solve my problem. Maybe did I do it wrong or is this not even that?

\documentclass[a4paper,10.5pt]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{garamondx}
\usepackage{ragged2e}
\usepackage{blindtext}

%tabular
\usepackage{longtable}
\ProvidesPackage{longtable}
[2004/02/01 v4.11 Multi-page Table package (DPC) + strut fix]
%reverse row count
\newcounter{rowcount}
\setcounter{rowcount}{0}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{array}
\usepackage{refcount}
\makeatletter
\newcommand{\fakelabel}[1]{%
\protected@xdef\@currentlabel{#1}%
}
\makeatother
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{N}[2]{>{\raggedleft\refstepcounter{rowcount}\fakelabel{\therowcount}\makebox[3em][r]{\color{black}\the\numexpr\getrefnumber{#1}+1 - \value{rowcount}.)}\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#2}}

\begin{document}

\subsubsection*{Compendium}
{\setlength{\extrarowheight}{5pt}%
\begin{longtable}{ N{compendium}{1cm} L{15.5cm}}
& \justifying Etch Protocols for UW-Stout’s Plasma Reactor, Original Research, UW-Stout, Menomonie, WI. Advances in printed circuit board technology reduce footprint and increase computing power. A greater number of electrical connections between more layers of printed circuit board (PCB) creates complexity, particularly during plasma etching for circuits with high aspect ratios. This research has determined the effects of radio frequency, reactant ratios, and temperature on the etching of pre-impregnated epoxy resins using UW Stout's plasma reactors. Engineering concept design was incorporated to retrofit the plasma reactor to allow for three gases over two. Advanced Physics Capstone. Advisor: Dr. Marlann Patterson. Research, June 2016 – May 2017.
\tabularnewline
& \justifying Electro-Optical Composite Synthesis for Volume Holography, Assigned Research, UW-Stout, Menomonie, WI. Process improvement (development) of a nanostructure material capable of being synthesized utilizing at UW-Stout. Synthesis of the photorefractive polymer 2,5-dimethyl-4-(p-nitrophenylazo) benzyl ether required a revise synthesis and stoichiometric analysis to derive starting materials and quotients. The purpose of this project was for the student to dive into an unfamiliar concept and bring it as far as the semester allowed. Advisor: Dr. Marlann Patterson. Project, Spring 2017.
%\caption{Academics Table} % needs to go inside longtable environment
\label{tab:myfirstlongtable}
\end{longtable}
\ref{tab:myfirstlongtable}
\label{compendium}}

\end{document}

• You can use for example \vspace{-\baselineskip} after \subsubsection*{Compendium}. Just a dirty hack ... – Mensch Mar 16 '18 at 4:59
• Hack received and applied. Thank you! That little bit makes all the difference in the appearance! – Matthew Olson Mar 16 '18 at 5:13

• For example the 10.5pt in line \documentclass[a4paper,10.5pt]{article} is not used. You can use 10pt, 11pt or 12pt ...
• The current version of longtable is longtable.sty 2014/10/28 v4.11 Multi-page Table package (DPC) so you need not your lines

\ProvidesPackage{longtable}
%[2004/02/01 v4.11 Multi-page Table package (DPC) + strut fix]


in your code. BTW the line is wrong in your preamble. Just delete it.

• I used package showframe to visualize the typing area and margins.

• I changed the length of the second column in your table like:

\begin{longtable}{ N{compendium}{1cm} L{10.5cm}} % L{15.5cm} <==========

• To get a smalller distance between the text of command \subsubsection*{Compendium} and the longtable you can use command \vspace{-\baselineskip} like:

\subsubsection*{Compendium}
\vspace{-\baselineskip} % <=============================================


With the complete MWE

\documentclass[%
a4paper,
% 10.5pt % <============================================================
]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}

%\usepackage{garamondx}
\usepackage{ragged2e}
\usepackage{blindtext}
\usepackage{showframe} % <==============================================

%tabular
\usepackage{longtable}
%\ProvidesPackage{longtable}
%[2004/02/01 v4.11 Multi-page Table package (DPC) + strut fix]
%reverse row count
\newcounter{rowcount}
\setcounter{rowcount}{0}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{array}
\usepackage{refcount}

\makeatletter
\newcommand{\fakelabel}[1]{%
\protected@xdef\@currentlabel{#1}%
}
\makeatother

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{N}[2]{>{\raggedleft\refstepcounter{rowcount}\fakelabel{\therowcount}\makebox[3em][r]{\color{black}\the\numexpr\getrefnumber{#1}+1 - \value{rowcount}.)}\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#2}}

\begin{document}

\subsubsection*{Compendium}
\vspace{-\baselineskip} % <=============================================
{\setlength{\extrarowheight}{5pt}%
\begin{longtable}{ N{compendium}{1cm} L{10.5cm}} % L{15.5cm} <==========
& \justifying Etch Protocols for UW-Stout’s Plasma Reactor, Original
Research, UW-Stout, Menomonie, WI. Advances in printed circuit board
technology reduce footprint and increase computing power. A greater
number of electrical connections between more layers of printed
circuit board (PCB) creates complexity, particularly during plasma
etching for circuits with high aspect ratios. This research has
determined the effects of radio frequency, reactant ratios, and
temperature on the etching of pre-impregnated epoxy resins using UW
Stout's plasma reactors. Engineering concept design was incorporated
to retrofit the plasma reactor to allow for three gases over two.
June 2016 -– May 2017.
\tabularnewline
& \justifying Electro-Optical Composite Synthesis for Volume Holography, Assigned Research, UW-Stout, Menomonie, WI. Process improvement (development) of a nanostructure material capable of being synthesized utilizing at UW-Stout. Synthesis of the photorefractive polymer 2,5-dimethyl-4-(p-nitrophenylazo) benzyl ether required a revise synthesis and stoichiometric analysis to derive starting materials and quotients. The purpose of this project was for the student to dive into an unfamiliar concept and bring it as far as the semester allowed. Advisor: Dr. Marlann Patterson. Project, Spring 2017.
%\caption{Academics Table} % needs to go inside longtable environment
\label{tab:myfirstlongtable}
\end{longtable}
text \ref{tab:myfirstlongtable} text
\label{compendium}%
}
text \ref{tab:myfirstlongtable} text
text \ref{compendium} text

\end{document}


you get the result:

• Thanks for the help. I realize my code is not so great but my professor insists on me learning this better, so I am. I'm a chemist not a physicists, and my HTML is 20 years old now (truly BBEdit was a god when I created web site), so my coding is more like cooking spaghetti -- throw it at something as see if it sticks. Your help is really appreciated. I wouldn't have ever tried to test the code like you did. Something to write a note about for sure! And I did test the fortsize and it didn't look like 0.5 did anything, but it didn't error out and it fit in my margins...Thank you again!! – Matthew Olson Mar 16 '18 at 5:51
• @MatthewOlson You are welcome! (BTW:10.5pt throws a warning: global value 10.5pt not used. It is always a good idea to check the *.log file for errors and warnings ;-) – Mensch Mar 16 '18 at 5:59