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
Am 01.08.2014 um 18:39 schrieb Procházka Lukáš Ing. - Pontex s. r. o.
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
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
Am 02.08.2014 um 10:51 schrieb Procházka Lukáš Ing. - Pontex s. r. o.
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
Hello,
On Sat, 02 Aug 2014 19:07:43 +0200, Wolfgang Schuster
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
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
Am 02.08.2014 um 22:36 schrieb Procházka Lukáš
Hello,
On Sat, 02 Aug 2014 19:07:43 +0200, Wolfgang Schuster
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
Hello,
thanks, Wolfgang, it's clear now completely.
On Sun, 03 Aug 2014 20:48:11 +0200, Wolfgang Schuster
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
participants (4)
-
Joshua Krämer
-
Procházka Lukáš
-
Procházka Lukáš Ing. - Pontex s. r. o.
-
Wolfgang Schuster