long table captions

2,774 views
Skip to first unread message

Neologist

unread,
Mar 19, 2008, 2:36:24 PM3/19/08
to LaTeX Users Group
I have two tables rendered inside tabular environments that have very
long captions. If I introduce \\ line breaks in the caption, LaTeX
doesn't like it. If I use \caption*{...} instead of \caption{...}, It
builds, but there are two other consequences:

(1) The asterisk itself appears along with the caption text, e.g.:

Table 8: *
Blah blah blah ... all the caption text

And yes, there is a line break after the asterisk.

(2) In my List of Tables section at the front, the text does not
appear,
only an asterisk:

7 Proper Caption Title . . . . . . . . 14
8 * . . . . . . . . . . . . . . . . . 17
9 * . . . . . . . . . . . . . . . . . 18

Does someone know why or what can be done?

Werner Grundlingh

unread,
Mar 19, 2008, 2:42:28 PM3/19/08
to LaTeX Users Group
If you're only interested in putting a line break after the caption
label (Table ?:, in this case), consider using the caption package. It
allows for ample customizing of your caption needs. Available online
via CTAN from
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=caption
More specifically, if my assumption above is correct, you would be
interested in the 'newline' option the package provides:
"The caption label and text will be separated by a line break (\\)."
as quoted from the package documentation (see page 6). Give some
feedback on what you find works, or does not.

Werner

Neologist

unread,
Mar 19, 2008, 3:14:27 PM3/19/08
to LaTeX Users Group
Thank you for the quick response. My comments are inserted below.

> > I have two tables rendered inside tabular environments that have
> > very long captions. If I introduce \\ line breaks in the caption,
> > LaTeX doesn't like it. ...

> If you're only interested in putting a line break after the caption
> label ...

No, the problem is that I need to introduce line breaks within the
caption, e.g.,

\caption{This is a very long\\ caption that needs\\ to appear on\\
four lines}

However ...

> More specifically, if my assumption above is correct, you would be
> interested in the 'newline' option the package provides:

Yes, I found that \caption{text\newline...} does the
trick, and also causes the label to appear in the List
of Tables, properly line broken.

However, it introduces another problem, in that now it
appears flush left. The source goes:

\begin{center}
\begin{table}
\begin{tabular}
... all the tabular text ...
\caption{Blah blah\newline blah blah ...}
\end{tabular}
\end{table}
\end{center}

and that way the caption text appears flush left, not
centered.

I'm experimenting some more ...

Thank you.

--
Lynn Newton
Columbus, Ohio

Neologist

unread,
Mar 19, 2008, 3:40:26 PM3/19/08
to LaTeX Users Group
Problem solved. The caption package is exactly what I needed:

\usepackage[justification=centering]{caption}[2007/12/23]

followed by

\caption{whatever text\newline goes here}

works perfectly. Thank you very much for that clue.

--
Lynn Newton
Columbus Ohio

Kaveh

unread,
Mar 27, 2008, 7:18:42 PM3/27/08
to LaTeX Users Group
Thanks, That helped me too.

Kaveh

jrothim

unread,
Mar 28, 2008, 6:13:20 PM3/28/08
to LaTeX Users Group
Regarding the List of Tables issue, in case it is not obvious and
already mentioned, you can define an abridged caption to be used
there:

\caption[This abridged caption appears in LoT.]{This full caption
appears adjacent to table and you can make it really long without
creating LoT issues.}

The same principle also applies to \section[]() and other similar
heading commands.

Jeff
Reply all
Reply to author
Forward
0 new messages