6

I want to insert this picture :A picture in to a beamer. I know that there some problems if the picture is in the format of PNG or jpeg. So, I convert it into eps format. When I tried to insert it, it failed with many errors. Can someone show me how to do this? As you can see that it's a little big. How can it be scaled to suit beamer document?

3
  • 4
    Are you using pfdlatex to compile? If so, then PNG (or better yet, PDF) is the format to go. Why don't you write this directly, instead of using an image? Commented Aug 2, 2013 at 14:41
  • Why dont you just typeset yourself? You can then align the math at the equal signs or you can keep it all centered if you prefer that.
    – dustin
    Commented Aug 2, 2013 at 18:09
  • I got error messages related to my eps figures when compiling my beamer file using pdflatex, but was able to compile it using latex and then using dvipdfmx to convert dvi to pdf.
    – user38451
    Commented Oct 17, 2013 at 19:52

2 Answers 2

3

Try something like this, where figure-name is the file name of your figure (without the file extension). If you have it in both PDF and EPS formats, then the compiler should automatically choose the right one.

\documentclass{beamer}
\usepackage{graphicx}

\mode<presentation>

\begin{document}

\frame
{
  \begin{figure}
    \centering
    \includegraphics[width = 0.9\textwidth]{./figure-name}
    \caption{Awesome figure}
  \end{figure}

}

\end{document}

I've included the package graphicx as it gives some useful options for figures. I've set the width of the figure to 90% of the text width. You can play around with that to get it to fit as you like. I've put the image in the figure environment and given it a caption, but you don't have to. \centering won't work outside the environment, but you could use instead:

\begin{center}
\includegraphics[width = 0.9\textwidth]{./figure-name}
\end{center}

If you don't care about centering, then you don't even need to bother with that. Hope that sorts things.

4

If you have eps figures, you could try adding:

\usepackage{epstopdf}

in the preamble of your document.

This should automatically convert your eps into pdfs when compiling the document.

You must log in to answer this question.

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