\includegraphics 之后的“失控参数”是什么意思?

\includegraphics 之后的“失控参数”是什么意思?

代码是

\includegraphics[width=0.5\paperwidth]{figures/112.jpg}

\includegraphics[scale=0.1]{figures/133}

在 suftesi 文档中。如果注释掉两个 includegraphics,则不会出现错误;它们会产生错误并且不会输出 - 但我看不出哪里}缺少了?如果没有[scale..][width=...]参数,jpg 文件的某些部分会出现在输出 pdf 中。

[5] [6]
Runaway argument?
width=0.5\paperwidth ]{figures/112.jpg} 
./4210action.tex:52: Paragraph ended before \Gin@iii was complete.
<to be read again> 
\par 
l.52 

I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

答案1

如果你加载的是 graphics 而不是 graphicx (with x),就会出现此错误

\documentclass{article}
\usepackage{graphics} %<-- change to graphicx
\begin{document}
\includegraphics[width=0.5\paperwidth]{example-image-a}

\end{document}

答案2

对我来说,删除.aux文件确实解决了类似的错误,当graphicx已经包含。感谢回答。

然而,我在寻找解决方案时首先发现了这个问题。

相关内容