* Setting background for entire header
@ 2007-06-26 5:00 Aditya Mahajan
2007-06-26 6:11 ` Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2007-06-26 5:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Setting background for entire header
2007-06-26 5:00 Setting background for entire header Aditya Mahajan
@ 2007-06-26 6:11 ` Wolfgang Schuster
2007-06-26 14:09 ` Aditya Mahajan
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2007-06-26 6:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
2007/6/26, Aditya Mahajan <adityam@umich.edu>:
> 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 : ntg-context@ntg.nl / 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Setting background for entire header
2007-06-26 6:11 ` Wolfgang Schuster
@ 2007-06-26 14:09 ` Aditya Mahajan
0 siblings, 0 replies; 3+ messages in thread
From: Aditya Mahajan @ 2007-06-26 14:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Tue, 26 Jun 2007, Wolfgang Schuster wrote:
> 2007/6/26, Aditya Mahajan <adityam@umich.edu>:
>> 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
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-26 14:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-26 5:00 Setting background for entire header Aditya Mahajan
2007-06-26 6:11 ` Wolfgang Schuster
2007-06-26 14:09 ` Aditya Mahajan
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).