Command/convertnumber

From ConTeXt wiki

\convertnumber

Syntax

\convertnumber{...}{...}
{...} conversion
{...} number


Description

Convert a number into a different form, e.g. to Roman numerals, bullets, etc.

{..conversion..} - defines the new form {..number..} - is the number to convert

The conversion commands are defined in core-con.mkii and core-con.mkiv

The main conversions (there are others, see the source code) include:

{a} = characters

{A} = Characters

{AK} = smallcapped characters

{KA} = smallcapped characters

{n} = numbers

{N} = Numbers

{m} = mediaeval

{i} = roman numerals

{I} = Roman numerals

{r} = roman numerals

{R} = Roman numerals

{KR} = smallcapped roman numerals

{RK} = smallcapped roman numerals

{g} = greek numerals

{G} = Greek numerals

{o} = oldstyle numerals

{O} = oldstyle numerals

{or} = oldstyle roman numerals

{arabicnumerals}

{persiannumerals}

{month} = long month name

{month:mnem} = short month name

{words} = one, two, three, ... {Words} = One, Two, Three, ...

{set 0} = symbols [bullet, dash, star, triangle ...]

{set 1} = symbols [*, **, ***, dag, ...]

{set 2} = symbols [*, dag, ddag, **, dagdag ...]

{set 3} = symbols [*, **, ***, ...]

Examples

Built-in conversion set demo

\dorecurse {8}{\convertnumber{set 0}{#1}\quad}\par
\dorecurse {9}{\convertnumber{set 1}{#1}\quad}\par
\dorecurse{12}{\convertnumber{set 2}{#1}\quad}\par
\dorecurse{15}{\convertnumber{set 3}{#1}\quad}\par

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: