adding font feature tnum in the TOC
Hi, hm, I am a little puzzled… If I am correct then one should be able to enable the font feature tnum for the page-numbers with “pagecommand=“. I have \setuphead [section] [aftersection=\page, textstyle=\bfd, numberstyle=\bfd, align=middle, after={\godown[-1\lineheight]}, number=no] \setuplist[section][pagecommand={\addfeature[tnum]#1\subtractfeature[tnum]}] However if I do this then I get the pagenumber prefixed with ‘section’ e.g. bbb bar buch bühne section3 What am I doing in the wrong way? Kind regards Willi
Willi Egger mailto:context@boede.nl 29. März 2016 um 15:11 Hi,
hm, I am a little puzzled…
If I am correct then one should be able to enable the font feature tnum for the page-numbers with “pagecommand=“.
I have
\setuphead [section] [aftersection=\page, textstyle=\bfd, numberstyle=\bfd, align=middle, after={\godown[-1\lineheight]}, number=no]
\setuplist[section][pagecommand={\addfeature[tnum]#1\subtractfeature[tnum]}]
However if I do this then I get the pagenumber prefixed with ‘section’ e.g.
bbb bar buch bühne section3
What am I doing in the wrong way? \setuplist[chapter][pagestyle={\feature[=][tabularnumbers]}]
\definefontfeature[default][default][onum=yes] \setupbodyfont[pagella] \starttext \setcounter[userpage][100] \completecontent \dorecurse{20}{\expanded{\chapter{Chapter \recurselevel}}} \stoptext
Wolfgang! Many thanks for this! - I get the result I wanted to. Kind regards Willi
On 29 mrt. 2016, at 17:33, Wolfgang Schuster
wrote: Willi Egger 29. März 2016 um 15:11 Hi,
hm, I am a little puzzled…
If I am correct then one should be able to enable the font feature tnum for the page-numbers with “pagecommand=“.
I have
\setuphead [section] [aftersection=\page, textstyle=\bfd, numberstyle=\bfd, align=middle, after={\godown[-1\lineheight]}, number=no]
\setuplist[section][pagecommand={\addfeature[tnum]#1\subtractfeature[tnum]}]
However if I do this then I get the pagenumber prefixed with ‘section’ e.g.
bbb bar buch bühne section3
What am I doing in the wrong way? \setuplist[chapter][pagestyle={\feature[=][tabularnumbers]}]
\definefontfeature[default][default][onum=yes]
\setupbodyfont[pagella]
\starttext
\setcounter[userpage][100]
\completecontent
\dorecurse{20}{\expanded{\chapter{Chapter \recurselevel}}}
\stoptext
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Hello Wolfgang, I used your solution. However I think instead of an “=“ it should be “+”. I wikified this issue. Kind regards Willi
On 29 mrt. 2016, at 17:48, Willi Egger
wrote: Wolfgang!
Many thanks for this! - I get the result I wanted to.
Kind regards
Willi
On 29 mrt. 2016, at 17:33, Wolfgang Schuster
wrote: Willi Egger 29. März 2016 um 15:11 Hi,
hm, I am a little puzzled…
If I am correct then one should be able to enable the font feature tnum for the page-numbers with “pagecommand=“.
I have
\setuphead [section] [aftersection=\page, textstyle=\bfd, numberstyle=\bfd, align=middle, after={\godown[-1\lineheight]}, number=no]
\setuplist[section][pagecommand={\addfeature[tnum]#1\subtractfeature[tnum]}]
However if I do this then I get the pagenumber prefixed with ‘section’ e.g.
bbb bar buch bühne section3
What am I doing in the wrong way? \setuplist[chapter][pagestyle={\feature[=][tabularnumbers]}]
\definefontfeature[default][default][onum=yes]
\setupbodyfont[pagella]
\starttext
\setcounter[userpage][100]
\completecontent
\dorecurse{20}{\expanded{\chapter{Chapter \recurselevel}}}
\stoptext
___________________________________________________________________________________ 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 ___________________________________________________________________________________
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Willi Egger mailto:context@boede.nl 29. März 2016 um 20:29 Hello Wolfgang,
I used your solution. However I think instead of an “=“ it should be “+”. No, the = was intentional because I had to get rid of the onum setting.
Wolfgang
I underrstand this, however then I do not get tabular figures… Willi
On 29 mrt. 2016, at 20:36, Wolfgang Schuster
wrote: Willi Egger 29. März 2016 um 20:29 Hello Wolfgang,
I used your solution. However I think instead of an “=“ it should be “+”. No, the = was intentional because I had to get rid of the onum setting.
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 ___________________________________________________________________________________
Willi Egger mailto:context@boede.nl 29. März 2016 um 20:38 I underrstand this, however then I do not get tabular figures… Do you want them for oldstyle figures or lining figures.
\definefontfeature [onum+pnum] [onum=yes,lnum=no,pnum=yes,tnum=no] \definefontfeature [onum+tnum] [onum=yes,lnum=no,pnum=no,tnum=yes] \definefontfeature [lnum+pnum] [onum=no,lnum=yes,pnum=yes,tnum=no] \definefontfeature [lnum+tnum] [onum=no,lnum=yes,pnum=no,tnum=yes] \setupbodyfont[pagella] \starttext \starttabulate[|f{\addfeature{onum+pnum}}r|f{\addfeature{onum+tnum}}r|f{\addfeature{lnum+pnum}}r|f{\addfeature{lnum+tnum}}r|] \dorecurse{100}{\NC \vrule\threedigits{##1}\vrule \NC \vrule\threedigits{##1}\vrule \NC \vrule\threedigits{##1}\vrule \NC \vrule\threedigits{##1}\vrule \NC\NR} \stoptabulate \stoptext Wolfgang
On 3/29/2016 8:38 PM, Willi Egger wrote:
I underrstand this, however then I do not get tabular figures…
These things also depend on the font. Some fonts (maybe taken from type ones) have old styles in the regular digit slots so effectively they always have onum=yes hardcoded and maybe alternatives that kick in when you choose another *num (turning onum off doesn't help then). (The same can be true for other features; unfortunately it's a bit of a mess out there. And if needed we can fix such things in lfg files for specific fonts.) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Thank you Hans, I think we will keep such things with fonts as before. So I am happy about the solution I got from Wolfgang and it works for me here…The latter is the most important. Kind regards Willi
On 30 mrt. 2016, at 08:26, Hans Hagen
wrote: On 3/29/2016 8:38 PM, Willi Egger wrote:
I underrstand this, however then I do not get tabular figures…
These things also depend on the font. Some fonts (maybe taken from type ones) have old styles in the regular digit slots so effectively they always have onum=yes hardcoded and maybe alternatives that kick in when you choose another *num (turning onum off doesn't help then). (The same can be true for other features; unfortunately it's a bit of a mess out there. And if needed we can fix such things in lfg files for specific fonts.)
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Hello Wolfgang, indeed if one uses pagella it is true what you say. If I use Seravek, which has oldstuyle figures also, then it does not work in the same way. I tested with \addfeature[oldstyle] which is defined as \definefontfeature[oldstyle][default][sript=latn,onum=yes] With this feature enabled I get oldstyle figures in the text but proportional numbers in de TOC, not oldstyle. Normally I have oldstyle not enabled. So when i use the + instead of the = then I get tabular figures. May be that there is something organized differently in the two fonts? Thank you for your solution. Willi
On 29 mrt. 2016, at 20:36, Wolfgang Schuster
wrote: Willi Egger 29. März 2016 um 20:29 Hello Wolfgang,
I used your solution. However I think instead of an “=“ it should be “+”. No, the = was intentional because I had to get rid of the onum setting.
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 ___________________________________________________________________________________
participants (3)
-
Hans Hagen
-
Willi Egger
-
Wolfgang Schuster