6

I would like to create an array of tikzpictures on a beamer slide by beginning a figure environment and creating four subfloats inside it (using the subfigure package). Strangely, this exact process worked twice on two slides before the one I am currently working on, but failed when I did it the third time. I have been breaking my head over it, but cannot seem to find what the problem is.

Here is a minimum working example that still manages to produce the error:

\documentclass[11pt]{beamer}
\begin{document}
\resizebox{10cm}{!}{\begin{figure}\end{figure}}
\end{document}

And here is the error itself:

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

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.11 ...zebox{10cm}{!}{\begin{figure}\end{figure}}
0

1 Answer 1

9

The figure environment is a floating environment. You should be resizing the actual content (graphic) of the figure, not the floating environment.

\begin{figure}
    \resizebox{10cm}{!}{\includegraphics{foo.png}}
\end{figure}
1
  • In beamer figure is not a float but a simple center environment (which you can't put in a horizontal box like \resizebox either as it build as list). Jun 29, 2012 at 7:36

You must log in to answer this question.

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