Psfrag 错误:扫描@psfragb 的使用时文件结束

Psfrag 错误:扫描@psfragb 的使用时文件结束

我在使用 MacTeX 中的 psfrag 包时遇到了问题。我尝试将 EPS 图形中的文本“Quantity”替换为“Menge”,但不起作用。这是我使用的代码:

\documentclass{article}
\usepackage{graphicx}
\usepackage{color}
\usepackage[utf8]{inputenc}
\usepackage{psfrag}
\begin{document}
\begin{figure}[h]
\centering
\def\\svgwidth{175pt}
\psfrag{Quantity}{Menge}
\input{meinegrafik.eps_tex}
\caption{Demand Elasticity}
\label{fig:my_graphic}
\end{figure}
\end{document}

错误:

! File ended while scanning use of \@psfragb.
<inserted text>
\par
<*> psdfrag.tex
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.
! Emergency stop.
<*> psdfrag.tex
*** (job aborted, no legal \end found)
Here is how much of TeX's memory you used:
1461 strings out of 476025
24902 string characters out of 5790018
1849388 words of memory out of 5000000
21951 multiletter control sequences out of 15000+600000
512287 words of font info for 32 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
57i,2n,62p,202b,125s stack positions out of 10000i,1000n,20000p,200000b,200000s
! ==> Fatal error occurred, no output PDF file produced!

相关内容