[tex-eplain] Bug(?) in \newcommand
Daniel Henry Luecking
luecking at uark.edu
Wed Sep 12 20:49:29 CEST 2012
The definition of \newcommand in eplain eventually invokes \@newcommand
(see below). This atempts to \edef the macro and leads to errors in simple cases:
Of course the error is
! Argument of \gobble has an extra }
But this is certainly a valid way to define \y, as long as one
does not try to expand its replacement text.
The definition of \newcommand comes from btxmac.tex, so perhaps
there is a reason for bibliographies to use \edef. I have never
used \newcommand in \eplain directly. I only encountered the error
when a supposedly plain.tex compatible file performed a test
and then tried to \newcommand something instead of \def-ing it.
The questionable eplain.tex/btxmac.tex code follows. The \edef
occurs in the first line of \@newcommand, but is only invoked
in the last one:
% The remainder of this long definition is irrelevant.
Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
More information about the tex-eplain