Setting background for entire header
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
2007/6/26, Aditya Mahajan
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
On Tue, 26 Jun 2007, Wolfgang Schuster wrote:
2007/6/26, Aditya Mahajan
: 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]
%%%% 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]
Ah, edgedistance. Somehow I had missed this.
\showframe
\setupcolors[state=start]
\setupbackgrounds [header] [leftedge,leftmargin,text,rightmargin,rightedge] [background=color,backgroundcolor=blue]
\starttext test \stoptext
This works, but I need a non-zero margin distance.
Variant 2:
\setupcolors[state=start]
\defineoverlay [colorrule] [{\color[blue]{\vrule width2\hsize height\headerheight\relax}}]
\setupbackgrounds [header] [background=colorrule]
This is easier than what I was doing. Thanks. But, it would have been nicer if something like this could be achieved by \setupbackgrounds [header] [page] [background=color,backgroundcolor=blue] Aditya
participants (2)
-
Aditya Mahajan
-
Wolfgang Schuster