[NTG-context] Newbie questions

Hans Hagen pragma at wxs.nl
Sun Jun 25 18:54:13 CEST 2006


Mojca Miklavec wrote:
>
> \definelayer
> 	[page]
> 	[width=\paperwidth,
> 	 height=\paperheight]
> \setupbackgrounds
> 	[page]
> 	[background=page]
> \setlayerframed
> 	[page]
> 	[voffset=\topspace,
> 	 hoffset=\the\dimexpr\backspace-\leftmarginwidth-\leftmargindistance\relax,
> 	 preset=lefttop]
> 	[width=\the\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance\relax,
> 	 rulethickness=1pt,
> 	 frame=off,
> 	 bottomframe=on]
> 	{\pagenumber\hfill\getmarking[chapter][first]}
>
> Hoping that someone can fix at least one of the solutions above to
> work as intended,
>   

ok, here is a trick:


\definelayer
  [page]
  [hoffset=\the\dimexpr\backspace-
     \leftmarginwidth-\leftmargindistance\relax,
   voffset=\topspace,
   width=\paperwidth,
   height=\paperheight]

\setupbackgrounds
  [page]
  [background=page]

\startsetups page:setup

\setlayerframed
  [page]
  [preset=lefttop]
  [width=\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance\relax,
   rulethickness=1pt,
   frame=off,
   bottomframe=on]
 {\pagenumber\hfill\getmarking[chapter][first]}

\stopsetups

\setupheadertexts
  [\setups{page:setup}]

so, 

- makea setup (clean) 
- hook it into something that is done each page (maybe i should cook up a hook for that) 

now, the left right page problem is up to you ... keep in mind that we have 

\setupbackgrounds
  [leftpage]
  [...]

\setupbackgrounds
  [rightpage]
  [...]




-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------



More information about the ntg-context mailing list