[OS X TeX] graphics in beamer

Nitecki, Zbigniew H. Zbigniew.Nitecki at tufts.edu
Tue Sep 23 23:27:48 CEST 2014


The option via Preview ("Print->save as pdf" with eps option sounds like the perfect solution for me.  But when I call up one of the images in Preview and click on save as pdf, I only get options involving pdf, no eps option shows itself.  Do you mean that when I name the file, give it a n .eps extension?  That sounds too simple to be true.

It seems I can save the images as pdf's and then include them as pdf's, but I want to incorporate them in a single frame, not make them separate frames in the presentation.

Thanks for the idea, though.

Z
On Sep 23, 2014, at 17:12, Ross Moore <ross.moore at mq.edu.au<mailto:ross.moore at mq.edu.au>>
 wrote:

Hi Zbigniew,

On 24/09/2014, at 6:25, "Nitecki, Zbigniew H." <Zbigniew.Nitecki at tufts.edu<mailto:Zbigniew.Nitecki at tufts.edu>> wrote:

I need some very elementary advice on including a jpg file in a beamer document.

I am preparing a set of slides using beamer for a talk next week.  My initial version was compiled (via the standard stuff in TeXShop) in pdflatex (I think--whatever is the default engine) but then the pstricks figures all crashed the program.  So I did what I had forgotten to do, when I am creating a paper to print, say via document style article, namely use the "program" macro to insert the line
% !TEX TS-program = latex
which takes care of my pstricks problem.



But now I have trouble with an early command
\begin{figure}
\includegraphics[height=3cm]{alseda1.JPG}
\includegraphics[height=3cm]{Nitecki_Groisman2Montserrat-18.jpg}
\end{figure}
which gave me no trouble in pdflatex.

Use an external utility to convert the  .JPG  images to a different format.
These need to be  .eps  for  LaTeX  as the processing engine.

You can do this by point click using Preview, the Print... dialog,
with  Save as PDF, but choosing instead the EPS format option.

Of course there are command-line utilities that can do it also.
e.g. with convert  or imageMagik or whatever.

I realize that the problem is not specifying bounding boxes--whatever that means--but am fairly ignorant about graphicx, so am not sure how to put in a specification.  Can anyone give me some quick-and-dirty advice on how to do this with minimal pain?

Since you will be doing multiple processing runs anyway, you might as well convert the graphics to a format that "just works" with the engine you need for the psTricks stuff.

Alternatively, you could run a separate job that turns the psTricks parts into PDF images.
Then you can stick with pdfLaTeX and not have to worry about the JPG images.
There are packages that help with this approach, but you can do it anyway.

Your separate job just needs to put the psTricks parts onto separate pages of a PDF,
then include those pages into your main job, using
     \includegraphics[page=... ,scale=... ,viewport=... ... ... ... ,clip]{ ..... }
options and arguments.
The 4 integer arguments to  viewport=   specify the bounding box in points, allowing you to crop as loosely or tightly as you wish, for best aesthetics on your slides. You have full control, within the LaTeX source.


Others will give instructions on how to use other packages, which essentially do the same kind of thing, but with the details all hidden inside macro expansions triggering the file conversions.
I prefer to understand what the steps are actually doing, and keep my final runs as uncomplicated as possible.


Hope this helps,

    Ross



----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
List Archive: http://tug.org/pipermail/macostex-archives/
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex


Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966
http://www.tufts.edu/~znitecki/




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/macostex-archives/attachments/20140923/a015e923/attachment.html>


More information about the macostex-archives mailing list