[NTG-context] Layer preset: leftbottom

2011-12-18 Thread Andreas Harder
Hi Hans,

it seems that the layer preset leftbottom is broken.

\definelayer[page] [width=\paperwidth,height=\paperheight]
\setlayer   [page] [preset=leftbottom] {\red TEST} % error
% \setlayer   [page] [preset=rightbottom] {\red TEST} % OK

\setupbackgrounds[page][background=page]

\starttext
\page[empty]
\stoptext


Regards
Andreas
___
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
___


Re: [NTG-context] Layer preset: leftbottom

2011-12-18 Thread Wolfgang Schuster

Am 18.12.2011 um 11:00 schrieb Andreas Harder:

 Hi Hans,
 
 it seems that the layer preset leftbottom is broken.

I posted this fix a few days ago on the dev list:

supp-box.mkiv:

-\unexpanded\def\righttopbox_finish
+\def\boxes_righttopbox_finish
  {\global\boxhdisplacement\boxoffset
   \global\boxvdisplacement-\dp\nextbox
   \global\advance\boxvdisplacement-\boxoffset
   \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\nextbox
   \egroup}

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
___


Re: [NTG-context] Layer preset: leftbottom

2011-12-18 Thread Andreas Harder

On 18.12.2011, at 11:14, Wolfgang Schuster wrote:

 
 Am 18.12.2011 um 11:00 schrieb Andreas Harder:
 
 Hi Hans,
 
 it seems that the layer preset leftbottom is broken.
 
 I posted this fix a few days ago on the dev list:
 
 supp-box.mkiv:
 
 -\unexpanded\def\righttopbox_finish
 +\def\boxes_righttopbox_finish
  {\global\boxhdisplacement\boxoffset
   \global\boxvdisplacement-\dp\nextbox
   \global\advance\boxvdisplacement-\boxoffset
   \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\nextbox
   \egroup}

Thanks Wolfgang!

By the way … Sorry to bother you, but I’m still run into problems according 
\definelayout.

This example used to work with the beta from November 29 (desired output 
attached).

\setuplayout [width=middle,height=middle,header=0pt,footer=0pt]
\definelayout[first]  [header=2cm]
\definelayout[last]   [footer=2cm]
\definelayout[current] % current|unknown

\starttext  \showframe % \checkcurrentlayout
  % \dorecurse{2}{test\page} % last is wrong
  \dorecurse{5}{test\page} % page 2 and „last“ are wrong
\stoptext


Two+Pages.pdf
Description: Adobe PDF document


TwoPages.pdf
Description: Adobe PDF document



Thank you in advance
Andreas___
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
___

Re: [NTG-context] Layer preset: leftbottom

2011-12-18 Thread Wolfgang Schuster

Am 18.12.2011 um 11:34 schrieb Andreas Harder:

 By the way … Sorry to bother you, but I’m still run into problems according 
 \definelayout.

Change in page-imp.mkiv the order of the last to lines (increment realpage 
before flushing \everyaftershipout):

\def\page_boxes_shipout#1% or: \page_shipouts_apply
 {\dontshowcomposition % redundant
  \dontcomplain% redundant
  \the\everybeforeshipout
  \ifcase\shipoutfinalizemethod
\page_shipouts_handle{#1}%
  \else
\setbox\shipoutscratchbox\hbox{#1}% just in case there are objects there, 
hook for testing (will go away)
\finalizeshipoutbox\shipoutscratchbox
\page_shipouts_handle{\box\shipoutscratchbox}%
  \fi
  \the\everyaftershipout
  \setnextrealpageno}

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
___