[Tex/LaTex] How to insert an EPS picture into a Beamer presentation

beamerepsgraphics

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?

Best Answer

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.

Related Question