Provides a function #nth()
which takes a number and returns it suffixed by an english ordinal.
This package is named after the nth LaTeX macro by Donald Arseneau.
Usage
Include this line in your document to import the package.
#import "@preview/nth:0.2.0": nth
Then, you can use #nth()
to markup ordinal numbers in your document.
For example, writing #nth(1)
shows 1st,
#nth(2)
shows 2nd,
#nth(3)
shows 3rd,
#nth(4)
shows 4th,
and #nth(11)
shows 11th.
Please use version 0.2.0 as version 0.1.0 is broken! See issue here (thanks to jeffa5)._
TODO
- Pass argument to choose whether or not to put ordinals in superscript.