<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Actually trying this out, I see the problem. The feature is implemented to produce the output in the wrong place:<div class=""><br class=""></div><div class="">Without the flag, the output is, e.g.:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">! Undefined control sequence.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">l.16 \qognbo</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">With the flag the output is:</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">./xx.tex:16: Undefined control sequence.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">l.16 \qognbo</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></span></div><div class="">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.</div><div class=""><br class=""></div><div class="">-dh<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 6 Jan 2022, at 14:31, David Carlisle <<a href="mailto:d.p.carlisle@gmail.com" class="">d.p.carlisle@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 6 Jan 2022 at 20:10, Don Hosek <<a href="mailto:don.hosek@gmail.com" class="">don.hosek@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> As your document errors in the preamble, providing an MWE is really<br class="">
> easy. At least provide the full log until the error so that one has<br class="">
> at least a chance to identify the package.<br class="">
<br class="">
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<br class="">
<br class="">
> l.112   {}{\fail}<br class="">
<br class="">
to <br class="">
<br class="">
> file.tex: l.112   {}{\fail}<br class=""></blockquote><div class=""><br class=""></div><div class="">that is already available as --file-line-error  command line option in all texlive engines.</div><div class=""><br class=""></div><div class="">David</div><div class=""><br class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br class="">
We can do this by modifying s.313 so that it does:<br class="">
<br class="">
> print(input_stack[base_ptr].name_field); print_nl(“l.”); print_int(line);<br class="">
<br class="">
instead of <br class="">
<br class="">
> print_nl(“l.”); print_int(line);<br class="">
<br class="">
Unless there’s some compelling reason not to, this seems like something that could/should have been done long ago.<br class="">
<br class="">
-dh<br class="">
<br class="">
——<br class="">
<br class="">
1. I had originally thought that this would need to be an eTeX extension but I see that Knuth writes:<br class="">
<br class="">
> This routine should be changed, if necessary, to give the best possible indication of where the current line resides in the input file.<br class="">
<br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></div></body></html>