I use pdfTex and had a file with included graphics, by using

\input miniltx.tex
\input graphicx.tex

and all worked well.

Now I get a mistake like

! Forbidden control sequence found while scanning use of \@firstoftwo.
<inserted text> 
<to be read again> 
l.558 \@ifundefined{stockwidth}{\newdimen

What is the use of \stockwidth and \stockheight and why are they not defined in /texlive/2022/texmf-dist/tex/latex/graphics-def/pdftex.def itself?

Edit: If pdftex.def says:


why is it not defined after this?


1 Answer 1


You are using an old version of miniltx the current version does not error.

You ask why \stockwidth is not defined after


Note the error is not an undefined command and not about \stockwidth it is \newdimen which is the "! Forbidden control sequence".

In plain TeX \newdimen is declared as \outer, an entirely useless feature specifically to raise an error if the command is used in command arguments or conditional sections of code. miniltx now removes the \outer definition. \newdimen has never been \outer in LaTeX2e, so this is one more latex-ism that got added to miniltx to support the latest graphics code.

Updating texlive should fix the error.

  • Thanks, that was it. I used the older version of miniltx.
    – user284656
    Commented Nov 10, 2022 at 23:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .