# 1st, 2nd and i-th?

Assume I wish to refer to the i-th object, or the n-th function out of some set, where i and n are letters and not numbers (as in "Multiply the $j$th row with the $i$th column and store the result in the $k$th memory cell, where $k=i+j$")

How do you suggest to write it?

$n$th is just confusing, $n$-th seems weird, and $n^{\text{th}}$, which is my current choice, is (pardon me) simply ugly.

Any suggestions?

• My preferred form is "$n$-th". – Will Robertson Feb 13 '11 at 8:23
• [After playing with it a little today] One option that makes things bearable (at least in my eyes) is $n^{\text{\tiny th}}$. – Ran G. Feb 14 '11 at 2:40
• I think we've had this before... – Seamus Apr 4 '11 at 16:50
• Note that the meaning of the question is where "n" is a letter , rather than a number (e.g. the "i-th" element, the k-th index and the n-th dimension). The other question is specific to numbers (e.g., 1st, 2nd, etc.). – Ran G. Jun 4 '12 at 3:10
• @RanG. I agree. My preferred forms would be "multiply row~$j$ with column~$i$" or "multiply the $j$-th row with the $k$-th column". The "th" at exponent is too ambiguous in a math context (and simply ugly in general). – egreg Jun 5 '12 at 10:54

In my experience $n$th is most widely used (like here). Personally I don't think it's ugly compared to the other two options and I think it's quite readable.

• especially with "i", it looks like a typo of "with" (: – Ran G. Feb 13 '11 at 7:28
• In spite of this being the most widely used option, I often find myself using $n$-th. I'm not sure why exactly, possibly it is because I use $n$-Bonacci, $\beta$-expansion etc. quite a lot. – yo' Jan 10 '13 at 10:20
• $$n$$th may be more correct if you use LaTeX. – N.N. Jan 10 '13 at 11:11

$n$th is compatible with the command \nth{} which is called-upon by the package nth...

\documentclass{book}
\usepackage{nth}
\begin{document}
\nth{3} is not the same as $\nth{3}$
\end{document}


b.t.w. as far as I know this command only work with numbers...

• Yeah, I can't make \nth{$i$} work, sadly. – Juno Woods Jul 10 '14 at 19:57
• How could they not make \nth work with \nth{$n$)?! – Tim Kuipers Aug 27 '19 at 21:37

AMS Style Guide has a strong opinion on this one.

See section 12.7.5.3. $n^{\text{th}}$ is the best if you want to write nth in TEX.

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. I don't want to disturb you, but (1) this was already proposed in the question itself, so as long as you don't accompany it with any relevant sources, it doesn't bring anything new to the topic, and (2) this is the second most ugly solution, after $n^{\text{\tiny th}}$, so very far from being the best. – yo' Oct 2 '14 at 20:12
• $n^{\textnormal{th}}$ does not require any package! – Say OL Apr 18 '18 at 4:06
• Why is it the best? Why is it better than the other answers? – jvriesem Jul 29 at 16:31