I want to use MathPSFrag in Mathematica to export graphics to EPS for inclusion in LaTeX files. However, with recent versions of Mathematica this does not seem to work very well anymore. I have fixed some of the problems, but not the last one.

In the newest versions of Mathematica export of text into .eps splits it into letters. For example, the output of

ExportString["word", "EPS"]

contains the lines

0 8.25 m
(w) N
5.609 8.25 m
(o) N
11.219 8.25 m
(r) N
16.828 8.25 m
(d) N

E.g. it draws each letter "w", "o", "r", "d" separately. In previous versions it gave simply

(word) N

How can modify the Export command to get the same result in new versions?

This doesn't affect the .eps file itself, but doesn't allow PSFrag to work properly. I'm using Mathematica 9.0 in Ubuntu.

  • $\begingroup$ it works fine for me. Version 10.01 on windows. $\endgroup$ – Nasser Oct 12 '14 at 12:43
  • 3
    $\begingroup$ You are lucky, my letters was traced as polygons (10.0.1 Linux). $\endgroup$ – ybeltukov Oct 12 '14 at 12:57
  • 1
    $\begingroup$ I get (word) N in v.8.0.4 but in v.10.0.1 under Windows 7 x64 I get outlines instead of the letters. $\endgroup$ – Alexey Popkov Oct 12 '14 at 15:02
  • 1
    $\begingroup$ This is somehow related to a previous question of mine, Mathematica used to have an unnecessarily complicated structure for text objects in vector formats such as PDF, EPS, and SVG. Since Mma 10, text is exported as polygons in EPS format, a step back in my opinion, and there still problems with text in PDF, try for instance Export["text.pdf", "words [in brackets]"] and you will see that this creates four independent text objects, instead of one as expected. $\endgroup$ – rhermans Oct 12 '14 at 15:13
  • 1
    $\begingroup$ MaTeX is a good alternative for MathPSFrag for Mathematica 10.0 and later. $\endgroup$ – Szabolcs Aug 31 '17 at 13:10

Your Answer

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

Browse other questions tagged or ask your own question.