4

I am using \longtable to split tables into two parts which are displayed on two pages in a double page layout. I do not let longtable break the table, but instead use \newpage on a line where it makes sense

My "normal" tables are centered vertically on the page. In contrast, the longtable parts begin at the upper margin so that there is some space left under them.

I would like to add space before the table (including the caption) and before the second part of the table. Preferably, I would be able to add vertical space before both parts in a way that their respective \toprules align horizontally.

1 Answer 1

3

If you want to keep the top rules aligned you probably want to add a fixed space rather than centre each half individually (unless your table is very regular and you know all lines are the same height and you have the same horizontal rules etc)

\documentclass[twoside]{article}

\usepackage{longtable}

\begin{document}

\clearpage
\begin{longtable}{cccc}
\noalign{\vspace{7cm}}
\caption{...}\\
A&B&C&D\endfirsthead
\noalign{\vspace{7cm}}
\caption*{... continued}\\
A&B&C&D\endhead
1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\
1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\
1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\
1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\
1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\
1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\
1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\
1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\1&2&3&4\\
\end{longtable}

\end{document}

enter image description here

3
  • using \noalign{\vspace{...}} does not do anything in my case. When I use \vspace{} without \noalign{}, it moves the table, but the distance between caption and table is altered (it's greater than it is supposed to be).
    – user21932
    Oct 8, 2013 at 13:13
  • @user21932 "does not do anything" isn't very descriptive. This is why you should always include a complete document in your question that people can modify in the answers. See my update for a document where vspace is adding space. Oct 8, 2013 at 13:38
  • mea culpa! Sorry for a) not providing an example b) not correctly implementing your example. I misunderstood/-used the \endfirsthead/\endhead syntax which resulted in the vertical space not being added. Now, that I did, everything works as suggested. Sorry again and thank you for your help!
    – user21932
    Oct 8, 2013 at 15:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .