# How do I edit PDF files produced by LaTeX in Illustrator? Fonts are not found

When I try to use Adobe Illustrator (CS4) to edit a PDF file produced by LaTeX with several equations in it, Illustrator complains that it can't find the fonts:

The font CMBX10 is missing.  Affected text will be displayed using a substitute font.
The font CMMI10 is missing.  Affected text will be displayed using a substitute font.
The font CMMI6 is missing.  Affected text will be displayed using a substitute font.
The font CMMI7 is missing.  Affected text will be displayed using a substitute font.
The font CMMI8 is missing.  Affected text will be displayed using a substitute font.
The font CMMIB10 is missing.  Affected text will be displayed using a substitute font.
The font CMR10 is missing.  Affected text will be displayed using a substitute font.
The font CMR7 is missing.  Affected text will be displayed using a substitute font.
The font CMSY10 is missing.  Affected text will be displayed using a substitute font.
The font CMSY6 is missing.  Affected text will be displayed using a substitute font.
The font CMSY7 is missing.  Affected text will be displayed using a substitute font.
The font MSBM10 is missing.  Affected text will be displayed using a substitute font.
To preserve appearance, some text has been outlined.

How do I find & install the necessary fonts?

-
Have you tried to copy those fonts into the system's font directory? –  topskip Feb 21 '12 at 10:10
@doncherry: Even better: graphicdesign.stackexchange.com –  Martin Schröder Feb 21 '12 at 10:37
@Patrick.Gundlach: this may be insufficient. I think there is a font directory dedicated to Illustrator only once the latter is installed. It is better to drop the fonts you want to use within Illustrator in that folder. I could install the .pfb kpfonts family this way and use it in Illustrator but I cannot remember the exact path. –  pluton Feb 21 '12 at 10:44
@doncherry: You're welcome to move this question wherever you'd like, but to me it seems like a pretty TeX-specific issue. –  lid Feb 21 '12 at 13:53
@doncherry: I would not consider this as off-topic. Basically, it is related to LaTeX font handling and the issue is a general one: What to do regarding fonts, if LaTeX is just a first step in a document production process (e.g., for those, who use TikZ for graphics). –  Daniel Feb 21 '12 at 15:40
show 1 more comment

## Moving fonts

As Patrick Gundlach and pluton suggest, you can just make the fonts available to Illustrator. They're in your system's texmf, which you can find by running

kpsewhich -var-value TEXMFDIST

For TeX Live 2011, $TEXMFDIST is by default at • Windows: C:\texlive\2011\texmf-dist • OS X: /usr/local/texlive/2011/texmf-dist All the CM* fonts are at$TEXMFDIST/fonts/type1/public/amsfonts/cm, and the MS* fonts are at \$TEXMFDIST/fonts/type1/public/amsfonts/symbols. You can install these as system fonts if you want to. But if you don't want to clutter your system fonts, you can copy all the pfb and pfm files to Adobe's local font folder:

If you don't actually have TeX, there's also an incomplete collection of TeX fonts here.

## XeLaTeX

For easy compatability with Illustrator, you can use XeLaTeX and fontspec to write your LaTeX document in a font available to your system. For math, download a Unicode math font and use it with unicode-math.

Minimal example:

\documentclass{article}
\usepackage[no-math]{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Times LT Std}
\usepackage{unicode-math}
\setmathfont{XITS-Math.otf}

\begin{document}
This is some text\par
This is some text with numbers 01234567\par
$\left(\frac{\omega^2\rho}{\hat{\jmath}}\right)=\int \sqrt{\mathcal{M}(f)}\;dx$
\end{document}

Bonus: Your PDF will be tiny.
Downside: Math spacing issues introduced with unicode-math. Limited microtype support.

## Other solutions

If you want to guarantee that Illustrator won't mess up your LaTeX document's formatting...

This page suggests using Ghostscript to outline all text on the page:

gs -sDEVICE=pswrite -dNOCACHE -sOutputFile=nofont-Myfile.ps -q -dbatch \
-dNOPAUSE Myfile.pdf -c quit

You can also do that in Illustrator, as shown in this video. But this means you can't edit the text – just reposition elements. It will also probably inflate your PDF's size quite a bit.

If you just want to draw on top of the LaTeX document, you can make a new PDF in Illustrator and Place the LaTeX PDF in the background, as in the first part of that video. Make your doodles, remove the background, save the PDF, and overlay it on one of your LaTeX document's pages using \includegraphics.

-
This is probably naive, but I'm sure it would help others too... where do I actually get those fonts? –  lid Feb 21 '12 at 13:59
TTF/OTF fonts are really standard. You can get them from a lot of places. See fontsquirrel.com, myfonts.com or many others... –  ℝaphink Feb 21 '12 at 14:42
@Raphink This question pertains to a specific set of fonts, which I could not find on either of those sites. (I did also do a cursory Google search, but could not find an archive containing the pfb and pfm files.) –  lid Feb 21 '12 at 16:42
@lid: On CTAN. –  Martin Schröder Feb 21 '12 at 22:00