I have some plot

Plot[a, {a, -6, 6}]

enter image description here

I need to use it in Latex. However the problem is that labeling text style in Mathematica does not match with LaTeX text. So what I do, I copy the figure without labels from Mathematica as enter image description here


 \begin{picture} (6,5)



\put(3,1){\includegraphics[width=8cm,height=6cm]{a2.png} }

and place labels manually in LaTeX as enter image description here

As there is a clear difference in label style fonts. This technique is not only tiring but it will not support me to save the labeled figure in .png or .eps format. Rather it will be a .pdf generated. Is there a way to match the label font style and size of labeling text in Mathematica?

  • 2
    There's no general solution to this sort of tool mismatch - your options are (a) either to set up Mathematica to match your Latex style or (b) to redraw your graphs using one of the (many) Latex-friendly systems, like pgfplots. Assuming that you are doing rather more complex graphs than your example, you might find (a) easier. If you can use xelatex or lualatex you would be able to use the same system fonts in both Mathematica and LaTeX, which also might make (a) the better option. – Thruston Feb 26 '15 at 11:50
  • You can open the pdf-file in Inkscape and export it as PDF+LaTeX, which replaces the text with LaTeX-Text, so you automatically get the same fonts in your document. – Juri Robl Feb 27 '15 at 18:22

I found the solution actually. By selecting the Font Style of Times Roman in MikteX by using package


And by selecting Label style in Mathematica as

LabelStyle -> Directive[ FontFamily -> "Times"]

worked for me.


You can use the MaTeX Mathematica package to generate figure labels with LaTeX in Mathematica. This is described here:

How to match font sizes is a slightly different topic and is explained here:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.