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

Karl Berry karl at freefriends.org
Thu Aug 19 01:09:22 CEST 2004


Hi Olaf (I guess this one is for you),

The \scantokens etex construct and --file-line-error option apparently
interact in strange ways.

First, consider:
  etex --file-line-error '\scantokens{\junky}'
Output:
  ...
  ^^@:1: Undefined control sequence.

I can imagine why the ^^@ is there, but I don't think it's the right
thing.  Perhaps the behavior should be the same as without \scantokens,
namely revert back to regular messages:
  etex --file-line-error '\junky}'
Output:
  ...
  ! Undefined control sequence.
  <*> \junky


Second, and more important, if \scantokens is erroneously used from
within a file, the error refers to the line number within the scantokens
rather than the line number of the containing file.  Create a file
junk.tex containing, say, two blank lines and \scantokens{\junky}:
  echo >junk.tex
  echo >>junk.tex
  echo '\scantokens{\junky}' >>junk.tex

Then:
  etex --file-line-error junk.tex
Output:
  ???:1: Undefined control sequence.

I think that should be "junk.tex:3", not "???:1".

Thanks,
karl



More information about the tex-live mailing list