[NTG-context] \os

Joshua Krämer joshua.kraemer at gmail.com
Sun Aug 3 19:26:23 CEST 2014

On 2014-08-02, 22:36, Procházka Lukáš wrote:

> OK, thanks for explanation.
> This means that one has to switch to \os only when a number is to be
> printed.
> So when I want all numbers in the document to be old-style (and also
> ligatures etc. be kept), I have to:
> 1) switch to {\os } when writing a number manually,
> 2) define "old-style-making-commands" wherever numbers are generated
> automatically, i.e. e.g.:

Just do it the way Wolfgang said, using features:

\definefontfeature [default] [default] [lnum=yes, onum=no]
\definefontfamily [latinmodern] [serif] [Latin Modern Roman]
\setupbodyfont[latinmodern, 12pt]

\definefontfeature[oldstyle][lnum=no, onum=yes]


Regular figures: 0123456789

{\addfeature[oldstyle] Local oldstyle figures: 0123456789}


This way, lining figures are enabled by default, and you can change to
oldstyle figures locally.  if you wna tit the other way round, just
change the default feature to "onum=yes, lnum=no" and create a new
feature for local lining figures with "onum=no, lnum=yes".

Kind regards,

More information about the ntg-context mailing list