[tex-eplain] Bug(?) in \newcommand

Karl Berry karl at freefriends.org
Thu Sep 13 00:55:36 CEST 2012


Hi Dan,

    The definition of \newcommand comes from btxmac.tex, so perhaps 
    there is a reason for bibliographies to use \edef. 

It's been 20+ years since I wrote that macro, but I can't imagine any
reason why that would be the case.

   \def\@startdef{\expandafter\edef\@commandname}%

Does your failing example work if you just replace the \edef with \def?

It appears to have been that way "since the beginning", at least as of
1995, which is the oldest file I found quickly.  

In general, the btxmac \newcommand was just supposed to be a bare-bones
good-enough-for-bib-files replacement for LaTeX \newcommand.  Since, as
you point out, LaTeX \newcommand certainly doesn't do \edef, it seems
btxmac's shouldn't either.

Thanks,
k


More information about the tex-eplain mailing list