ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "j. van den hoff" <veedeehjay@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>,
	"Pablo Rodriguez" <oinos@gmx.es>, "Hans Hagen" <pragma@wxs.nl>
Subject: Re: fluctuating baseline of header text
Date: Sat, 27 Dec 2014 15:07:31 +0100	[thread overview]
Message-ID: <op.xri5itbyp7eajd@muck.fritz.box> (raw)
In-Reply-To: <549EA7E1.4090501@wxs.nl>

On Sat, 27 Dec 2014 13:36:49 +0100, Hans Hagen <pragma@wxs.nl> wrote:

> On 12/27/2014 12:16 PM, j. van den hoff wrote:
>> On Sat, 27 Dec 2014 10:40:30 +0100, Pablo Rodriguez <oinos@gmx.es>  
>> wrote:
>>
>>> On 12/26/2014 11:32 PM, j. van den hoff wrote:
>>>> [...]
>>>> in this example (and with this font) the problem is only occuring when
>>>> toggling between pages 6/7 or 7/8 (at sufficient zoom it's easy to  
>>>> see),
>>>> i.e.the header is shifted downward on page 7. in other docs with
>>>> different
>>>> fonts it happens across multiple pages. my guess would be it has to
>>>> do with the digit heights in the different fonts and the fact that the
>>>> page numbers are much larger than the heading, but that's only a  
>>>> guess.
>>>>
>>>> can someone confirm the problem?
>>>
>>> Hi Jörg,
>>>
>>> this sample shows the issue without zooming:
>>
>> thanks for confirming this. @devs: can this be considered "misbehaviour"
>> (not to call it a bug ;-)) or is it somehow unavoidable?
>
> it's not a bug at all .. you just get what you ask for

good to know.

>
> \showframe \showglyphs
>
> your header is too small so what you want only works if the heights  of  
> all characters are the same which is not the case here

well this seems not to be the whole explanation AFAICS. it might be  
correct for pablo's
example, but for my original example, which is equivalent to:

\showframe\showglyphs
\setupheader      [style=\smallbodyfont\ss\it]
\setupheadertexts [section]
\setuppagenumbering[location={header,margin}, style=\bfc]

\starttext
\dorecurse{10}{\section{Introduction}
bla
\page[yes]}
\stoptext

I can't see that the header space is to small, no? or what am I missing?  
using `\showglyphs' (which I didn't know of: thanks),
it still looks to me as if the problem is caused by the fact, that all  
positions are measured from the top and
the header line's baseline is aligned with the baseline of the large page  
numbers glyph boxes (although only approximately so, as far
as I can tell on my monitor...) where -- for the default font -- the  
glyphbox of the `7' has a larger vertical extension than the others
(so that it extends a bit further down as measured from the top) which  
causes the baseline of the header to shift downwards accordingly.


joerg



>
> solutions:
>
> - use a proper height for the header
> - package the header text in a box and set the height of that box
>
>>>
>>>     \setuppapersize[A8]
>>>     \setupheader      [style=\itx\ss]
>>>     \setupheadertexts [section]
>>>     \setuppagenumbering[location={header,margin}, style=\bfd]
>>>     \starttext
>>>     \dorecurse{80}{\section{Introduction}
>>>     bla\page[yes]}
>>>     \stoptext
>>>
>>> When the glyph 7 is involved in page number, baseline is a bit lower.  
>>> As
>>> you wrote, I guess this is related with the glyph metrics.
>>
>> yes. this seems to be supported by the fact that it happens differently
>> (usually more frequently) with other fonts.
>>
>> joerg
>>
>>>
>>> Just in case it helps,
>>>
>>>
>>> Pablo
>>
>>
>
>


-- 
Using Opera's revolutionary email 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2014-12-27 14:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-26 22:32 j. van den hoff
2014-12-27  9:40 ` Pablo Rodriguez
2014-12-27 11:16   ` j. van den hoff
2014-12-27 12:36     ` Hans Hagen
2014-12-27 14:07       ` j. van den hoff [this message]
2014-12-27 14:10         ` j. van den hoff
2014-12-27 15:35       ` j. van den hoff
2014-12-27 23:45         ` Hans Hagen
2014-12-28 11:39           ` j. van den hoff
2014-12-28 17:55             ` Hans Hagen
2014-12-28 18:08               ` j. van den hoff
  -- strict thread matches above, loose matches on Subject: below --
2014-12-26 22:30 j. van den hoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.xri5itbyp7eajd@muck.fritz.box \
    --to=veedeehjay@googlemail.com \
    --cc=ntg-context@ntg.nl \
    --cc=oinos@gmx.es \
    --cc=pragma@wxs.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).