Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}}
share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

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}
share|improve this answer
    
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). –  Ulrike Fischer Jun 29 '12 at 7:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.