I have a string stored in a variable \word, and I want to store its upper case counterpart in another variable \WORD. If I try
\def\WORD{\MakeUppercase{\word}}
\show\WORD
then the message generated by \show is \MakeUppercase {abc}. Presumably I need to adjust the order of expansion in the first line. How do I do this?
! Undefined control sequence. <argument> \def \WORD {abc}– Ian Thompson Mar 10 '11 at 09:52\MakeUppercasetries to expand everything. Let me think a bit. A short solution is to replace\MakeUppercaseby\uppercase, but it's not optimal. – Bruno Le Floch Mar 10 '11 at 10:19\expandaftertrying to figure out my own solution, only to find out that\MakeUppercaseexpands its own argument. Putting the\gdefinside the\MakeUppercasehad eluded me. – Matthew Leingang Mar 10 '11 at 13:27\MakeUppercaseenclosed the whole definition in{...}, rather than using the standard\begingroup...\uppercase{\endgroup...}. – Bruno Le Floch Mar 10 '11 at 14:11\MakeUppercase– Bruno Le Floch Mar 11 '11 at 00:48