0
\documentclass[12pt]{amsart}
\usepackage{mathrsfs}
\usepackage{graphics}
\usepackage{latexsym}
\usepackage{cite}
\usepackage{graphicx,psfrag}
\usepackage{amsmath,amssymb,amsthm,mathtools}
\usepackage{color}
\begin{figure}
    \psfrag{e}{$e$}
    \psfrag{w1}{$w_1$}
    \psfrag{w2}{$w_2$}
    \psfrag{v1}{$v_1$}
    \psfrag{v2}{$v_2$}
    \psfrag{v3}{$v_3$}
    \psfrag{v4}{$v_4$}
    \psfrag{eL1}{$e^L_1$}
    \psfrag{eR1}{$e^R_1$}
    \psfrag{eL2}{$e^L_2$}
    \psfrag{a}{$\Rightarrow$}
    \includegraphics[width=.8\textwidth]{eps_hw2_binaryToTri.eps}
\end{figure}

I compile my .tex file in WinEdt 10.2 in PDFTeXify with dvi -> ps -> pdf, but it only change the tag with single symbol. How can I replace the tags with more than one symbol?

enter image description here

  • as documented in the psfrag package documentation whether or not psfrag can "see" multi-letter strings depends on the details of the application producing the original image. If it "typesets" the strings adding spacing adjustments between letters (as tex would) then a string such as eL1 may not be in the file, but rather three separate strings e, L and 1 with spacing, in which case psfrag will fail to find the string eL1 as it is not there... – David Carlisle Mar 16 '17 at 15:21
  • Oh.. I created this image in Adobe Illustrator. Where can I find relevant settings? – Taehee Hong Mar 16 '17 at 15:47
  • I have no idea about adobe illustrator, but if you look in the file and do not see a literal string (eL1) then psfrag will not see it either. You might get away with replacing w by $w$ L by $^L$ and 1-9 by $_1$.. $_9$ Or just redo the labels in illustrator in a different font or different options, or just with single letters..... – David Carlisle Mar 16 '17 at 16:05
  • 1
    putting psfrag adobe illustrator into google shows gglanzani.tumblr.com/post/1649264221/illustrator-and-psfrag – David Carlisle Mar 16 '17 at 16:08
  • It Works! The key was saving EPS for Version the Illustrator3.Thank you!!! – Taehee Hong Mar 17 '17 at 3:16
2

Psfrag can only replace strings that appear as literal strings in the PostScript, if you use a typesetting application that adds kerns, so positions each letter individually then multi-letter strings get split up.

The details to avoid this depend on the application, using single letter strings usually works but is not very convenient. or sometimes using digits or a monospace font avoids kerning issues.

Or for Adobe illustrator saving in a format compatible with an old enough version (apparently it has a save option to be compatible with version 3) works in most cases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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