ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \os
@ 2014-08-01 16:39 Procházka Lukáš Ing. - Pontex s. r. o.
  2014-08-01 16:51 ` \os Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2014-08-01 16:39 UTC (permalink / raw)
  To: ConTeXt

Hello,

the command \os turns old-style numbers on.

How to turn it off (when being on initially)?

TIA.

Best regards,

Lukas


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

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


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

* Re: \os
  2014-08-01 16:39 \os Procházka Lukáš Ing. - Pontex s. r. o.
@ 2014-08-01 16:51 ` Wolfgang Schuster
  2014-08-02  8:51   ` \os Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2014-08-01 16:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 01.08.2014 um 18:39 schrieb Procházka Lukáš Ing. - Pontex s. r. o. <LPr@pontex.cz>:

> Hello,
> 
> the command \os turns old-style numbers on.
> 
> How to turn it off (when being on initially)?

When you have a font which uses old style numerals by default you can disable them by enabling lining numbers because you load the font.

Below is a example with one of my own fonts which use old style numbers by default.

\definefontfeature[default][default][lnum=yes]

\setupbodyfont[calluna]

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


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

* Re: \os
  2014-08-01 16:51 ` \os Wolfgang Schuster
@ 2014-08-02  8:51   ` Procházka Lukáš Ing. - Pontex s. r. o.
  2014-08-02 17:07     ` \os Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2014-08-02  8:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Hello,

my case may be a bit more complicated;
it uses an environment file which uses \os in it.

So let's have:

----
\definefontfeature[default][default][onum=no,lnum=yes]

% In fact, in a separate environment file >>
\setupbodyfont[palatino,11pt]
\os
% In fact, in a separate environment file <<

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

\starttext
   A:123

   \os
   B:123

   \definefontfeature[default][default][onum=no,lnum=yes]
   C:123
\stoptext
----

So I'd expect (or I'd like to achieve) lining numbers at least in "C:123" (but also in "A:123"; and in page numbers),
but I'm getting old-style numbers at all three cases ("A:123", "B:123" and "C:123").

IOW, I need to suppress the \os feature of the environment file, no matter whether just before or just after it has been included.

Ho to do it?

Lukas


> Below is a example with one of my own fonts which use old style numbers by default.
>
> \definefontfeature[default][default][lnum=yes]
>
> \setupbodyfont[calluna]
>
> \starttext
> 0123456789
> \stoptext


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

[-- Attachment #2: t.mkiv --]
[-- Type: application/octet-stream, Size: 365 bytes --]

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

% In fact, in a separate environment file >>
\setupbodyfont[palatino,11pt]
\os
% In fact, in a separate environment file <<

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

\starttext
  A:123

  \os
  B:123

  \definefontfeature[default][default][onum=no,lnum=yes]
  C:123
\stoptext

[-- Attachment #3: t.pdf --]
[-- Type: application/pdf, Size: 5361 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \os
  2014-08-02  8:51   ` \os Procházka Lukáš Ing. - Pontex s. r. o.
@ 2014-08-02 17:07     ` Wolfgang Schuster
  2014-08-02 20:36       ` \os Procházka Lukáš
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2014-08-02 17:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 02.08.2014 um 10:51 schrieb Procházka Lukáš Ing. - Pontex s. r. o. <LPr@pontex.cz>:

> Hello,
> 
> my case may be a bit more complicated;
> it uses an environment file which uses \os in it.
> 
> So let's have:
> 
> ----
> \definefontfeature[default][default][onum=no,lnum=yes]
> 
> % In fact, in a separate environment file >>
> \setupbodyfont[palatino,11pt]
> \os
> % In fact, in a separate environment file <<
> 
> \definefontfeature[default][default][onum=no,lnum=yes]
> 
> \starttext
>  A:123
> 
>  \os
>  B:123
> 
>  \definefontfeature[default][default][onum=no,lnum=yes]
>  C:123
> \stoptext
> ----
> 
> So I'd expect (or I'd like to achieve) lining numbers at least in "C:123" (but also in "A:123"; and in page numbers),
> but I'm getting old-style numbers at all three cases ("A:123", "B:123" and "C:123").
> 
> IOW, I need to suppress the \os feature of the environment file, no matter whether just before or just after it has been included.
> 
> Ho to do it?

Don’t use the \os command this way because the command is only meant to be used on the form {\os 1234} where you put braces around the numbers you want to change. When you use the \os command as shown above you get problems because ligatures, kerning etc. are disabled by the command.

\starttext

AV TA fi ffi fl ffl

{\os AV TA fi ffi fl ffl}

\stoptext


A different method to enable old style figures is to use the \feature command which enables the feature without canceling ligatures etc.

\definefontfeature[f:oldstyle][onum=yes]

\starttext

0123456789 {\os 0123456789} 0123456789

0123456789 \feature[+][f:oldstyle]0123456789 \feature[-][f:oldstyle]0123456789

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

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

* Re: \os
  2014-08-02 17:07     ` \os Wolfgang Schuster
@ 2014-08-02 20:36       ` Procházka Lukáš
  2014-08-03 17:26         ` \os Joshua Krämer
  2014-08-03 18:48         ` \os Wolfgang Schuster
  0 siblings, 2 replies; 8+ messages in thread
From: Procházka Lukáš @ 2014-08-02 20:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

On Sat, 02 Aug 2014 19:07:43 +0200, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

> Don’t use the \os command this way because the command is only meant to be used on the form {\os 1234} where you put braces around the numbers you want to change. When you use the \os command as shown above you get problems because ligatures, kerning etc. are disabled by the command.

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.:
	- head commands (sections, chapters...),
	- enumerator commands (which use numbers),
	- page numbering commands,
	- href commands (which generate texts like "see section 1.2.3 on page 123").

It seems to me be a little "labor of Sisyphus" at the moment.

(But it's clear one would have to enclose manually entered numbers to {\os } or similar structure anyway.)

Thanks anyway,

Lukas

> \starttext
>
> AV TA fi ffi fl ffl
>
> {\os AV TA fi ffi fl ffl}
>
> \stoptext
>
>
> A different method to enable old style figures is to use the \feature command which enables the feature without canceling ligatures etc.
>
> \definefontfeature[f:oldstyle][onum=yes]
>
> \starttext
>
> 0123456789 {\os 0123456789} 0123456789
>
> 0123456789 \feature[+][f:oldstyle]0123456789 \feature[-][f:oldstyle]0123456789
>
> \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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \os
  2014-08-02 20:36       ` \os Procházka Lukáš
@ 2014-08-03 17:26         ` Joshua Krämer
  2014-08-03 18:48         ` \os Wolfgang Schuster
  1 sibling, 0 replies; 8+ messages in thread
From: Joshua Krämer @ 2014-08-03 17:26 UTC (permalink / raw)
  To: ntg-context-wvrSQK3plZs

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]

\starttext

Regular figures: 0123456789

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

\stoptext


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,
Joshua


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

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

* Re: \os
  2014-08-02 20:36       ` \os Procházka Lukáš
  2014-08-03 17:26         ` \os Joshua Krämer
@ 2014-08-03 18:48         ` Wolfgang Schuster
  2014-08-03 21:10           ` \os Procházka Lukáš
  1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2014-08-03 18:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2053 bytes --]


Am 02.08.2014 um 22:36 schrieb Procházka Lukáš <LPr@pontex.cz>:

> Hello,
> 
> On Sat, 02 Aug 2014 19:07:43 +0200, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
> 
>> Don’t use the \os command this way because the command is only meant to be used on the form {\os 1234} where you put braces around the numbers you want to change. When you use the \os command as shown above you get problems because ligatures, kerning etc. are disabled by the command.
> 
> 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.:
> 	- head commands (sections, chapters...),
> 	- enumerator commands (which use numbers),
> 	- page numbering commands,
> 	- href commands (which generate texts like "see section 1.2.3 on page 123").
> 
> It seems to me be a little "labor of Sisyphus" at the moment.
> 
> (But it's clear one would have to enclose manually entered numbers to {\os } or similar structure anyway.)

No, this is wrong and I’m not sure what you try to achieve because first you talk about disabling old style figures and now your talking about enabling them.


When you *want* your document to use old style figures for the body font you have to enable the onum feature in the default feature set which can be done with

    \definefontfeature[default][default][onum=yes]

before you set the font with the \setupbodyfont command. To change the numbers for certain parts of your document you can use the \feature command, e.g.

    \setupcaption[figure][style={\feature[+][f:lnum]}]

enables lining figures for the caption of your figures.


The \os command itself should only be used when you have a few numbers which should appear in a different layout from the global setup.

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 3253 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \os
  2014-08-03 18:48         ` \os Wolfgang Schuster
@ 2014-08-03 21:10           ` Procházka Lukáš
  0 siblings, 0 replies; 8+ messages in thread
From: Procházka Lukáš @ 2014-08-03 21:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

thanks, Wolfgang, it's clear now completely.

On Sun, 03 Aug 2014 20:48:11 +0200, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

> When you *want* your document to use old style figures for the body font you have to enable the onum feature in the default feature set which can be done with
>
>     \definefontfeature[default][default][onum=yes]
>
> BEFORE you set the font with the \setupbodyfont command.

That was the point!

I'm getting now what I was trying to achieve...

Best regards,

Lukas


> To change the numbers for certain parts of your document you can use the \feature command, e.g.
>
>     \setupcaption[figure][style={\feature[+][f:lnum]}]
>
> enables lining figures for the caption of your figures.
>
>
> The \os command itself should only be used when you have a few numbers which should appear in a different layout from the global setup.
>
> 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2014-08-03 21:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-01 16:39 \os Procházka Lukáš Ing. - Pontex s. r. o.
2014-08-01 16:51 ` \os Wolfgang Schuster
2014-08-02  8:51   ` \os Procházka Lukáš Ing. - Pontex s. r. o.
2014-08-02 17:07     ` \os Wolfgang Schuster
2014-08-02 20:36       ` \os Procházka Lukáš
2014-08-03 17:26         ` \os Joshua Krämer
2014-08-03 18:48         ` \os Wolfgang Schuster
2014-08-03 21:10           ` \os Procházka Lukáš

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).