2007/6/26, Aditya Mahajan <[EMAIL PROTECTED]>:
> Hi,
>
> I want to set the background of the entire header (from left edge of
> the paper to the right edge). As far as I could tell, there is no way
> to coax setupbackgrounds to do this. I can do this using layers or
> abuse the margin and offset keys of framed to make it cover the
> remaining area, but is there really no direct way to do this? Here is
> my attempt so far.
>
> \setupbodyfont[14pt]
>
> \setuppapersize  [S6] [S6]
>
> \setuplayout
>    [topspace=0cm,
>     top=0cm,
>     topdistance=0cm,
>     header=3\lineheight,
>     headerdistance=0.5\lineheight,
>     height=middle,
>     footerdistance=0.5\lineheight,
>     footer=2\lineheight,
>     bottomspace=0cm,
>     bottom=0cm,
>     bottomdistance=0cm,
>     backspace=1cm,
>     leftmargin=.5cm,
>     leftmargindistance=.15cm,
>     width=middle,
>     cutspace=.5cm,
>     rightmargin=.25cm,
>     rightmargindistance=.15cm,
>     grid=yes,
>   ]
>
> \setupcolors[state=start]
>
> %%%% What should go here???
> \setupbackgrounds[header][background=color,backgroundcolor=blue]
> %%%%
>
> \starttext test \stoptext
>
>
> Aditya

Hi Aditya,

Variant 1:

\setuplayout
  [leftedgedistance=0pt,
   rightedgedistance=0pt,
   leftmargindistance=0pt,
   rightmargindistance=0pt,
   leftedge=2cm,
   rightedge=2cm]

\showframe

\setupcolors[state=start]

\setupbackgrounds
  [header]
  [leftedge,leftmargin,text,rightmargin,rightedge]
  [background=color,backgroundcolor=blue]

\starttext test \stoptext


Variant 2:

\setupcolors[state=start]

\defineoverlay
 [colorrule]
 [{\color[blue]{\vrule width2\hsize height\headerheight\relax}}]

\setupbackgrounds
 [header]
 [background=colorrule]

\starttext test \stoptext


Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to