Error on tabular; "Something's wrong--perhaps a missing \item." (No itemize or enumerate)

1,200

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.

Share:
1,200

Related videos on Youtube

Clumsy cat
Author by

Clumsy cat

Updated on August 01, 2022

Comments

  • Clumsy cat
    Clumsy cat over 1 year

    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?

  • Mico
    Mico over 6 years
    In a beamer document, there's really no purpose or reason for using figure (and table) environments to begin with.
  • Sussch
    Sussch about 4 years
    @Mico Aren't figure and table environments in a beamer document typically used for captioning with numbers?
  • Mico
    Mico about 4 years
    @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.