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
    \caption[short caption]{long caption} – John Kormylo Nov 23 '16 at 14:32
  • also \protect does nothing in front of \caption – David Carlisle Nov 23 '16 at 14:34
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}

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.