[OS X TeX] Mathematica fonts in graphics

Gary L. Gray gray at engr.psu.edu
Fri Aug 27 10:43:29 EDT 2004


On Aug 27, 2004, at 9:58 AM, Bruno Voisin wrote:

> Hello,
>
> I'm pretty sure this question or a similar one has already been 
> evoked, but I couldn't find a solution, if any.
>
> I've been trying to include, in a pdfLaTeX document, figures created 
> by Mathematica. In order to get axes labels etc. in Times, I've used 
> in Mathematica:
>
> $TextStyle = {FontFamily -> "Times"}
>
> Everything works fine, the figures are saved from within Mathematica 
> as EPS files, then converted to PDF using either epstopdf 
> (Ghostscript's distiller, called from within a perl script in the 
> teTeX distribution), pstopdf (Panther's distiller) or Acrobat 
> Distiller 5.0.5, and the PDF files look correct in all cases.
>
> However, when including the figures in the pdfLaTeX document, based on 
> the package graphicx and \includegraphics, I get warnings such as:
>
> Warning: /usr/local/teTeX/bin/powerpc-apple-darwin-current/pdflatex 
> (file /usr/
> local/teTeX/share/texmf.local/fonts/type1/wolfram/Math1.pfa): glyph 
> `hyphen' un
> defined
>
> and all minus signs in the figures are replaced by empty boxes.
>
> It turns out that, when instructed to use any other font than the 
> default Courier, Mathematica uses this other font for text, but for 
> all mathematical symbols (including the minus sign here) it defaults 
> to Math1, one of its built-in Wolfram mathematical fonts.
>
> I've already, as indicated in the above warning, converted the fonts 
> for use with TeX and installed them in my texmf.local tree. However, 
> Math1 (at least the version shipped with my Mathematica 4.1.3) seems 
> to have encoding issues, producing the above problem; similarly, the 
> horizontal fraction bar is replaced by another character, etc.
>
> Is this a well-known issue in the Mathematica or TeX world? Is there 
> an easy fix?

Bruno,

I know that you already answered your own question, but as an 
additional option, you could use WARMreader to label your Mathematica 
figures.

We are writing textbooks that contain dozens of plots generated in 
Mathematica. Our procedure is to:

(1) Save the Mathematica plot as an EPS file.

(2) Delete the default labels and then re-create all the labels using 
WARMreader (along with our WARMFigToPDF AppleScript). This allows you 
to use an TeX-supported font or construct.

(3) Save as an Illustrator PDF file using default settings.

It doesn't take terribly long and the final result is gorgeous. I would 
think that this would be a particularly attractive result since it 
appears that you only need to do this to 10 figures (your later email 
states this).

All the best,

-- Gary

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list