On Tue, 01 Jan 2008 19:56:10 -0700
"Idris Samawi Hamid" <[EMAIL PROTECTED]> wrote:

> Hi Wolfgang,
> 
> On Tue, 01 Jan 2008 16:09:16 -0700, Wolfgang Schuster  
> <[EMAIL PROTECTED]> wrote:
> 
> >> What is the official way to get old style numerals in 11pt in mkiv? I'm
> >> just using lm.
> >
> > It depends what do you want to achieve, local changes can be done with
> > \os, but this will use numbers from the math font.
> 
> That's exactly why \os is almost useless (it messes up itemizations and  
> other stuff); better to \switchtotypeface, even for local changes.
> 
> > option two is to write
> > \setfontfeature{oldstyle} in the preamble of your document and ConTeXt
> > use oldstyle numbers by default if present in the current font.
> 
> You also have to define "oldstyle" :-)

No, you don't have to, because oldstyle is predefined in type-ini.tex,
two other predefined fontfeatures are "default" and "smallcaps" :-)

> ==========================================
> % engine=luatex
> 
> \definefontfeature
>    [oldstyle]
>    [mode=node,language=dflt,script=latn,onum=yes,tnum=yes]
> 
> \setfontfeature{oldstyle}
> 
> \starttext
> 
> 1234567890
> 
> \stoptext
> ==========================================
> 
> > There is currently no better way to enable oldstyle number for the
> > whole document except you define your own typescripts and use them.
> 
> I spent hours today writing and debugging a huge typescript for lm (all  
> those optical sizes, since i could not for the life of me get it to  
> piggy-back the def's in type-siz). I just got it working flawlessly a few  
> minutes ago -- sublime, a work of art even -- then I get your message  
> which would have saved me hours of work! I just needed that one command!!!
> 
> You're an angel, just wish I got this this morning ;-)
> 
> Best wishes
> Idris
> 
> PS Note that tnum (tabular version) looks better than onum alone, but is a  
> function of onum in the font so cannot be invoked unless onum is invoked  
> first.

\definefontfeature[onum][onum=yes]
\definefontfeature[lnum][lnum=yes]
\definefontfeature[tnum][tnum=yes,onum=yes]
\definefontfeature[pnum][pnum=yes]

\starttext

\setfontfeature{onum}123456789\par
\setfontfeature{lnum}123456789\par
\setfontfeature{tnum}123456789\par
\setfontfeature{pnum}123456789\par

\stoptext

Wolfgang
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to