<html><head></head><body bgcolor="#FFFFFF"><div>Hi Zbigniew,<br></div><div><br>On 24/09/2014, at 6:25, "Nitecki, Zbigniew H." <<a href="mailto:Zbigniew.Nitecki@tufts.edu">Zbigniew.Nitecki@tufts.edu</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">


<div>
<div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; margin: 0px; ">
<font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">I need some very elementary advice on including a jpg file in a beamer document.</font></div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; margin: 0px; ">
<font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><br>
</font></div>
<div style="margin: 0px; "><font face="Helvetica">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 </font></div>
<div style="margin: 0px; ">
<blockquote type="cite">
<div style="margin: 0px; ">% !TEX TS-program = latex</div>
</blockquote>
<div>
<div style="margin: 0px; ">which takes care of my pstricks problem.  </div></div></div></div></span></div></span></span></div></div></div></blockquote><div><br></div><div><br></div><br><blockquote type="cite"><div><div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin: 0px; "><div><div style="margin: 0px; ">But now I have trouble with an early command</div>
</div>
<div style="margin: 0px; ">
<blockquote type="cite">
<div style="margin: 0px; "><span class="Apple-tab-span" style="white-space:pre"></span>\begin{figure}</div>
<div style="margin: 0px; "><span class="Apple-tab-span" style="white-space:pre"></span>\includegraphics[height=3cm]{alseda1.JPG}</div>
<div style="margin: 0px; "><span class="Apple-tab-span" style="white-space:pre"></span>\includegraphics[height=3cm]{Nitecki_Groisman2Montserrat-18.jpg}</div>
<div style="margin: 0px; "><span class="Apple-tab-span" style="white-space:pre"></span>\end{figure}</div>
</blockquote>
<div>
<div style="margin: 0px; ">which gave me no trouble in pdflatex.  </div></div></div></div></div></span></div></span></span></div></div></div></blockquote><div><br></div><div>Use an external utility to convert the  .JPG  images to a different format.</div><div>These need to be  .eps  for  LaTeX  as the processing engine.</div><div><br></div><div>You can do this by point click using Preview, <span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">the Print... dialog, </span></div><div>with  Save as PDF, but choosing instead the <span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">EPS format option.</span></div><div><br></div><div>Of course there are command-line utilities that can do it also.</div><div>e.g. with convert  or imageMagik or whatever.</div><br><blockquote type="cite"><div><div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin: 0px; "><div style="margin: 0px; "><div><div style="margin: 0px; ">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?</div></div></div></div></div></span></div></span></span></div></div></div></blockquote><div><br></div>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.<div><br></div><div>Alternatively, you could run a separate job that turns the psTricks parts into PDF images.</div><div>Then you can stick with pdfLaTeX and not have to worry about the JPG images.</div><div>There are packages that help with this approach, but you can do it anyway.</div><div><br></div><div>Your separate job just needs to put the psTricks parts onto separate pages of a PDF,</div><div>then include those pages into your main job, using</div><div>     \includegraphics[page=... ,scale=... ,viewport=... ... ... ... ,clip]{ ..... }   </div><div>options and arguments.</div><div>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.</div><div><br></div><div><br></div><div>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.</div><div>I prefer to understand what the steps are actually doing, and keep my final runs as uncomplicated as possible.</div><div><br></div><div><br></div><div>Hope this helps,</div><div><br></div><div>    Ross</div><div><br></div><div><br></div></body></html>