I am attempting to use longtables since my table will span several pages. The problem I have now is that the captions are floating over top of the table making it difficult to read the table. I want the caption below the table for each page it is on, but am not sure how to accomplish that.

\textbf{field} & \textbf{value}
\\ \hline
website & http://www.funtoo.org \\ \hline
\caption{Funtoo Details}
\label{Funtoo Details}
  • Obviously, this is not the table that has too many rows in it, but just serves as an example of the problem. – Walter Jul 15 '16 at 3:17
  • 2
    Please make your code snippet compilable! Inside longtable you do not need tabular, please check the documentation with texdoc longtable ... Welcome to TeX.SE! – Mensch Jul 15 '16 at 3:45

Do take some time to master the structure (and syntax) of longtable environments:

  • Don't use tabular environments inside a longtable environment. Really: don't do it.
  • Don't use center environments inside a longtable environment -- it's automatically centered (assuming it's not wider than \linewidth by design or accident...)
  • The full width of your tabular is not \linewidth but \linewidth + 4\tabcolsep + 3\arrayrulewidth. That's not the intention, is it?
  • A longtable doesn't float -- the [H] positioning specifier doesn't do anything at all (other than clutter up the code)

The following may be a useful starting point for further refinements. Note how (a) I've separated out the header, the footer, and the body of the longtable and (b) provided calculations for the usable widths of the two columns.


%% define the header 
\textbf{field} & \textbf{value}\\ 
%% define the footer
\multicolumn{1}{c}{}\\ % blank line
\caption{Funtoo Details}
\label{Funtoo Details}
%% body of table
website & \url{http://www.funtoo.org} \\ 
website & \url{http://www.funtoo.org} \\ 
website & \url{http://www.funtoo.org} \\ 
website & \url{http://www.funtoo.org} \\ 
website & \url{http://www.funtoo.org} \\ 
| improve this answer | |
  • Thanks, that worked. I had all of those things because I converted directly from my table usage. Now, I'd like to re-add the colors I had, but that is a minor detail. – Walter Jul 15 '16 at 10:37
  • I re-added the colors, so that worked perfectly for me. – Walter Jul 16 '16 at 2:02

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.