Alex Rivera | Logout

Caption in longtable

Asked 2010-04-21T19:39:10.323
15

I find that the caption in my longtable takes two lines but it seems that it can fit in one line. See the figure below: alt text

My code is:

\begin{longtable}{|c|c|c|c||c|c|c|}  
\caption{Testing error for training size 100000 and 8000 random counts}\\  
\hline  
\multicolumn{2}{|c|}{Concept} & \multicolumn{2}{c||}{Negative Class} & \multicolumn{2}{c|}{Positive Class} & Error rate \\  
\hline  
...  
\end{longtable}

How to make the caption fit into a single line?


EDIT:

Thank, Geoff. But I tried "\usepackage{fullpage}" as you suggested, the whole content in the pdf file is messed up.

As you can see, there is still lot of space on the left of the caption. If the caption can be moved to the left, it will fit into a single line.

Edit
Report

3 Answers

22

You can do this:

\LTcapwidth=\textwidth

\begin{longtable}
answered 2010-08-19T18:07:05.547
1

My guess is that your table is wider than the page. In other words, your caption is as wide as the margins allow, while your table is simply too wide.

Try putting \usepackage{fullpage} in your preamble.

answered 2010-04-21T21:00:40.083
0

Just a guess, but try:

\usepackage[margin=1cm]{caption}
answered 2010-04-23T14:42:41.347

Your Answer