[tex-k] \showthe followed with undefined control sequence misbehaves
Doug McKenna
doug at mathemaesthetics.com
Sat Jul 20 17:29:26 CEST 2024
Karl wrote:
>| That sounds sensible in principle, but I feel quite sure that Knuth
>| would never consider such a change at this point. Changing the behavior
>| of expansion in any way, even with an error involved, would surely cause
>| problems somewhere, somehow. People have nefariously assumed pretty much
>| everything that can be assumed in the last 40 years :). --thanks, karl.
Understood.
The real problem is a user-interface problem. The "Undefined control sequence" error message is not as informative as it should be, because it doesn't also say that the undefined CS is being ignored (especially during expansion) as if it never existed.
TeX hides some of that information in its secondary "H" help message, available in its interactive terminal mode, where it says "... I'll forget about whatever was undefined." But secondary help messages should be unnecessary when a primary error message is properly informative the first time, right when a user doesn't want to be confronted with a puzzle to solve, and needs really good information to continue being productive.
Good error messages take a lot of effort to get right, of course. Sadly, TeX's error messages are not likely to be improved, partly because of the TeX-must-remain-frozen-in-amber philosophy, but also because its macro-expansion-based execution model makes accurate error reporting difficult.
Doug McKenna
More information about the tex-k
mailing list.