[tex-live] \scantokens and --file-line-error

Stepan Kasal kasal at ucw.cz
Thu Aug 19 09:29:02 CEST 2004


Hello,

On Thu, Aug 19, 2004 at 01:29:41AM +0200, David Kastrup wrote:
> This is e-TeXk, Version 3.141592-2.1 (Web2C 7.5.2)
>  %&-line parsing enabled.
>  (/usr/local/TeX/texmf/web2c/cp8bit.tcx)
> entering extended mode
> (./junk.tex
> ! Undefined control sequence.
> l.1 rat\junky
>              
> l.2 \scantokens\expandafter{\woozle \junky}
>                                            
> ? 
> 
> 
> Actually, this is about the most unpleasant error message combination
> I can imagine.  It will throw AUCTeX completely off the track.

I agree that it's very hard to parse this message by a program.

But when a human sees a message like:

! Missing control sequence inserted.
<inserted text>
                \inaccessible
<to be read again>
                   r
l.14 ... the section entitled {\fam =\ttfam \def r
                                                  m{tt}\tentt \char 34}GNU
\scanmacro ...ceisspace \scantokens {#1\endinput }
                                                  \endgroup
\insertcopying ...ent = 0pt \scanexp \copyingtext
                                                  \endgroup
l.51 \insertcopying

?


There is no doubt that the problem is on line 51 of the current file.

Thus I beleive Karl's suggestion was correct, the error message should point
to the current line of innermost *real* input file:

> karl at freefriends.org (Karl Berry) writes:
> > I think that should be "junk.tex:3", not "???:1".

Thank you very much, Karl, for preparing this detailed bug report.

Stepan Kasal



More information about the tex-live mailing list