My OS is Ubuntu 14.04, and I use MMA 10.

I export a figure ploted in MMA to a pdf file and then import the pdf in Latex, here is the screenshot odd

As you can see, the spacing in the text is odd. But it becomes normal if the length of each word is not too long.normal

So, how to fix this problem if there is a long word in the figure? How can I export it to a pdf file properly?

Here is the code to plot the figure

Plot[x, {x, 0, 1}, PlotLegends ->
  Placed[{"notethesaapa c in g"}, {Scaled[{0.9, 1.0}], {0.9, 1.0}}], 
  FrameLabel -> {None, None, "note the saapa c in g" , None},Frame -> True]

PS: I check in Windows and Mac OS, there is no probelm.

  • 1
    $\begingroup$ Please tell us about your OS, your Mathematica version and provide a small code producing the issue. $\endgroup$ – Öskå Nov 26 '14 at 14:39
  • $\begingroup$ Why do not you insert a few additional empty intervals between the words "note", "the" and "saapa"? This seems the easiest, unless you have in mind a high-quality image as eg., for a journal publication. $\endgroup$ – Alexei Boulbitch Nov 26 '14 at 15:42
  • $\begingroup$ @Öskå Thanks! I update the quaestion. My OS is ubuntu 14.04 and I use MMA 10. $\endgroup$ – Eden Harder Nov 27 '14 at 1:33
  • 1
    $\begingroup$ @Szabolcs Thanks! Mathematica, Ubuntu 14.04. Maybe I should upgrade all of them. $\endgroup$ – Eden Harder Apr 28 '15 at 0:40
  • 1
    $\begingroup$ May be this approach can help? $\endgroup$ – Alexey Popkov Feb 16 '17 at 7:06

I also noticed that the "Save Graphic As..." option doesn't work very well for exporting to PDF. Maybe try exporting to an image file type like png or jpg first and then convert to PDF with an external tool. Or simply print to PDF within Mathematica:

enter image description here

  • $\begingroup$ Thanks!Print is not OK also. $\endgroup$ – Eden Harder Nov 27 '14 at 15:30
  • $\begingroup$ Are you interested in this because you want to import the graphics in a LaTeX document? If so, I could write a step-by-step guide on how to use the psfrag package to get LaTeX to render the text inside an imported image. $\endgroup$ – Kris Nov 27 '14 at 15:36
  • $\begingroup$ Yeap, you got me. Thanks so much! Even the coordinates in the axis will be mixed up when I export the figure as a eps file. $\endgroup$ – Eden Harder Nov 28 '14 at 1:46

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