ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* rule beneath chapter number
@ 2021-11-12  3:27 jbf via ntg-context
  2021-11-12  4:49 ` Aditya Mahajan via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: jbf via ntg-context @ 2021-11-12  3:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: jbf

The following MWE deliberately shows two ways of getting a short rule 
beneath a chapter number, but neither achieve what I want. \underbar is 
too close to the number and \crlf\blackrule too far below. So basically 
my question is: is there a way of adjusting the position of a brief rule 
beneath the number? It probably involves neither of the approaches I 
have used here, but I am not sure just what approach to take, other than 
using a background layer... and maybe that is what I need to do.

Julian

\define[2]\MyChapterCommand%
{\framed[frame=on,bottomframe=off,leftframe=off,rightframe=off,topframe=off,align=middle]
      {\vbox{\headtext{chapter} 
\underbar{#1}\crlf\blackrule[height=.1\exheight]\crlf#2}}}

\setuphead[chapter][
     header=empty,
     alternative=middle,
     style={\ssb},
     number=yes,
     command=\MyChapterCommand,
     after={\blank[big]},
     ]

\setuplabeltext[chapter= ]
\starttext
\chapter[title={Chapter title}]
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: rule beneath chapter number
  2021-11-12  3:27 rule beneath chapter number jbf via ntg-context
@ 2021-11-12  4:49 ` Aditya Mahajan via ntg-context
  2021-11-12  5:26   ` jbf via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan via ntg-context @ 2021-11-12  4:49 UTC (permalink / raw)
  To: jbf via ntg-context; +Cc: Aditya Mahajan

On Fri, 12 Nov 2021, jbf via ntg-context wrote:

> The following MWE deliberately shows two ways of getting a short rule 
> beneath a chapter number, but neither achieve what I want. \underbar is 
> too close to the number 

\setupbar[underbar][offset=-0.8] % play around with the number

> and \crlf\blackrule too far below. So basically 
> my question is: is there a way of adjusting the position of a brief rule 
> beneath the number? 

\defineframed[underbarframed]
             [
               frame=off,
               rulethickness=1pt,
               bottomframe=on,
               frameoffset=-1pt, % negative of rulethickness
               boffset=0.8ex, % play around with this
             ]


Aditya
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: rule beneath chapter number
  2021-11-12  4:49 ` Aditya Mahajan via ntg-context
@ 2021-11-12  5:26   ` jbf via ntg-context
  2021-11-12  8:09     ` Henning Hraban Ramm via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: jbf via ntg-context @ 2021-11-12  5:26 UTC (permalink / raw)
  To: Aditya Mahajan via ntg-context; +Cc: jbf, mailing list for ConTeXt users

Thanks Aditya. Option 1 is simple enough. Not sure why that eluded me 
earlier! Option 2 gives me a little more choice, I think. I'd being 
playing with framed but could quite get it right.

It does seem, though, just using '1' as the chapter number for the 
moment, that the underline is not quite centered; almost but not quite. 
So am playing around with the roffset to adjust that.

Julian

On 12/11/21 3:49 pm, Aditya Mahajan via ntg-context wrote:
> On Fri, 12 Nov 2021, jbf via ntg-context wrote:
>
>> The following MWE deliberately shows two ways of getting a short rule
>> beneath a chapter number, but neither achieve what I want. \underbar is
>> too close to the number
> \setupbar[underbar][offset=-0.8] % play around with the number
>
>> and \crlf\blackrule too far below. So basically
>> my question is: is there a way of adjusting the position of a brief rule
>> beneath the number?
> \defineframed[underbarframed]
>               [
>                 frame=off,
>                 rulethickness=1pt,
>                 bottomframe=on,
>                 frameoffset=-1pt, % negative of rulethickness
>                 boffset=0.8ex, % play around with this
>               ]
>
>
> Aditya
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: rule beneath chapter number
  2021-11-12  5:26   ` jbf via ntg-context
@ 2021-11-12  8:09     ` Henning Hraban Ramm via ntg-context
  2021-11-12  8:47       ` jbf via ntg-context
  2021-11-12 13:47       ` Wolfgang Schuster via ntg-context
  0 siblings, 2 replies; 8+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-11-12  8:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm



> Am 12.11.2021 um 06:26 schrieb jbf via ntg-context <ntg-context@ntg.nl>:
> 
> It does seem, though, just using '1' as the chapter number for the moment, that the underline is not quite centered; almost but not quite. So am playing around with the roffset to adjust that.

It might make sense to use a different number style for paginations – most fonts set unproportional tabular numbers as default, in this case proportional tabular numbers make sense. That will affect the spacing around the 1 – don’t know if it solves your case.

Example from one of my projects:

\definefontfeature[ptabnum][default][
  onum=no,pnum=yes,tnum=yes,
]
\definefontfeature[tabnum][default][
  onum=no,pnum=no,tnum=yes,
]


Hraban
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: rule beneath chapter number
  2021-11-12  8:09     ` Henning Hraban Ramm via ntg-context
@ 2021-11-12  8:47       ` jbf via ntg-context
  2021-11-12 17:13         ` Henning Hraban Ramm via ntg-context
  2021-11-12 13:47       ` Wolfgang Schuster via ntg-context
  1 sibling, 1 reply; 8+ messages in thread
From: jbf via ntg-context @ 2021-11-12  8:47 UTC (permalink / raw)
  To: Henning Hraban Ramm via ntg-context; +Cc: jbf, mailing list for ConTeXt users

In fact, in this instance, adjusting the roffset solved the problem, and 
I didn't see any marked change using the proportional tabular 
(monospaced?) fontfeature you suggest, though it is an interesting point 
to bear in mind in the future. I'd always thought of proportional versus 
tabular rather than proportional + tabular.

Julian

On 12/11/21 7:09 pm, Henning Hraban Ramm via ntg-context wrote:
> \definefontfeature[ptabnum][default][
>    onum=no,pnum=yes,tnum=yes,
> ]
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: rule beneath chapter number
  2021-11-12  8:09     ` Henning Hraban Ramm via ntg-context
  2021-11-12  8:47       ` jbf via ntg-context
@ 2021-11-12 13:47       ` Wolfgang Schuster via ntg-context
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-11-12 13:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm via ntg-context
  Cc: Wolfgang Schuster

Henning Hraban Ramm via ntg-context schrieb am 12.11.2021 um 09:09:
>> Am 12.11.2021 um 06:26 schrieb jbf via ntg-context <ntg-context@ntg.nl>:
>>
>> It does seem, though, just using '1' as the chapter number for the moment, that the underline is not quite centered; almost but not quite. So am playing around with the roffset to adjust that.
> It might make sense to use a different number style for paginations – most fonts set unproportional tabular numbers as default, in this case proportional tabular numbers make sense. That will affect the spacing around the 1 – don’t know if it solves your case.
>
> Example from one of my projects:
>
> \definefontfeature[ptabnum][default][
>    onum=no,pnum=yes,tnum=yes,
> ]

You can't activate pnum and tnum at the same time, only one is possible.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: rule beneath chapter number
  2021-11-12  8:47       ` jbf via ntg-context
@ 2021-11-12 17:13         ` Henning Hraban Ramm via ntg-context
  2021-11-12 18:02           ` Thomas A. Schmitz via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-11-12 17:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm



> Am 12.11.2021 um 09:47 schrieb jbf via ntg-context <ntg-context@ntg.nl>:
> 
> In fact, in this instance, adjusting the roffset solved the problem, and I didn't see any marked change using the proportional tabular (monospaced?) fontfeature you suggest, though it is an interesting point to bear in mind in the future. I'd always thought of proportional versus tabular rather than proportional + tabular.

You’re right, tabular numbers are nonproportional. I meant versal (“normal”) numbers in opposite of oldstyle (mediaeval) numbers.

I often use the Alegreya fonts, and they default to oldstyle numbers.


> Am 12.11.2021 um 14:47 schrieb Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>:
> 
> Henning Hraban Ramm via ntg-context schrieb am 12.11.2021 um 09:09:
>> \definefontfeature[ptabnum][default][
>>   onum=no,pnum=yes,tnum=yes,
>> ]
> 
> You can't activate pnum and tnum at the same time, only one is possible.

I don’t doubt that you’re right. I was probably tinkering until the result fitted my needs. Or the font has wrong features...


Hraban
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: rule beneath chapter number
  2021-11-12 17:13         ` Henning Hraban Ramm via ntg-context
@ 2021-11-12 18:02           ` Thomas A. Schmitz via ntg-context
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas A. Schmitz via ntg-context @ 2021-11-12 18:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Thomas A. Schmitz


On 11/12/21 18:13, Henning Hraban Ramm via ntg-context wrote:
> You’re right, tabular numbers are nonproportional. I meant versal (“normal”) numbers in opposite of oldstyle (mediaeval) numbers.

I think there are two mutually exclusive feature pairs that you're 
mixing up:

lnum vs onum: lining numbers versus old style numbers; "lining" having 
no descenders, but sitting on the line.

pnum vs tnum: proportional vs tabulate numbers. As the name suggests, 
the latter look better where numbers are vertically aligned because each 
numeral will take exactly the same space, so tables, but also footnotes 
etc. The former of course will look better in running text.

Add to this that numbers can also be subscript or superscript. Some very 
extensive professional fonts have surprising combinations of these 
features, so in the end, one has to do what you did: fiddle with 
featuresets until the result looks right.

Thomas
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2021-11-12 18:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12  3:27 rule beneath chapter number jbf via ntg-context
2021-11-12  4:49 ` Aditya Mahajan via ntg-context
2021-11-12  5:26   ` jbf via ntg-context
2021-11-12  8:09     ` Henning Hraban Ramm via ntg-context
2021-11-12  8:47       ` jbf via ntg-context
2021-11-12 17:13         ` Henning Hraban Ramm via ntg-context
2021-11-12 18:02           ` Thomas A. Schmitz via ntg-context
2021-11-12 13:47       ` Wolfgang Schuster via ntg-context

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