0

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> 
                \par 
<to be read again> 
                   \newdimen 
l.558 \@ifundefined{stockwidth}{\newdimen
                                         \stockwidth}{}
? 

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:

\@ifundefined{stockwidth}{\newdimen\stockwidth}{}
\@ifundefined{stockheight}{\newdimen\stockheight}{}

why is it not defined after this?

3

1 Answer 1

2

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

You ask why \stockwidth is not defined after

\@ifundefined{stockwidth}{\newdimen\stockwidth}{}

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.

1
  • 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 .