ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Question about text offset
@ 2018-02-28  4:28 Henri Menke
  2018-02-28  8:05 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Henri Menke @ 2018-02-28  4:28 UTC (permalink / raw)
  To: ntg-context

Dear list,

I was wondering, why is the text in the main text block offset by .25\exheight
from above (and below)?  Also, can you point me to the source line where this
offset is added in shipout because it is not there in \setuplayout.  If you
don't know what I mean, see MWE below.

Cheers, Henri

---

\definelayer
  [pagebg]
  [width=\textwidth,
   height=\textheight]

\setupbackgrounds
  [text][background=pagebg]

\showframe

\starttext

\setlayer
  [pagebg]
  [voffset=.25\exheight] % why?
  {\vbox{\strut\input lorem\par}}

\input lorem\par

\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] 2+ messages in thread

* Re: Question about text offset
  2018-02-28  4:28 Question about text offset Henri Menke
@ 2018-02-28  8:05 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2018-02-28  8:05 UTC (permalink / raw)
  To: ntg-context

On 2/28/2018 5:28 AM, Henri Menke wrote:
> Dear list,
> 
> I was wondering, why is the text in the main text block offset by .25\exheight
> from above (and below)?  Also, can you point me to the source line where this
> offset is added in shipout because it is not there in \setuplayout.  If you
> don't know what I mean, see MWE below.
> 
> Cheers, Henri
> 
> ---
> 
> \definelayer
>    [pagebg]
>    [width=\textwidth,
>     height=\textheight]
> 
> \setupbackgrounds
>    [text][background=pagebg]
> 
> \showframe
> 
> \starttext
> 
> \setlayer
>    [pagebg]
>    [voffset=.25\exheight] % why?
>    {\vbox{\strut\input lorem\par}}
> 
> \input lorem\par
> 
> \stoptext
\definelayer
   [pagebg]
   [width=\textwidth,
    height=\textheight]

\setupbackgrounds
   [text][background=pagebg]

\showframe

\starttext

\setlayer
   [pagebg]
   {\vbox{\red\strut\input lorem\par}}

\setlayer
   [pagebg]
   [voffset=\dimexpr\topskip-\strutht\relax] % why?
   {\vbox{\green\strut\input lorem\par}}

\setlayer
   [pagebg]
   {\vbox{\blue\topskipcorrection\strut\input lorem\par}}

\input lorem\par

\stoptext


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2018-02-28  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28  4:28 Question about text offset Henri Menke
2018-02-28  8:05 ` Hans Hagen

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