0

I'm working on Ubuntu 16.06.7 LTS X Mathematica 12.1.1. Very recently, special characters do not display correctly anymore once exported to pdf. Here comes a basic working example:

figure = LogLogPlot[x^2, {x, 0, 1}, Frame -> True, FrameLabel -> {{"\[Rho] [g \!\(\*SuperscriptBox[\(cm\), \(-3\)]\)]",
  None}, {"x [cm]", None}}]

Inside Mathematica, the output displays correctly: Screenshot from mathematica file When exporting to pdf,

Export["figure.pdf", figure]

special characters, including Greek letters and exponents, do not display correctly anymore, in the exported file:

Screenshot from exported pdf file

The problem occurs when exporting to pdf or eps, but not when exporting to png or jpg. This may seem a detail, but its quite annoying when producing publication quality plots.

I would exclude the following hypotheses:

  • the problem is not inherent to FrameLabels, it also shows up in PlotLegends, and Graphics[Text[...]].
  • I tried different fonts (Times, Arial, Helvetica), the problem persists.
  • the problem is neither inherent to the OS or pdf viewer. Pdf files generally display correctly on my computer except those produced by Mathematica.
  • pdf exportation with other programs (firefox, chrome, texmaker,..) works smoothly.

Any help would be appreciated!

henri
  • 1
  • 2
  • Your code works fine on Mathematica 12.2 with windows 10 (for both pdf and eps format). – Ben Izd Mar 20 '21 at 17:46
  • Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Michael E2 Mar 20 '21 at 18:17
  • Update to version 12.2 solved the problem. Thanks @BenyIzd – henri Mar 21 '21 at 11:43

0 Answers0