0

I know about this question and this one but the problem I am having does not relate to section headings, and I am not using itemize or enumerate. So they don’t help me. As in the question title, the error message (using pdflatex) is

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

It's a latex beamer doc;

\documentclass{beamer}

\usepackage{graphicx}
\usepackage{caption}
\usepackage{color}
\usepackage{amsmath}

\mode<presentation>
{    
  \usecolortheme{default} 
  \usefonttheme{default}  
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
} 


\title[Such a title]{Title}
\author{Ron Weasley}
\institute{Hogwarts}
\date{19th of January 2017}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}{Outline} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \tableofcontents
\end{frame}

\section{Introduction} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Finding solutions}
Problem \(\rightarrow\) Formalism \(\rightarrow\) Result
\end{frame}


\section{Merits of Formalisms}

\begin{frame}{Instant form} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}
        \includegraphics[width=0.6\textwidth]{LightConeImages/InstantLightCone}
    \end{figure}
\end{frame}

\begin{frame}{Poincar\'e group in instant form} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{tabular}{c c c}
    \(P^1\) & \(P^3\) & \(M^{12}\)\\
    \begin{figure}
        \includegraphics[width=0.3\textwidth]{LightConeImages/BackLightCone}
    \end{figure}
    &
    \begin{figure}
        \includegraphics[width=0.3\textwidth]{LightConeImages/RightLightCone}
    \end{figure}
    &
    \begin{figure}
        \includegraphics[width=0.3\textwidth]{LightConeImages/TurnLightCone}
    \end{figure}
    \\
\end{tabular}
\end{frame}


\end{document}

Commenting out the tabular section does remove the error, so I'm sure it's that. How can I resolve this?

1 Answer 1

1

Solved the problem;

\begin{tabular}{c c c}
    \(P^1\) & \(P^3\) & \(M^{12}\)\\
        \includegraphics[width=0.3\textwidth]{LightConeImages/BackLightCone}
    &
        \includegraphics[width=0.3\textwidth]{LightConeImages/RightLightCone}
    &
        \includegraphics[width=0.3\textwidth]{LightConeImages/TurnLightCone}
    \\
\end{tabular}

Basically, figures are not allowed in a tabular environment. Just use \includegraphics on its own.

3
  • 3
    In a beamer document, there's really no purpose or reason for using figure (and table) environments to begin with.
    – Mico
    Apr 1, 2017 at 13:00
  • @Mico Aren't figure and table environments in a beamer document typically used for captioning with numbers?
    – Sussch
    Aug 18, 2019 at 5:11
  • 1
    @Sussch - In a beamer presentation document, a table's or figure's caption belong in the frame title. In my experience, there's no point in assigning numbers to these captions: If a person wants to ask the speaker, "Can you go back to table [or figure] so-and-so", they'll do so by referring to the text of the caption, not to its number. At any rate, is it reasonable to expect anyone to remember the number of the table or figure once the presentation has moved on to the next slide? That's why I wrote that there's no purpose in using table or figure environments in beamer documents.
    – Mico
    Aug 18, 2019 at 6:25

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.