Code
\documentclass{article}
\newcommand*\test[2]{#1\textsuperscript{#2}}
\begin{document}
The player ended as no.~\test{1}{} and her friend came in \test{2}{nd}.
\end{document}
Output
Question
How can I change the \test
command so that I'm abel to switch between one or two arguments?
(I would like to be abel to write \test{1}
instead of \test{1}{}
.)
\test{1}
and\test{2}{nd}
, but I'm recommending not to.{}
arguments. A major aim of the system is to give a consistent interface to arguments. If an argument is optional it should be in square brackets.