Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Is there a way to export graphics as EPS so that LaTeX can perform style substitutions or modifications on them?

I know that it is possible to replace simple text elements in imported EPS files using LaTeX's psfrag; but if this is all that is possible, it is not sufficient to enforce a consistent appearance for graphics. That requires the ability to make substitutions to things like line weights and colors.

Is there a way to use Mathematica to export EPS files in such a way that style elements are represented as simple text tags that can be easily replaced using psfrag (or a similar technique) in LaTeX?

share|improve this question
I think it is an interesting question, but the +1 is for the name. –  rcollyer May 30 '12 at 14:57
There is a package called mathpsfrag wwwth.mpp.mpg.de/members/jgrosse/mathpsfrag –  Peter Breitfeld May 30 '12 at 14:59
@PeterBreitfeld: That seems to be old (it complains mightily when installed under 8.0; and many questions related to it here and on TeX.SE are unanswered). It also isn't clear to me how to get it to do what I wold want: simply set up the EPS so that I can perform simple psfrag (or similar) substitutions on the LaTeX (import) end. –  raxacoricofallapatorius May 30 '12 at 15:03
If you want to do all the final controls with latex, then it might be better to export the points for your curve and import them and plot with tikz –  rm -rf May 30 '12 at 15:14
Yes, that's a good suggestion, and it seems by far the simplest in any scenario where the meat of the figure can be reduced to a function. My question extends to scenarios where this is not the case; e.g., the Mathematica figure is of something like this. Could I, say, make the black squares a specific blue in LaTeX? –  raxacoricofallapatorius May 31 '12 at 17:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.