psfrag equivalent for pdflatex

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.


It's an old question and I'm not sure if this is an alternative in all the aspects, but it may be interesting to add the following:

I was able to do the replacement using the package pstool and the command \psfragfig{}{}

\documentclass{article}  
\usepackage{pstool}
\begin{document}
\psfragfig{fileinepsformat}{%
 \psfrag{a}{$\alpha$}
 \psfrag{b}{$\beta$}}  
\end{document} 

This compiles with pdflatex --shell-escape filename.tex

See also: https://mathematica.stackexchange.com/questions/736/latex-and-mathematica

Tags:

Pdftex

Psfrag