12.07.2015 Views

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

18.14. Number formattingTypeset example 18.1: <strong>TeX</strong>’s minimum number in words (English style)<strong>The</strong> minimum number in <strong>TeX</strong> is minus two billion, one hundred and forty-sevenmillion, four hundred and eighty-three thousand, six hundred and forty-seven (i.e.,-2, 147, 483, 647)Some examples are:\fordinal{3} -> 3rd\fordinal{12341} -> 12, 341st\renewcommand{\ordscript}[1]{\textsuperscript{#1}}\fordinal{1234567} -> 1, 234, 567 th\ordinal{1234567} -> 1234567 thThis is the \ordinal{\value{chapter}} chapter. -> This is the 18 th chapter.<strong>The</strong> characters denoting the ordinal (ordination?) are typeset as the argument of\ordscript, whose default definition is:\newcommand{\ordscript}[1]{#1}As the above examples show, this can be changed to give a different appearance.\nthstring \iststring \iindstring \iiirdstring<strong>The</strong> ordinal characters are the values of the macros \nthstring (default: th) for most ordinals,\iststring (default: st) for ordinals ending in 1 like 21 st , \iindstring (default:nd) for ordinals like 22 nd , and \iiirdstring (default: rd) for ordinals like 23 rd .18.14.2 Named numbers\numtoname{〈number〉}\numtoName{〈number〉}\NumToName{〈number〉}<strong>The</strong> macro \numtoname typesets its 〈number〉 argument using lowercase words. <strong>The</strong> othertwo macros are similar, except that \numtoName uses uppercase for the initial letter of thefirst word and \NumToName uses uppercase for the initial letters of all the words.As examples:\numtoname{12345} -> twelve thousand, three hundred and forty-five\numtoName{12345} -> Twelve thousand, three hundred and forty-five\NumToName{12345} -> Twelve Thousand, Three Hundred and Forty-FiveSource for example 18.1<strong>The</strong> minimum number in <strong>TeX</strong> is \numtoname{-2147483647}(i.e., \fcardinal{-2147483647})333

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!