This blog has moved! Redirecting...
You should be automatically redirected. If not, visit http://scrolls.mafgani.net/ and update your bookmarks.

Tuesday, January 17, 2006

PSfrag for EPS Graphichs Text Manipulation

There's a nice package called psfrag that allows you to insert LaTeX constructs into EPS figures. This is specially useful with EPS files saved from MATLAB plots. The way it works is by replacing a given tag in the text of the EPS file with the LaTeX construct.

E.g. label the x-axis of of the plot as XLABEL and save the plot as an EPS file. Then, when you include that file, just put in the \psfrag{}{} tag:


\psfrag{XLABEL}{$\frac{\tau}{\sigma}$}
\includegraphics{file}


The most obvious disadvantage is that it only works with EPS figures -- so no PdfLaTeX. So, to compile a document to PDF, you'll need to go the old latex -> dvi2ps -> ps2pdf way.

More details can be found on CTAN.

0 Comments:

Post a Comment

<< Home