[OS X TeX] Mathematica fonts in graphics

Bruno Voisin bvoisin at mac.com
Tue Aug 31 10:29:19 EDT 2004


Hi Maarten,

I finally just tried your solution:

> So dvips takes care of the correct inclusion of the fonts. In that 
> case you might try the following simple tex file for each of the 
> figures:
>
> \documentclass{article}
> % normal preamble here, font inclusion &c.
> \usepackage{graphicx}
> \pagestyle{empty}
> \begin{document}
> \includegraphics{yourfile}
> \end{document}
>
> and run it through latex and dvips:
>
> latex figure.tex
> dvips -E -o figure-out.eps figure.dvi
>
> and translate into pdf now:
>
> epstopdf --outfile=figure.pdf figure-out.eps
>
> The fonts should now be included as expected (you can check the font 
> information in Acrobat).

It works (a PDF file is created, with no resolution issues), but that 
doesn't solve the problem unfortunately:

- The original problem was the following: create from Mathematica an 
EPS file including characters from the Mathematica Math1 font; apply 
epstopdf to this file, so as to convert it to PDF; include this PDF 
file in a LaTeX document compiled with pdfLaTeX; then most characters 
from Math1 (except the alphabetical ones) are not found, and are 
replaced by empty boxes in the PDF output. The same does not appear 
when compilation uses the LaTeX + dvips + pstopdf route.

- With your solution, a new PDF graphics is created by pre-processing 
the original EPS file with dvips, so as to make sure that all fonts are 
included as they should be. However, using this new PDF graphics in 
conjunction with pdfLaTeX yields the same buggy output: empty boxes are 
still present where characters from Math1 should be.

My interpretation (possibly wrong, I know rather few about PS and PDF) 
is that the problem is not a missing Math1 font, but simply that Math1 
is plain buggy. Characters are not where they should be according to 
the accompanying encoding. dvips is able to cope with these encoding 
issues, and to produce correct output notwithstanding; pdfTeX seems to 
be less flexible, and to fail when faced with such buggy input.

This is, I think, how the following excerpt from 
<http://forums.wolfram.com/mathgroup/archive/2001/Mar/msg00499.html> 
should be interpreted:

> The point is, PostScript use the names in the encoding
> to acess an character, TeX and mathematica use the
> position number in a table of 256 characters for every
> font.

In any case I have been able to proceed using entirely TeX + dvips + 
pstopdf. I would have preferred to minimize the number of conversions, 
and work directly from .tex input to .pdf output. However, I'm amazed 
by the flexibility of TeX + dvips + pstopdf, which works like a breeze, 
producing a 517 Mb PS file and from it a 78 Mb PDF file with no fuss, 
and in less than 10 mins on my PowerBook. (As an aside, Illustrator 10 
takes about 5 minutes just to open any one of the 20 Mb 
Mathematica-produced EPS files, from 30 seconds to 1 minute to update 
the display every time I click on something, and, after I have finally 
done some modifications, about 15 minutes to save the file to disk, in 
Illustrator EPS format, when I ask it to. I had to give up on saving 
the file in standard Illustrator .ai format, as this seems to take 
hours -- literally --, even without compression.)

Bruno

--------------------- 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