[XeTeX] Beginner's question - font for numbers

Diederick C. Niehorster dcnieho at gmail.com
Fri Oct 9 12:32:02 CEST 2009


Hmm, just thinking. I have never used these xetex features myself, but
couldn't you do somehting like this:
- make numbers active characters
- define them as wrapped in some font switching code, like the \old
command below.

I have no idea how to go about this, but that should be possible
right? Then of course, every number in your document would be changed.

Best,
Dee

On Fri, Oct 9, 2009 at 5:56 PM, Peter Dyballa <Peter_Dyballa at web.de> wrote:
>
> Am 08.10.2009 um 18:30 schrieb George:
>
>> Hello - is there a way to use a different font just for numbers, in a
>> non-math text?
>
>
> Yes: \newfontfamily\digitsfont{Times 10 Roman Small Caps and Oldstyle
> Figures}. Then:
>
> This short text has {\digitsfont 7} words and {\digitsfont 2} numbers.
>
> You could also create a command \DeclareRobustCommand{\old}[1]{{\digitsfont
> #1}} and use:
>
> This short text has \old{7} words and \old{2} numbers.
>
>
> This would be the way when the font you want to use does not have lining
> numbers for the digits but oldstyle figures, like Venturis ADF Cd Style in
> TeX Live.
>
> --
> Greetings
>
>  Pete
>
> We have to expect it, otherwise we would be surprised.
>
>
>
>


More information about the XeTeX mailing list