[OS X TeX] graphics in beamer

Ross Moore ross.moore at mq.edu.au
Tue Sep 23 17:12:47 EDT 2014


Hi Zbigniew,

On 24/09/2014, at 6:25, "Nitecki, Zbigniew H." <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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20140924/43f6a073/attachment.html>


More information about the MacOSX-TeX mailing list