welcome: please sign in
location: Diff for "Computer/Latex/ConvertingPsfrag"
Differences between revisions 2 and 3
Revision 2 as of 2019-05-20 13:09:20
Size: 874
Editor: leif
Comment:
Revision 3 as of 2019-05-20 13:16:45
Size: 912
Editor: leif
Comment:
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:
Download psfragmall.tex [[attachment:psfragmall.tex|Download psfragmall.tex|&do=get]]

Converting psfrag for use with pdflatex and lualatex

The package {psfrag} only works with the route latex -> dvipdf (or latex -> dvips -> ps2pdf), and not directly with pdflatex or lualatex. One way to get around this problem is to convert the whole figure, including {psfrag}, to a .pdf figure, which can then be included directly. In order to do that, start with the following template:

\documentclass{standalone}
\usepackage{graphicx,psfrag}
\usepackage{schoolbook}   % Choose the same font as your document.
\textwidth=117mm          % Set the same width as your document.
\begin{document}
  \psfrag{M}[l][l]{Mätsignal}
  \psfrag{S}[l][l]{Styrsignal}
  \psfrag{L}[][]{$L$}
  \includegraphics[width=0.9\textwidth]{figure.eps}    
\end{document}

Download psfragmall.tex

Computer/Latex/ConvertingPsfrag (last edited 2019-05-22 15:15:38 by leif)