[tex-k] Is this a bug or just an inconsistency?

Doug McKenna doug at mathemaesthetics.com
Sat Mar 7 02:10:36 CET 2020


Shreevatsa - 

Excellent advice. 

Unfortunately, when one (well, me) builds a mental model of what's (not) going on, it gets in the way, bee-in-the-bonnet-wise, of how to devise the right scientific experiment to debug something. 

I don't write a lot of TeX source code. I just work to interpret it. :-) 

- Doug Mck. 



From: "Shreevatsa" <shreevatsa.public at gmail.com> 
To: "doug" <doug at mathemaesthetics.com> 
Cc: "Karl Berry" <karl at freefriends.org>, "tex-k" <tex-k at tug.org> 
Sent: Friday, March 6, 2020 5:55:32 PM 
Subject: Re: [tex-k] Is this a bug or just an inconsistency? 

You probably know this, but eTeX has a \tracingassigns=1 that would have helped debug here: for \def\csname\endcsname{FOOBAR} it prints 
{changing \csname=\csname} 
{into \csname=macro:\endcsname ->FOOBAR} 

and for \expandafter\def\csname\endcsname{FOOBAR} it prints 

{changing \csname\endcsname=undefined} 
{into \csname\endcsname=\relax} 
{changing \csname\endcsname=\relax} 
{into \csname\endcsname=macro:->FOOBAR} 

so you can see which macros are being set to what definitions. Something like this (maybe with some [ https://tug.org/TUGboat/tb35-2/tb110mckenna.pdf | changes ] to the output format) is useful to have. 


On Fri, 6 Mar 2020 at 15:51, Doug McKenna < [ mailto:doug at mathemaesthetics.com | doug at mathemaesthetics.com ] > wrote: 


Karl - 

Yes, I think that answers the question (i.e., it's my misunderstanding). 

So it's treating |\endcsname| as a delimiting matching token for the macro's (non) argument collection. 

Ah, TeX. It's amazing how one can write TeX code that seems to make complete sense, yet have it mean something entirely different. 


Thanks! 

- Doug McK. 

----- Original Message ----- 
From: "Karl Berry" < [ mailto:karl at freefriends.org | karl at freefriends.org ] > 
To: "doug" < [ mailto:doug at mathemaesthetics.com | doug at mathemaesthetics.com ] > 
Cc: "tex-k" < [ mailto:tex-k at tug.org | tex-k at tug.org ] > 
Sent: Friday, March 6, 2020 4:18:42 PM 
Subject: Re: [tex-k] Is this a bug or just an inconsistency? 

\def\csname\endcsname{FOOBAR} 

Do you mean 
\expandafter\def\csname\endcsname{FOOBAR} 
? I think the above is redefining \csname, not the null CS. 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-k/attachments/20200306/66fac23a/attachment.html>


More information about the tex-k mailing list.