ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* old style nums
@ 2007-12-31  8:50 Idris Samawi Hamid
  2008-01-01 23:09 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Idris Samawi Hamid @ 2007-12-31  8:50 UTC (permalink / raw)
  To: ntg-context

Dear gang,

What is the official way to get old style numerals in 11pt in mkiv? I'm  
just using lm.

Thnx in advance!

Best
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: old style nums
  2007-12-31  8:50 old style nums Idris Samawi Hamid
@ 2008-01-01 23:09 ` Wolfgang Schuster
  2008-01-02  2:56   ` Idris Samawi Hamid
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2008-01-01 23:09 UTC (permalink / raw)
  To: ntg-context

On Mon, 31 Dec 2007 01:50:04 -0700
"Idris Samawi Hamid" <ishamid@colostate.edu> wrote:

> Dear gang,
> 
> 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.

Mark IV has a new the new option "fontfeatures" and you can use this
to get the oldstyle numbers from the latin modern OT fonts. Option one
is to redefine \os to use the numbers from the main font, you have to
put the following command in your document,
\def\os{\setfontfeature{oldstyle}}, 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.

There is currently no better way to enable oldstyle number for the
whole document except you define your own typescripts and use them.

> Thnx in advance!
> 
> Best
> Idris

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: old style nums
  2008-01-01 23:09 ` Wolfgang Schuster
@ 2008-01-02  2:56   ` Idris Samawi Hamid
  2008-01-02  8:37     ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Idris Samawi Hamid @ 2008-01-02  2:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]

Hi Wolfgang,

On Tue, 01 Jan 2008 16:09:16 -0700, Wolfgang Schuster  
<schuster.wolfgang@googlemail.com> 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" :-)

==========================================
% 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.

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

[-- Attachment #2: type-lmos.tex --]
[-- Type: application/x-tex, Size: 9015 bytes --]

[-- Attachment #3: test-lmos.tex --]
[-- Type: application/x-tex, Size: 2816 bytes --]

[-- Attachment #4: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: old style nums
  2008-01-02  2:56   ` Idris Samawi Hamid
@ 2008-01-02  8:37     ` Wolfgang Schuster
  2008-01-02 14:40       ` Idris Samawi Hamid
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2008-01-02  8:37 UTC (permalink / raw)
  To: ntg-context

On Tue, 01 Jan 2008 19:56:10 -0700
"Idris Samawi Hamid" <ishamid@colostate.edu> wrote:

> Hi Wolfgang,
> 
> On Tue, 01 Jan 2008 16:09:16 -0700, Wolfgang Schuster  
> <schuster.wolfgang@googlemail.com> 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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: old style nums
  2008-01-02  8:37     ` Wolfgang Schuster
@ 2008-01-02 14:40       ` Idris Samawi Hamid
  2008-01-02 15:05         ` Wolfgang Schuster
  2008-01-02 15:06         ` Taco Hoekwater
  0 siblings, 2 replies; 7+ messages in thread
From: Idris Samawi Hamid @ 2008-01-02 14:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 02 Jan 2008 01:37:08 -0700, Wolfgang Schuster  
<schuster.wolfgang@googlemail.com> wrote:

>> 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" :-)

Did you try it? worketh not ;-)

>> ==========================================
% engine=luatex

\setfontfeature{oldstyle}

\starttext

test

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[tnum][tnum=yes,onum=yes]

Hmm, I assumed the order would be [onum=yes,tnum=yes], or does the order  
not matter?

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: old style nums
  2008-01-02 14:40       ` Idris Samawi Hamid
@ 2008-01-02 15:05         ` Wolfgang Schuster
  2008-01-02 15:06         ` Taco Hoekwater
  1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2008-01-02 15:05 UTC (permalink / raw)
  To: ntg-context

On Wed, 02 Jan 2008 07:40:33 -0700
"Idris Samawi Hamid" <ishamid@colostate.edu> wrote:

> On Wed, 02 Jan 2008 01:37:08 -0700, Wolfgang Schuster  
> <schuster.wolfgang@googlemail.com> wrote:
> 
> >> 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" :-)
> 
> Did you try it? worketh not ;-)

It did work for me but I got a error message for the next line,

<errormessage>
error: ...2tex/share/texmf-local/tex/context/base/font-otf.lua:2018:
attempt to index field 'description' (a nil value)
.
l.12

?
</errormessage>

My testfile:

01 % engine=luatex
02
03 \definefontfeature
04   [oldstyle]
05   [liga=yes,kern=yes,tlig=yes,trep=yes,onum=yes] % texligatures=yes,texquotes=yes
06
07 \setfontfeature{oldstyle}
08
09 \starttext
10
11 123456789 
12
13 \stoptext

I could set "tlig=no" and the error message vanishes. 

> >> ==========================================
> % engine=luatex
> 
> \setfontfeature{oldstyle}
> 
> \starttext
> 
> test
> 
> 1234567890
> 
> \stoptext

> >> 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[tnum][tnum=yes,onum=yes]
> 
> Hmm, I assumed the order would be [onum=yes,tnum=yes], or does the order  
> not matter?

I think not in this case, but a few OpenType features disable other
(e.g. onum and lnum) and the order could be in souch a case.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: old style nums
  2008-01-02 14:40       ` Idris Samawi Hamid
  2008-01-02 15:05         ` Wolfgang Schuster
@ 2008-01-02 15:06         ` Taco Hoekwater
  1 sibling, 0 replies; 7+ messages in thread
From: Taco Hoekwater @ 2008-01-02 15:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Idris Samawi Hamid wrote:
> On Wed, 02 Jan 2008 01:37:08 -0700, Wolfgang Schuster  
> <schuster.wolfgang@googlemail.com> wrote:
> 
>>> 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" :-)
> 
> Did you try it? worketh not ;-)

>>> ==========================================
> % engine=luatex
> 
> \setfontfeature{oldstyle}
> 
> \starttext
> 
> test
> 
> 1234567890
> 
> \stoptext


Possibly because the predefined one does not have "mode=node",
which seems important. I get:

error: /opt/tex/texmf-local/tex/context/base/font-otf.lua:2019: attempt 
to index field 'description' (a nil value)

followed by an assertion error.


Best wishes,
Taco
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-02 15:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-31  8:50 old style nums Idris Samawi Hamid
2008-01-01 23:09 ` Wolfgang Schuster
2008-01-02  2:56   ` Idris Samawi Hamid
2008-01-02  8:37     ` Wolfgang Schuster
2008-01-02 14:40       ` Idris Samawi Hamid
2008-01-02 15:05         ` Wolfgang Schuster
2008-01-02 15:06         ` Taco Hoekwater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).