As far as I understand, psfrag is no longer working with Mathematica 10. Does anyone have a solution for this problem or knows whether there will be a solution in the near future? Or is there an alternative?
What I want to do is export eps files from Mathematica and include them into Latex with nice Labels.
Have a look at MaTeX by Szabolcs Horvát
Thank you very much. This is awesome.
There is a dedicated thread on this forum by Szabolcs: LaTeX typesetting in Mathematica
Yes, Szabolcs has made a nice package. But it does not solve my problem with psfrag-substitutions using eps-images in a LaTeX-document.
Could you please explain what you can achieve with psfrag (or MathPSFrag) that is not possible with MaTeX? Maybe there is a way to improve MaTeX to accommodate your use case. I would simply like to understand your motivation for wanting to use psfrag.
Mathematica often produces corrupted EPS files, hence is is usually better to Export your graphics as PDF, then convert the latter to EPS using third-party tools. Here are some posts of mine containing description of different ways to do this:
How do I flatten transparency on a graphics, for conversion to eps or similar?
Support for EPS in Office 2013
Thanks for the interesting suggestion, Alexey. I am unable to tell for sure, but it may well be that flattening transparency is related to my problem. The images were Graphics objects, not Graphics3D.
I am not sure that I can use your method. I don't know how LaTeX does it, but it needs to be able to identify certain strings of text in the EPS-file as such for the psfrag-substitution to work the way it used to (substitute a user specified string with a TeX-command). The rest of my document will be typeset by LaTeX, and using fonts other than those in my TeX-system is not an option.
My testing confirmed that Mathematica was changed for worse in this sense when moving away from version 9. I would also like to know why Wolfram did that? Or is there an export option to go back to this (not unlike the option to temporarily go back to version 5 graphics that existed in some versions for the purposes of backwards compatibility)?