Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In some figures I create for my thesis I want to replace the labels and such using the same font and size as in the rest of the thesis. A couple of month ago I already used psfrag and pstool (with pdflatex). But now I cannot get it working. I did not changed any files (using a version control system, so I'm pretty sure).

The following mini example produces the same error as in my thesis:

\documentclass{article} 
\usepackage{pstool}

\begin{document}   
\begin{figure}     
\centering  
\psfragfig*{Inverses_Pendel} 
\end{figure}
\end{document}

In the same directory are the files Inverses_Pendel.eps and Inverses_Pendel.tex. Inverses_Pendel.tex contains the following content:

\psfrag{T}[cc][cc]{$Test$}

And here is the error:

Package pstool Warning: Execution failed during process: ps2pdf "-dAutoFilterColorImages=false" "-dAutoFilterGrayImages=false" "-dColo rImageFilter=/FlateEncode" "-dGrayImageFilter=/FlateEncode" "-dPDFSETTINGS=/pre press" "Inverses_Pendel-pstool.ps" "Inverses_Pendel.pdf" This warning occurred on input line 7.

! Missing $ inserted. $ l.7 \end {figure} ? ! Emergency stop. $ l.7 \end {figure} End of file on the terminal!

It's such a generic error, I don't even know where to start searching.

I'm using MikTeX 2.9. I'm passing the -shell-escape option.

share|improve this question
1  
The "Missing $" error looks a bit if the underscore in your file name leds to errors. But this is perhaps only a side effect. If you get an error also when you remove the underscore you should put the eps and the tex somewhere for download so that other can makes tests. –  Ulrike Fischer Aug 1 '12 at 7:48
    
@Ulrike Fischer - Removing the underscore fixed my problem with the "Missing $" error. Thank you for that! But now the generated pdf contains a red text message: "An error occured processing graphic './InversesPendel'" ... I will do a some research first, and update the question, if I dont get that error fixed. –  PetPaulsen Aug 1 '12 at 8:14
    
@Ulrike Fischer - Solved my other problem too. It seems my MiKTeX installation was broken, ps2pdf didn't work. When you make your comment an answer I would accept it, because it solved my initial problem ("Missing $" error). –  PetPaulsen Aug 1 '12 at 9:11
add comment

1 Answer

up vote 2 down vote accepted

The "Missing $" error looks a bit if the underscore in your file name leds to errors. But this is perhaps only a side effect. If you get an error also when you remove the underscore you should put the eps and the tex somewhere for download so that other can makes tests.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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