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

Shreevatsa R shreevatsa.public at gmail.com
Sat Mar 7 01:55:32 CET 2020


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 changes
<https://tug.org/TUGboat/tb35-2/tb110mckenna.pdf> to the output format) is
useful to have.


On Fri, 6 Mar 2020 at 15:51, Doug McKenna <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" <karl at freefriends.org>
> To: "doug" <doug at mathemaesthetics.com>
> Cc: "tex-k" <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/9f9093a4/attachment.html>


More information about the tex-k mailing list.