3

I'm fighting with Google. I have a longtable with manual breaks, so in every page there is an empty space after the table, I want to vertically center the longtable. How can I do that?

2
  • 2
    you'll never win a battle with google -- they've got the nsa on their side... Jul 17, 2013 at 20:20
  • good question, answer wasn't totally obvious even if I have seen longtable before:-) Jul 17, 2013 at 20:35

1 Answer 1

5

enter image description here

It is possible that the longtable documentation doesn't mention this, but you can use:

\documentclass{article}
\usepackage{longtable}

\begin{document}



{
\makeatletter
\def\@textbottom{\vskip0pt plus 1fill}
\let\@texttop\@textbottom
\makeatother

\begin{longtable}{cc}
HHH&HHH
\endhead
FFF&FFF
\endfoot
a111&b\\a&b\\a&b\\a&b\\a&b\\a&b\\
\pagebreak
a222&b\\a&b\\a&b\\a&b\\a&b\\a&b\\a&b\\a&b\\a&b\\
\pagebreak
a333&b\\a&b\\a&b\\a&b\\a&b\\a&b\\
\pagebreak
a444&b\\a&b\\a&b\\a&b\\a&b\\a&b\\
\end{longtable}
\clearpage
}

normal text

\end{document}
1
  • That solved the problem
    – migueleon
    Jul 17, 2013 at 20:41

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.