我一直在使用\includegraphics
普通的 TeX,没有任何问题,直到昨天,我更新了 TeXLive 并写入(最少)
\input miniltx
\input graphicx.sty
\includegraphics{espec.png}
\bye
汇编显示
! Undefined control sequence.
\Ginclude@graphics ...\Ginput@path \set@curr@file
{#1}\edef \uq@curr@file {\...
\Gin@ii ...eys {Gin}{#1}\Gin@esetsize \the \toks@
\endgroup \fi
l.6 \includegraphics{espec.png}
然后停了下来。
答案1
这是建议的相同修复方案这里,适用于 Plain。区别在于\makeatletter
变为\catcode`\@=11
,\m@ne
变为-1
。还graphicx.sty
期望@
catcode 为 11,因此我们在加载后移动\catcode`\@=12
( ):\makeatother
\input miniltx
% Start fix
\catcode`\@=11
\def\set@curr@file#1{%
\begingroup
\escapechar=-1
\xdef\@curr@file{\expandafter\string\csname #1\endcsname}%
\endgroup
}
\def\quote@name#1{"\quote@@name#1\@gobble""}
\def\quote@@name#1"{#1\quote@@name}
\def\unquote@name#1{\quote@@name#1\@gobble"}
% End fix
\input graphicx.sty
\catcode`\@=12
\includegraphics{example-image}
\bye