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

I am currently updating my workflow from the old tex2ps2dvi workflow (needs a lot of time and matplotlib and other stuff etc. hasn't a EPS output (only PDF, SVG, PS, PNG, etc...).

I am trying to adopt the font in my picture to the rest of my document. Normally I use:

\psfrag{old text in old font}[l][l]{new text in new font}
\psfrag{old text in old font}[90][l][l]{90 deg rot new text in new font}

But I always have to save it as pdf and then open it with Illustrator and modify it and save it as EPS then include it...

Is there a native implementation of psfrag in LaTeX, which can handle the text-replacement with pdflatex?

share|improve this question
3  
Related, or possibly a duplicate: Why is there no pdffrag package? –  Werner Jul 24 '12 at 7:00
    
mhh, simply not possible? well that's bad news! Are there any plans to implement it to pdf?? A kind of a pdffrag thing? –  user1536844 Jul 24 '12 at 7:14
    
@user1536844 No, because as you say this is not possible: it's not a question of implementing 'something'. –  Joseph Wright Jul 24 '12 at 7:50
1  
I think more explicit than the other linked question is the discussion of psfrag in the answer here: tex.stackexchange.com/questions/60778/… –  David Carlisle Jul 24 '12 at 12:34
    
ok, thank you guys, you made the psfrag thing a lot clearer to understand. I think i will try this approach tex.stackexchange.com/a/64483/16894. Thank you. –  user1536844 Jul 24 '12 at 17:52
show 2 more comments

1 Answer

up vote 7 down vote accepted

No pdffrag as you learned. I suggest the following "solution":

  1. Create a minimal tex document which uses psfrag to insert the appropiate labels and fonts, and use it to include all your eps figures. Use also preview package which will produce a document with a single figure per page, and with a page size fitted to the figure size.
  2. Compile that document with your habitual chain latex->dvips
  3. Convert the resulting PostScript file to pdf. Let say that the result is the file myfigures.pdf
  4. In your main document, include each figure at the appropriate point with \includegraphics[page=n]{myfigures.pdf}, being n 1, 2, 3... for each figure.

Alternatively, and I'm not joking, you may consider using TikZ to redo all your figures, specially if they are few and simple.

share|improve this answer
5  
This is basically what the pst-pdf, auto-pst-pdf, and pstool packages all do internally :). You're right; there is no other alternative. –  Will Robertson Jul 24 '12 at 7:43
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.