[texhax] [TeXhax] Latex: dumbing down ?
Reinhard Kotucha
reinhard.kotucha at web.de
Tue Sep 5 00:12:10 CEST 2006
>>>>> "Philip" == Philip TAYLOR <P.Taylor at Rhul.Ac.Uk> writes:
> Reinhard Kotucha wrote:
>> The definition of \@ifundefined is
>>
>> \expandafter \ifx \csname #1\endcsname \relax \expandafter
>> \@firstoftwo \else \expandafter \@secondoftwo \fi
>>
>> Hence, if someone says \@ifundefined{foo}{}{} and tries later
>> \ifx\foo\undefined this will always succeed because \@ifundefined
>> sets undefined cotrol sequences to \relax.
>> You cannot safely use \ifx in LaTeX.
> No no. It is \csname ... \endcsname that "sets undefined control
> sequences to \relax", as every Plain TeX hacker knows
If \@ifundefined is defined as it is, it sets undefined control
sequences to \relax. Full stop. Of course it is actually done by
\csname ... \endcsname. Not only plain tex hackers (whatever this
means) know this.
Cheers,
Reinhard
--
----------------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------
More information about the texhax
mailing list