LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
David Carlisle <[log in to unmask]>
Tue, 17 Jun 1997 13:59:21 +0100
text/plain (35 lines)
> \def\uppercase#1{\protect\tmpe@uppercase{#1}}
> \def\tmpe@uppercase#1{\edef\tmpd@uppercase{#1}%

Please don't redefine the \uppercase primitive!!!

\uppercase is fairly useless for making text uppercase. What it's real
purpose is, is as the low level TeX primitive to change the character
code of a character token without changing its catcode.

Hence you find


in inputenc.sty and the rather similar


in dcolumn.sty

Such uses really rely that \uppercase works the way it works.
Any redefinition is likely to break these packages.

Secondly you have applied \edef to a random user-supplied argument.
This is the canoncal `moving argument' and so you should set \protect
so as to give the user some way of preventing commands dying in the
\edef. So the second line above should use \protected@edef rather than
\edef. As \protected@edef ... \uppercase .... is essentially the
definition of \MakeUppercase, you should probably just redefine that
LaTeX command rather than the TeX primitive.