I disagree with @Mario S. E.' s answer (Nothing personal :-), which proposses to use \text<sth> macros to format the century numbers. I would nearly never use them in the document body, especially when they are used for mark up, as it is the case here. Even mixing them isn't a good idea either. You could instead do:
\documentclass{article}
\def\centuryname{century}
\let\up\textsuperscript
\let\markcent\textsc
\newcommand*{\century}[1]
{\markcent{\uppercase\expandafter{\romannumeral #1\relax}}\up{o} \centuryname}
\begin{document}
\century{20}
\end{document}
(with credits to @Qrrbrbirlbel' s answer).
Edit: Regarding the position of the 'o' etc., try another definition for \up. Replace \let\up\textsuperscript with
\def\up#1{%
\edef\tmp{\the\fontdimen14\textfont2}%
\fontdimen14\textfont2=5.5pt%
\textsuperscript{#1}%
\fontdimen14\textfont2=\tmp%
}
Finally, you could code a little more customizability by
\newcommand*{\up}[2][5.5pt]{%
\edef\tmp{\the\fontdimen14\textfont2}%
\fontdimen14\textfont2=#1%
\textsuperscript{#2}%
\fontdimen14\textfont2=\tmp%
}
which then could be used like \up[height correction]{superscript}.
20°orXXbut notXX°. Are you sure you want to use XX°? – Qrrbrbirlbel Oct 25 '13 at 15:19.biblike "... XIII\textsuperscript{e} siècle...". As an aside: the practice is truly 'medieval', too. Manuscripts (and early printed books) are often heavily abbreviated to save space, so things like ,2ª,3º,4\textsuperscript{us}, or5\textsuperscript{m}are common, agreeing in gender with some other (implied) word in the nominative, accusative, or ablative case. Unless, you are required to do so, I suggest avoiding the practice, and also things like20\textsuperscript{th}. – jon Oct 25 '13 at 17:54