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

Don Hosek don.hosek at gmail.com
Thu Jan 6 21:07:13 CET 2022

> 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}


> file.tex: l.112   {}{\fail}

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.



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.

More information about the tex-live mailing list.