I want to create a table exactly occupying the whole printed area with no space left. The table consists of 5 rows per page, as follows.






& \parbox[c][0.2\dimexpr\textheight-6\arrayrulewidth-\topskip\relax][c]{\linewidth}{\centering #1 \par \vspace{15pt} \textcolor{red}{#2}}


\row[RAM]{Random Access Memory}
\row[BIOS]{Basic Input Output System}
\row[OMG]{Oh My Ghost}
\row[PS]{Post Script}
\row[BJT]{Bipolar Junction Transistor}
\row[DEK]{Donut E. Knot}
\row[CPP]{C Plus Plus}

enter image description here

Problem and Question

The output has an unwanted white space above the table. It is probably caused by my wrong expression


Shortly speaking, how to fix it? What is the correct expression?


The algorithm of setting \topskip is applied twice by package longtable. Its output routine takes the material from the current vertical list including \topskip in a box and reinserts it to the now empty vertical list triggering the \topskip setting again. Usually nothing is inserted in the latter case, because the height of the re-inserted box is usually \topskip (because of the former \topskip setting). Thus the contribution of the outer \topskip is 0pt then.

The duplicate \topskip setting complicates counteractions.

Variant a)

\null % = \hbox{}, triggers full \topskip
\vskip-\topskip % remove \topskip
\vskip-\LTpre %
% \LTpre would be dropped at the start of a fresh page, but
% there is already material (empty box)

And the calculation is done without \topskip:


Also the table should be large enough, to overcompensate the negative spaces. Otherwise the outer \tabskip could become effective.

Variant b)

This sets the value of \topskip to zero temporarily (then \topskip does not matter in the calculation):


The result in both cases:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.