1. Vedran Miletić
  2. beamer
Issue #303 wontfix

Linefeed with \\\\ in caption does not work anymore

Anonymous created an issue

When using \\ for a linefeed in a figure caption, LaTeX crashes with

! LaTeX Error: Something's wrong--perhaps a missing \item.

This used to work in earlier versions of Beamer. Now, \newline must be used instead.

A MWE is

\documentclass{beamer}
\usepackage{graphicx}

\begin{document}

\begin{frame}{text}
\begin{figure}
  \includegraphics[scale=0.4]{test.pdf}
 \caption{Some Text\\
 Some Text}
\end{figure}
\end{frame}

\end{document}

Comments (1)

  1. Joseph Wright

    beamer sets captions using \raggedright assuming the default template. You see the same error if you try to use \\ inside a \caption where \raggedright is active with say the article class. As such, this is 'one of those things'.

  2. Log in to comment