# How can I write roman numbers in MathJax?

I need to write roman numbers in MathJax. I've tried almost every way. But, then I decided to copy the symbol itself. But it looks very ugly.

For example,

$$\displaystyle \mathcal {D}^{{\left(II \right)}}_n$$

I tried LaTex syntax. \rom. But, unfortunately it doesn$$$$t work.

Do you mean \mathrm{IX} perhaps? $$\mathrm{IX}$$?

There's a reason why the font family is called "Roman".

• Or the alternative but more archaic {\rm IX}. – ja72 Dec 23 '19 at 20:23

$$\mathcal{D}_n^{\tiny\mathrm{(IX)}}$$ might work ? put \tiny\mathrm{(IX)} in the exponent. That at least makes it look similar size.

• might bold it to make it look better. – Roddy MacPhee Dec 20 '19 at 0:59
• $ \texttt{\tiny} "$ may be a bit too small; if the size'd be reduced, probably just $ \texttt{\small} ".$ $$\begin{array}{|c|c|} \hline \left[\text{none}\right] & \mathcal{D}_{n}^{\left(\mathrm{IX}\right)} \\ \hline \texttt{\small} & \mathcal{D}_{n}^{\small{\left(\mathrm{IX}\right)}} \\ \hline \texttt{\Tiny} &\mathcal{D}_{n}^{\Tiny{\left(\mathrm{IX}\right)}} \\ \hline \texttt{\tiny} &\mathcal{D}_{n}^{\tiny{\left(\mathrm{IX}\right)}} \\ \hline \end{array}$$ – Nat Dec 20 '19 at 9:11
• I was simply making a size comparison with the n . ${}^{\boldsymbol\tiny\mathrm{(IX)}}$ looks closer to the boldness probably – Roddy MacPhee Dec 20 '19 at 9:38
• or resize the n – Roddy MacPhee Dec 20 '19 at 11:46
• So you were trying to get the subscript and superscripts to match in size? I can appreciate the aesthetic motivation behind that, though the superscript's and subscript's sizes differ by so much that it's probably not reasonably viable to make them both about the same size. – Nat Dec 21 '19 at 3:09
• @Nat: \scriptsize works, and would be the semantically correct choice here: $\mathcal{D}_n^{\scriptsize\mathrm{(IX)}}$. In this case, it appears to render slightly smaller than \small ($\mathcal{D}_n^{\small\mathrm{(IX)}}$) but slightly bigger than \Tiny` ($\mathcal{D}_n^{\Tiny\mathrm{(IX)}}$). – Ilmari Karonen Dec 23 '19 at 1:05
• You can also adjust the subscript writing placement with a forced space. – Roddy MacPhee Dec 23 '19 at 11:59
• $\mathcal{D}_{\;n}^{\scriptsize\mathrm{(IX)}}$ – Roddy MacPhee Dec 27 '19 at 17:42