\documentclass{book}
\usepackage{nth}
\begin{document}
\nth{3} is not the same as $\nth{3}$
\end{document}
This code works fine for numbers.Now , In the argument if I want to pass III , what should I do?
I want the output as III(in slanting–> I achieved this using Math Mode)rd(in super script)
Best Answer
If I understand your question correctly, then (as has been suggested in comments to the question) I think it is not a standard practice in English to write something like
III^{rd}
, let alone using italicized font, and I would suggest you not to use this.That being said, one way to achieve what you want is to define a command similar to
\nth
, but converting the argument to (upper case) Roman numerals. Three options: one, using roman font for the complete expression; another one using slanted font for the numeral and roman font for the superscript, and the third one, using slanted font for the complete expression:If you want the numeral to be in italics shape, replace
\slshape
with\itshape
in the corresponding definition(s).In my opinion, the two options using slanted font look really ugly; please consider not using those.