2

I am currently creating a beamer document, and each time I try to insert a minipage and a picture, an error occurs. If I comment out the minipage and picture, it runs fine. I have tried running one at a time, so I know both issues are causing errors.

I have included the basics of the coding, without any scaling, etc... because it's not working even with the bare-bones of the command.

Any suggestions?

\documentclass{beamer}
\usepackage{graphicx}
\begin{document}

\begin{frame}
\begin{minipage}
\begin{center}
\huge{Title}
\end{center}
\end{minipage}

\begin{minipage}
\includegraphics{picture.JPEG}
\caption{link}
\end{minipage}
\end{frame}
\end{document}
3

minipage requires a width argument

\begin{minipage}{5cm}

or some such width

you have

\begin{minipage}
\begin

which is the same as

\begin{minipage}{\begin}

and it will try to interpret \begin as a length. Everything after that will be bad.

You could add width arguments to both minipages, but they do not appear to be doing anything useful so simpler would be just to delete them

\documentclass{beamer}
\usepackage{graphicx}
\begin{document}

\begin{frame}

\begin{center}
\huge Title
\end{center}

\begin{figure}
\includegraphics[width=.4\textwidth]{example-image}
\caption{link}
\end{figure}
\end{frame}
\end{document}
7
  • Thank-you, I've tried the simplified format above, and it's telling me that I'm missing a $ in the:
    – user116342
    Oct 14 '16 at 0:35
  • Sorry- Thank-you, I've tried the simplified format above, and it's telling me that I'm missing a $ in the: \begin{figure} area?
    – user116342
    Oct 14 '16 at 0:36
  • Did you copy exactly the text above into a new file and it gives an error? it should not, I tested it here (texlive 2016) Oct 14 '16 at 0:42
  • I think it was the caption- it was too long. I've shortened it and it's working now.
    – user116342
    Oct 14 '16 at 0:43
  • @karen being long isn't itself going to generate an error but there could have been an error in the longer text that you have now deleted. Oct 14 '16 at 0:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy