On Wed, 25 Jun 2014, Wolfgang Schuster wrote:


Am 25.06.2014 um 23:20 schrieb Brian R. Landy <br...@landy.cx>:

Out of curiosity, how do you do that (i.e., revert back to lining, and tabular, figures in a table, or even in running text)?

For example, if I do this:

   \starttext
   \bf 12345\par
   \tf 12345\par
   \stoptext

the first line is bold but the second is not. But if I do the same with \os:

   \starttext
   \os 12345\par
   \tf 12345\par
   \stoptext

both lines use old style numbers. Is there a way to switch the current font back to lining figures without reloading the font with \switchtobodyfont or something similar?


The \os command enables oldstyle figures in your font and the setting isn’t reset when you switch to a different font alternative.

\definefontfeature[f:lnum][lnum=yes]
\definefontfeature[f:onum][onum=yes]
\definefontfeature[f:tnum][tnum=yes,pnum=no]
\definefontfeature[f:pnum][pnum=yes,tnum=no]

\setupbodyfont[antykwa-poltawskiego]

\starttext

\starttabulate
\NC onum \NC \feature[+][f:onum] 1234567890 \NC\NR \NC onum + tnum \NC \feature[+][f:onum]\feature[+][f:tnum]1234567890 \NC\NR \NC onum + pnum \NC \feature[+][f:onum]\feature[+][f:pnum]1234567890 \NC\NR
\TB
\NC lnum \NC \feature[+][f:lnum] 1234567890 \NC\NR \NC lnum + tnum \NC \feature[+][f:lnum]\feature[+][f:tnum]1234567890 \NC\NR \NC lnum + pnum \NC \feature[+][f:lnum]\feature[+][f:pnum]1234567890 \NC\NR
\stoptabulate

\stoptext

Wolfgang

This was exactly what I needed, thank you!

Brian
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to