# Replace all standard LaTeX fonts with [arbitrary fonts] for journal submission

A physics journal I'm submitting to requests that image files not contain any non-standard fonts. Standard fonts, as far as they are concerned, are: Times-Roman, Times-Italic, Times-Bold, Times-BoldItalic, Helvetica , Helvetica-Oblique, Helvetica-Bold, Helvetica-BoldOblique, Courier, Courier-Oblique, Courier-Bold, Courier-BoldOblique, Symbol.

I'm using the following code to generate a standalone pdf file and I can't seem to get rid of all the "non-standard" LaTeX fonts, specifically "CMMI10" and "CMSY7". Note that I am using XeLaTeX to compile the code.

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{verbatim}
\usepackage{mathspec}

\setallmainfonts{Times New Roman}
\setallsansfonts{Arial}
\setallmonofonts{Courier New}

\begin{document}

\pgfplotsset{every axis plot post/.append style={line width=1.0pt}}
\pgfplotsset{grid style=dotted}
\begin{tikzpicture}
\begin{loglogaxis}
[clip marker paths=true,
xlabel=background field amplitude $B_{\text{a}}$ / T,
ylabel=losses $Q$ / J/cycle/m,
xmin=2e-3, xmax=5e-2,
ymin=1e-4, ymax=1e-1,
xtick={2e-3,5e-3,1e-2,2e-2,5e-2},
xticklabel style={/pgf/number format/.cd,fixed,precision=3},
xticklabel={%
\pgfmathfloatparsenumber{\tick}%
\pgfmathfloatexp{\pgfmathresult}%
\pgfmathprintnumber{\pgfmathresult}%
},
minor xtick={3e-3,4e-3,6e-3,7e-3,8e-3,9e-3,1.1e-2,1.2e-2,1.3e-2,1.4e-2,1.5e-2,1.6e-2,1.7e-2,1.8e-2,1.9e-2,3e-2,4e-2},
grid=major
]

\end{loglogaxis}
\end{tikzpicture}

\end{document}


Any ideas how to strip the two remaining fonts from my file?

• A physics journal which doesn't allow you to use a real math font. That's rather curious. Ask them to add a math font to this list, e.g. Xits Math or Cambria Math or whatever. Then you can use unicode-math to use it. May 6, 2013 at 16:38
• It's APL, a journal that belongs to AIP. They are one of the more prestigious journals available in my field... And their process apparently involves using XML somehow, they don't use LaTeX at all, but accept the submission in that format nevertheless. May 30, 2013 at 10:56

@John: Visually, there may not be anything other than TNR. Meferdati's problem seems to be other fonts being embedded in the pdf.

Now the reason they are embedded becomes clear when you minimze your minimal example further:

\documentclass{scrartcl}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{verbatim}
\usepackage{mathspec}

\setallmainfonts{Times New Roman}
\setallsansfonts{Arial}
\setallmonofonts{Courier New}

\begin{document}

%    \pgfplotsset{every axis plot post/.append style={line width=1.0pt}}
%    \pgfplotsset{grid style=dotted}
\begin{tikzpicture}
%        \begin{loglogaxis}
%            [clip marker paths=true,
%            xlabel=background field amplitude $B_{\text{a}}$ / T,
%            ylabel=losses $Q$ / J/cycle/m,
%            xmin=2e-3, xmax=5e-2,
%            ymin=1e-4, ymax=1e-1,
%            xtick={2e-3,5e-3,1e-2,2e-2,5e-2},
%            xticklabel style={/pgf/number format/.cd,fixed,precision=3},
%            xticklabel={%
%                \pgfmathfloatparsenumber{\tick}%
%                \pgfmathfloatexp{\pgfmathresult}%
%                \pgfmathprintnumber{\pgfmathresult}%
%             },
%            minor xtick={3e-3,4e-3,6e-3,7e-3,8e-3,9e-3,1.1e-2,1.2e-2,1.3e-2,1.4e-2,1.5e-2,1.6e-2,1.7e-2,1.8e-2,1.9e-2,3e-2,4e-2},
%            grid=major
%            ]

%        \end{loglogaxis}
\end{tikzpicture}

\end{document}


tikz simply uses fonts from the Computer Modern series to produce the lines and dots in the diagram. IMHO the best solution is not to worry about that. Not only (as Ulrike said) is it highly unlikely that a Physics journal is not going accept a document that uses the math font par excellence. The point is: even if they wanted consistent font choice across all articles and images for a uniform look (which is a good idea), your image won't be a problem because Computer Modern isn't used for anything but lines and dots. Plus, the fonts are embedded in the pdf, so they don't need to have the font files on their machines in order to print it (this is a problem sometimes in print production).

I'd just submit it as it is and wait for their response. If it's rejected, you can either look for a way to make tikz use something else for dots and lines, or (the easier way) convert your diagram (or parts of it) to plain paths so no fonts get used at all.

• Thank you for clearing that up, Nils! They didn't like that, though. So yes, I converted everything to paths... Not the best solution, but I'll add it as an answer. May 30, 2013 at 11:42

When I compile this with XeLaTeX I get...

...which already doesn't contain anything other than Times, as far as I can see.

The journal in question is Applied Physics Letters which belongs to American Institute of Physics Publishing. Their layouting process revolves around XML instead of *TeX and after writing emails back and forth we finally settled on me submitting figures in .ps format. It certainly isn't the best possible solution, but I simply rendered my figures the usual way outputting a PDF and then I used pdf2ps to convert them. Interestingly, the output looks perfect when using standard *TeX fonts but looks horrible (something doesn't seem to scale well) when using

\setallmainfonts{Times New Roman}
\setallsansfonts{Arial}
\setallmonofonts{Courier New}


so I simply left it out and used the standard fonts. The journal didn't mind that. Now my figures actually use the standard *TeX fonts in the paper but since there are no non-standard fonts included in the actual file, that's fine as far as the publisher is concerned. (It's not neat, so it bugs me, but there you go...)

Mayhaps somebody knows why the first version renders so poorly?

Ugly version with Times, Arial & Courier:

Neat version with standard *TeX fonts: