0

I need to have a table with multi-line caption, like here:

\documentclass{report}
\usepackage{caption}
\begin{document}
abc
\listoftables

\newpage
\begin{table}
--- contents ---
{
\protect\caption{
    Summary of results.
    \\
    All results assume that there are at least two agents.
}
}
\end{table}

\end{document}          

The table indeed is shown with multi-line caption, but, all lines also appear in the list-of-tables.

Is there a way to tell the listoftables command to only show the first line of the caption?

2
  • 2
    \caption[short caption]{long caption} Nov 23, 2016 at 14:32
  • also \protect does nothing in front of \caption Nov 23, 2016 at 14:34

1 Answer 1

1

If you don't mind repeating the text then John Kormylo's comment should solve your issue.

If you do mind having to repeat it, a quick workaround is to define seperately your first line and then add the remainig lines in the caption command:

\begin{table}
--- contents ---
{
\def\captitle{Summary of results.}
\protect\caption[\captitle]{
    \captitle\\
    All results assume that there are at least two agents.
}
}
\end{table}

You must log in to answer this question.

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