[OS X TeX] including a graphics file

Murray Eisenberg murrayeisenberg at gmail.com
Sat Jun 19 21:12:42 CEST 2021

> On 19 Jun2021, at 12:30 PM, Nitecki, Zbigniew H. <Zbigniew.Nitecki at tufts.edu> wrote:
>  Again the TeXShop editor menu has two macros for figures: regular or eps.  The settings I mentioned in my previous email were the eps settings (including all the 
> weird stuff like \bf inside the caption) which I had used because when I used the regular setting (which I usually do) the typesetting crashed.  With the eps settings, the 
> system simply says it doesn’t recognize the \epsfile command, and skips the whole picture.
> The changes suggested by both of you take me back to the “regular” settings.

Instead of the TeXShop macros for figures, you may wish to use the Templates button on the source window and select Graphics Template, which will immediately paste the following into your source window at the current cursor position:

    \begin{figure}[htbp] %  figure placement: here, top, bottom, or page
       \caption{example caption}

For at least .png, .jpg, .pdf, and .eps, the type of graphics file will be detected automatically without including the corresponding file extension.

However, .ps will not work at all like that, with or without the extension, assuming you’re using the default TeXShop typesetting engine pdflatex (TeXShop > Preferences > Typesetting > Default Script : Pdftex). 

If you insist on using .ps files rather than .eps or .pdf, etc., then you’d want the Deafult Script to be Tex +DVI instead. But — catch! — if you then try to use a .pdf with \includegraphics, then you will get a "LaTeX Error: Cannot determine size of graphic in xxx.pdf (no BoundingBox).”

Since Mathematica can export to .eps (but _not_ to .ps), my advice is to stick with .eps or, even better yet, .pdf graphics files for figures. One advantage is that just about any previewer will open a .pdf (and on Mac, in fact, a .eps or .ps will automatically be converted to a corresponding .pdf if you use Preview.app to open it).

Murray Eisenberg			murrayeisenberg at gmail.com
503 King Farm Blvd #101	
Rockville, MD 20850-6667	Mobile (413)-427-5334

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/macostex-archives/attachments/20210619/b95ac57a/attachment.html>
-------------- next part --------------
----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

More information about the macostex-archives mailing list.