[XeTeX] Roman Numerals as stylistic alternatives

enrico.gregorio at univr.it enrico.gregorio at univr.it
Sat Jun 18 21:43:00 CEST 2011


> Hi,
> 
> you totally misunderstood my intentions. I don't want to use 
> neither Ⅰ,  Ⅱ, Ⅲ, Ⅳ, … (u2160-u217f) nor I, II, III, IV, … (letters). I want 
> to use 
> something along "Henri {\fontchangingcommand 4} was a foobar king."
> 
> Is \fontspec capable of doing this?

Of course not, or maybe yes, but limited to numbers from 1 up to 12,
via a proper mapping file. However, with the macros I gave you before,
you can define

\makeatletter
\newcommand\ordinal[1]{\@UniRoman{#1}}
\makeatother

and write "Henri~\ordinal{4}". The tilde is for avoiding a line break. This will
use the character corresponding to the number, if in the range 1–12, otherwise
the number will be constructed from the Roman numerals.

Ciao
Enrico

--
Enrico Gregorio          + Dipartimento di Informatica          + Tel: +39 045 8027937
Enrico.Gregorio at univr.it + Università degli Studi di Verona     +
(gregorio at math.unipd.it) + Strada le Grazie 15 / I-37134 Verona + Fax: +39 045 8027928




More information about the XeTeX mailing list