5
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ I think it is an interesting question, but the +1 is for the name. $\endgroup$ – rcollyer May 30 '12 at 14:57
  • 1
    $\begingroup$ There is a package called mathpsfrag wwwth.mpp.mpg.de/members/jgrosse/mathpsfrag $\endgroup$ – Peter Breitfeld May 30 '12 at 14:59
  • $\begingroup$ @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. $\endgroup$ – orome May 30 '12 at 15:03
  • 2
    $\begingroup$ 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 $\endgroup$ – rm -rf May 30 '12 at 15:14
  • $\begingroup$ 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? $\endgroup$ – orome May 31 '12 at 17:20

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.