I have converted a jgraph file to eps, and am trying to replace text in the eps figure with LaTeX symbols. I have followed the instructions listed in this question but the solution suggested does not seem to work for me.

Here is my short snippet:




\title{Sample PSFrag}

Hi there.



The string occurs in the eps file: \(rmax = 0%\)) but still no substitution happens in the final pdf file produced. I am using pdflatex --shell-escape sample.tex.

Any suggestions, especially using the pdflatex mechanism, would be appreciated.

  • What happens if you use LaTeX + dvips + ps2pdf? – Ian Thompson Sep 1 '14 at 9:21
  • The original figure is produced, without the substitutions. So, rmax is not replaces with r_max. – Swarnendu Biswas Sep 1 '14 at 14:41
  • I have not used jgraph so far, but does it really generate text as strings in .eps files? – user31729 Sep 1 '14 at 18:59
  • 1
    I think the problem might be that you are trying to replace part of a string, rather than the whole string. Section 8 of the psfrag package manual might help you. Otherwise, please make the .eps file available for download and add a link to your question. – Ian Thompson Sep 1 '14 at 23:19
  • @Ian: Your tip helped, I have now replaced the whole string in the eps file, instead of a substring and that solves the problem. – Swarnendu Biswas Sep 2 '14 at 18:39

According to section 8 of the psfrag package manual,

PSfrag can only replace entire strings, not just parts of one.

Hence, the problem is that you are trying to replace part of a string. Try replacing the whole string instead.

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.