next up previous contents
Next: The `openany' option in Up: Miscellaneous commands, etc Previous: Layout parameters   Contents


Case changing


\MakeUppercase {<text>}
\MakeLowercase {<text>}

TEX provides two primitives \uppercase and \lowercase for changing the case of text. These are sometimes used in document classes, for example to set information in running heads in all capitals.

Unfortunately, these TEX primitives do not change the case of characters accessed by commands like \ae or \aa. To overcome this problem, LATEX provides two new commands \MakeUppercase and \MakeLowercase to do this.

For example:

\uppercase{aBcD\ae\AA\ss\OE} ABCDæÅß
\lowercase{aBcD\ae\AA\ss\OE} abcdæÅß
\MakeUppercase{aBcD\ae\AA\ss\OE} ABCDæÅß
\MakeLowercase{aBcD\ae\AA\ss\OE} abcdæÅß

The commands \MakeUppercase and \MakeLowercase themselves are robust, but they have moving arguments.

The commands use the TEX primitives \uppercase and \lowercase, and so have a number of unexpected `features'. In particular, they change the case of everything (except characters in the names of control-sequences) in their text argument: this includes mathematics, environment names, and label names.

For example:

   \MakeUppercase{$x+y$ in \ref{foo}}
produces $X+Y$ and the warning:
   LaTeX Warning: Reference `FOO' on page ... undefined on ...
In the long run, we would like to use all-caps fonts rather than any command like \MakeUppercase but this is not possible at the moment because such fonts do not exist.

In order that upper/lower-casing will work reasonably well, and in order to provide any correct hyphenation, LATEX2e must use, throughout a document, the same fixed table for changing case. The table used is designed for the font encoding T1; this works well with the standard TEX fonts for all Latin alphabets but will cause problems when using other alphabets.


next up previous contents
Next: The `openany' option in Up: Miscellaneous commands, etc Previous: Layout parameters   Contents
Johannes L. Braams 2003-05-18