[texhax] Renewcommand not working for \Lambda and \Sigma
Philip TAYLOR
P.Taylor at Rhul.Ac.Uk
Tue Nov 29 16:23:40 CET 2005
KKThird at Yahoo.Com wrote:
> Hello all.
>
> I would like to redefine the capital Greek letters so that they can be
> used without worrying about putting $ around them in in-line text. I was
> able to do this fine for all letters except for \Lambda and \Sigma
> (uppercase). The following is the code I used in the preamble of my
> document.
>
> \renewcommand{\Lambda}{\ensuremath \Lambda\xspace}
> \renewcommand{\Sigma}{\ensuremath\Sigma\xspace}
>
> What happens is that my LaTeX hits waht appears to be an infinite loop
> and then runs out of memory and then shuts down. Any thoughts on why
> \Lambda and \Sigma are the only ones (upper or lower case) that are
> giving me such trouble?
No, I would expect the problem to occur for all maths characters,
since you are defining a macro (\Lambda, \Sigma) in terms of itself.
What you may need to do is to add one level of redirection --
\let \LamportsLambda = \Lambda
\let \LamportsSigma = \Sigma
\renewcommand \Lambda {\ensuremath \LamportsLambda \xspace}
\renewcommand \Sigma {\ensuremath \LamportsSigma \xspace}
which will remove the infinite recursion (I hope !). Are you sure
that the other Greek letters that you are trying to (re-)define
actually have /a priori/ definitions ? The TeXbook suggests that
many don't ...
Philip Taylor
More information about the texhax
mailing list