8

2

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

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

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.

it works fine for me. Version 10.01 on windows. – Nasser – 2014-10-12T12:43:11.377

3You are lucky, my letters was traced as polygons (10.0.1 Linux). – ybeltukov – 2014-10-12T12:57:12.607

1I 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. – Alexey Popkov – 2014-10-12T15:02:47.5371

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

– rhermans – 2014-10-12T15:13:01.890`Export["text.pdf", "words [in brackets]"]`

and you will see that this creates four independent text objects, instead of one as expected.1MaTeX is a good alternative for MathPSFrag for Mathematica 10.0 and later. – Szabolcs – 2017-08-31T13:10:25.657