"! Undefined control sequence. <argument> \fail" after update. But what package?

Don Hosek don.hosek at gmail.com
Fri Jan 7 02:45:09 CET 2022


Actually trying this out, I see the problem. The feature is implemented to produce the output in the wrong place:

Without the flag, the output is, e.g.:

! Undefined control sequence.
l.16 \qognbo

With the flag the output is:

./xx.tex:16: Undefined control sequence.
l.16 \qognbo

This indicates that it was put into the definition of print_err (which has no indication that modifying it is a valid extension of TeX) instead of show_context (which does have that indication), and it really does belong in show_context just as a matter of logic and semantics.

-dh

> On 6 Jan 2022, at 14:31, David Carlisle <d.p.carlisle at gmail.com> wrote:
> 
> 
> 
> On Thu, 6 Jan 2022 at 20:10, Don Hosek <don.hosek at gmail.com <mailto:don.hosek at gmail.com>> wrote:
> > As your document errors in the preamble, providing an MWE is really
> > easy. At least provide the full log until the error so that one has
> > at least a chance to identify the package.
> 
> It occurs to me that the means by which TeX identifies the location of an error is not so great when many input files are involved (especially with nested \input commands). Perhaps there should be a change to the output[1] of an error location from
> 
> > l.112   {}{\fail}
> 
> to 
> 
> > file.tex: l.112   {}{\fail}
> 
> that is already available as --file-line-error  command line option in all texlive engines.
> 
> David
> 
> 
> We can do this by modifying s.313 so that it does:
> 
> > print(input_stack[base_ptr].name_field); print_nl(“l.”); print_int(line);
> 
> instead of 
> 
> > print_nl(“l.”); print_int(line);
> 
> Unless there’s some compelling reason not to, this seems like something that could/should have been done long ago.
> 
> -dh
> 
> ——
> 
> 1. I had originally thought that this would need to be an eTeX extension but I see that Knuth writes:
> 
> > This routine should be changed, if necessary, to give the best possible indication of where the current line resides in the input file.
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-live/attachments/20220106/5f0bf171/attachment.html>


More information about the tex-live mailing list.