LaTeX 插入图片失败(引擎pdflatex)
\includegraphics
使用 figure 环境本身可正常编译,只使用\centering
时 \caption
可正常插入。
增加 \includegraphics[width=10cm]{..}
插入png图片时,报错100行,第101行报 “Too many errors. TeX stopped. ”
(已 \usepackage{graphicx}
,不是旧包 graphics 的问题)
几种报错语句重复出现,可能是循环错。
“Missing endcsname inserted. ”
第一个错: Missing endcsname inserted. [ \includegraphics{j5百分点与f55}]
后续报错:Extra else. [ \includegraphics{j5百分点与f55}]
Use of CJK@@check@next doesn't match its definition. [ \includegraphics{j5百分点与f55}]
其他错误:Extra }, or forgotten endgroup. [ \includegraphics{j5百分点与f55}]
Missing control sequence inserted. [ \includegraphics{j5百分点与f55}]
Extra \endcsname. [ \includegraphics{j5百分点与f55}]
最后几行中首次出现(也是唯一一句指向图片文件问题)LaTeX Error: File `j5百分点与f55' not found. [ \includegraphics{j5百分点与f55}]
症结:中文路径(文件名)
猜测 endcs 意指 encodings ,联系CJK,修改文件名为英文后,成功编译。
(示意GIF动图仅作装饰,并非上文插入的png图片)