0

I am using the \longtable environment, and this is the code:

begin{center}
\scriptsize
 \begin{longtable}{|p{2cm}|p{4cm}|p{8cm}|}\hline\hline
 \multicolumn{1}{|p{2cm}|}{\textbf{Text1}} &
 \multicolumn{1}{p{4cm}|}{\textbf{Text2}} &
 \multicolumn{1}{p{8cm}|}{\textbf{Text3}}\\ \hline 
\endfirsthead

\multicolumn{3}{p{3cm}}
{{\bfseries \tablename\ \thetable{} -- continued from previous page}}\\ 
 \hline\multicolumn{1}{|p{2cm}|}{\textbf{Text1}} &
 \multicolumn{1}{p{4cm}|}{\textbf{Text2}} &
 \multicolumn{1}{p{8cm}|}{\textbf{Text3}}\\\hline 
\endhead

\hline \multicolumn{3}{|r|}{{Continued on next page}} \\ \hline
\caption[Caption]{Caption}\label{label-caption} 
\endfoot
\caption[Caption]{Caption}\label{label-caption} 
\endlastfoot

\end{longtable}
\end{center}

All captions appear at the bottom of each part of the table, which is the result I wanted. However, there is a quite annoying wrinkle: only the caption at the bottom of the last part of the table is too close to the table border, and I cannot figure out how to control the spacing within \longtable. Any advice is more than welcome! Thanks. I.

Marc B
  • 356,200
  • 43
  • 426
  • 500
panza
  • 1,341
  • 7
  • 38
  • 68
  • Note that there’s a Stack Exchange site devoted to TeX and LaTeX: http://tex.stackexchange.com –  Jun 06 '11 at 23:24
  • This is now duplicated at http://tex.stackexchange.com/questions/20275/longtables-and-caption-spacing-problem. I think we can close it now here. – Paŭlo Ebermann Sep 15 '11 at 09:55
  • @Bavarious: In future, please flag such questions for migration instead of instigating an asker to ask the question again on the other side. We don't want cross-site exact duplicates. – Paŭlo Ebermann Sep 15 '11 at 09:57
  • @Paŭlo But there’s [no consensus that LaTeX questions should be migrated](http://meta.stackexchange.com/questions/12918/can-we-have-a-ruling-on-latex-on-stack-overflow/12926#12926), right? I had no intention of instigating the OP, just pointing out that there’s an alternative SE site. –  Sep 15 '11 at 10:23
  • They are still on topic here, and we don't migrate old questions. But we certainly want to avoid new duplicates between both sites, which does not help people searching the questions (and the answers to them). ("Instigate" might not be the right word here ... what I meant is that your comment lead to the creation of a duplicate.) – Paŭlo Ebermann Sep 15 '11 at 10:33

1 Answers1

0

You can control the caption placement by enabling the use of the "caption" package and then adjusting the skip between the table and the caption. To do this for the entire document you can use the following code in the preamble:

\usepackage{caption}
\setlength{\belowcaptionskip}{\baselineskip}
Compholio
  • 733
  • 1
  • 9
  • 17