Recently I ran into this problem when trying to use EPS-images produced by Mathematic in my TeX-documents.
The friendly people at TeX.SE took a look at my eps, and discovered the following "feature" of the eps-file produced by version 11. My image had a text string on a monocolor pink background. This was apparently included into the eps both as a string as well as outlined in some "purely" graphical form. I don't see it with GhostView, apparently the people at TeX.SE used more powerful methods. Anyway, when I used the psfrag package to substitute the string with a snippet of TeX, the literal string was substituted all right, but graphical "copy" stayed. Resulting in a less than pleasing image in my document.
Q: How do I coerce Mathematica to save a piece of Graphics in an EPS-file in such a way that a textual component on colored background is only saved as a string and not also as outlined graphics? I don't care if the colored component obscures the text in, for example GhostView, as long as psfrag can find the text string.
This could be a feature, but...
- Two years ago I had produced a very similar eps with Mathematica v.9. Back then this graphical ghost was not there. I looked at that eps-file in GhostView, and the black text on pink background was nowhere to be seen - except that the literal string was part of the eps code because psfrag could replace it all right!
- When I regenerated that two year old image using the version 9 notebook/source, things changed. Now I can see the black text in GhostView, psfrag leaves that part, and my typeset document is not so nice.
Below please find a minimal set of Mathematica commands to create the problem.
pinkki2 = ParametricPlot[u {Cos[t], Sin[t]}, {u, 1.8, 2.2},
{t, 0.35, 0.7}, Mesh -> False, PlotStyle -> Pink];
pinkki1 = ParametricPlot[u {Cos[t], Sin[t]}, {u, 0.8, 1.2},
{t, 0.35, 0.7}, Mesh -> False, PlotStyle -> Pink];
tekstit = Graphics[{
Text["df", {0.4, 0.23}],
Text["dr", {1.5, 1.35}], Text["dr", {0.75, 0.7}],
Text["r1df", {0.6, 0.32}], Text["r2df", {1.43, 0.85}],
Text["A", {0.82, 0.5}], Text["B", {1.68, 1.0}]}
];
Show[{tekstit, pinkki1, pinkki2}, AspectRatio -> Automatic,
Ticks -> None, AxesLabel -> {"X", "Y"}]
What changed in Mathematica's handling of eps from version 9 to version 11?
How can I go back to version 9 behavior?
I have tried tinkering with the order of the graphics-components in Show.
If I use Show[{pinkki1,pinkki2,tekstit}] instead, then psfrag will not find the string, and won't do the substitution at all.
Below you see what it looks like psfrag+LaTeX have replaced one of the "A" strings with $dA_1$ and one of the "B"-strings with $dA_2$. The non-textual version of the string shows through - see the part with a magnifying glass.

Save Graphics as-interface. – Jyrki Lahtonen Jul 30 '18 at 08:55"AllowRasterization" -> Falseoption (inExport) should be able to prevent this. However, it has not worked for me for several versions (maybe not worked only for some graphics?). You may want to ask Wolfram Support about this. – Szabolcs Sep 17 '18 at 14:21Showto thegraphicsvariable. Then (after loading MaTeX), trygraphics /. Text[s_String, rest___] :> Text[MaTeX[s], rest]. This will replace any string inTextwith its MaTeX-rendered equivalent. I assume these strings are all supposed to contain LaTeX code and that e.g.r2should have beenr_2. http://i.stack.imgur.com/nPoja.png – Szabolcs Sep 17 '18 at 14:26