I tried to define \th
to put the letters "th" in superscript for ordinal numbers. LaTeX tells me that \th
is already defined. How is it defined? Would it be really bad to redefine it?
[Tex/LaTex] “Command \th already defined.”
macros
macros
I tried to define \th
to put the letters "th" in superscript for ordinal numbers. LaTeX tells me that \th
is already defined. How is it defined? Would it be really bad to redefine it?
Best Answer
If you run
you get
\th
is defined in the kernel asand produces the
thorn
(a letter in the Old English, Gothic, Old Norse and modern Icelandic alphabets, as well as some dialects of Middle English.)Yes, it's in general a bad idea to redefine an already defined macro and even more a kernel one (with the possible exception, in some cases, that you know exactly what you are doing and why you are doing it); that's why
\newcommand
(unlike\def
) checks to see first if the command is already defined. I'd suggest you to choose another name for your command (\Th
, for example).If you, however, insist on redefining
\th
(let's say you consider that you won't need the thorn and you are sure that your redefinition won't have undesired effects beyond suppressing access to the thorn), at least I'd suggest you to save the original definition first:In your particular case, place "th" for ordinals, you could use the
fmtcount
package: