1. \setupbackgrounds with colours 2. \textwidth = 1.09\textwidth?
Hello listmembers, 1. With "\setupbackgrounds" finally I achieved what I intended (see pdf-file), according to Context reference manual p. 187. But a question remains: Is it a feature of context not to colourize header and footer alone, but only in conjunction with text? 2. In the appended pdf-file it is also to be seen, that the horizontal \hrule strokes are wider than \textwidth, i.e. they begin in leftmargin and extend to within rightmargin, whereas the vertical \vrule strokes exactly are as high as expected. Is there a bug in my program? Regards, Rudolf % -------------------------------------------------------------------------->8 % vim:tw=150: \language[de] \setuppapersize [A4,landscape]% \setuplayout [% backspace=42.65mm,leftedge=2mm,leftmargin=20mm,leftmargindistance=5pt,textwidth=230mm,% rightmargindistance=5pt,rightmargin=20mm,rightedge=2mm% topspace=22mm,header=12mm,headerdistance=2mm,textheight=164mm,footerdistance=2mm,footer=12mm% ]% \showframe \showsetups % works as expected, the whole page is red: \setupbackgrounds [page] [background=color, backgroundcolor=red] % the next does nothing, even being alone (the other \setupbackgrounds commented out) % I tried to colorize only header and footer, without text \setupbackgrounds [text] [header,footer] [background=color, backgroundcolor=yellow] % works as expected: All 15 areas darkgreen + rest of uncovered page red \setupbackgrounds [header,text,footer] [leftedge,leftmargin,text,rightmargin,rightedge] [background=color, backgroundcolor=darkgreen] % works as expected: Only text area white, other areas unchanged. Thanks to heaven! \setupbackgrounds [text] [text] [background=color, backgroundcolor=white] \starttext textwidth = \the\textwidth textheight = \the\textheight \vfill \vbox{\hrule width \textwidth height 8pt \vskip5pt \hrule width \hsize height 8pt} \vfill\vfill \page[yes] \vrule width 8pt height \textheight \hfill \vrule width 8pt height \textheight \hfill\hfill \vrule width 8pt height \textheight \stoptext % -------------------------------------------------------------------------->8
Am 17.02.2014 um 19:28 schrieb Rudolf Bahr
Hello listmembers,
1. With "\setupbackgrounds" finally I achieved what I intended (see pdf-file), according to Context reference manual p. 187. But a question remains:
Is it a feature of context not to colourize header and footer alone, but only in conjunction with text?
2. In the appended pdf-file it is also to be seen, that the horizontal \hrule strokes are wider than \textwidth, i.e. they begin in leftmargin and extend to within rightmargin, whereas the vertical \vrule strokes exactly are as high as expected.
Is there a bug in my program?
Regards, Rudolf
% -------------------------------------------------------------------------->8 % vim:tw=150:
\language[de]
\setuppapersize [A4,landscape]% \setuplayout [% backspace=42.65mm,leftedge=2mm,leftmargin=20mm,leftmargindistance=5pt,textwidth=230mm,%
Use the width key and not the text width key.
rightmargindistance=5pt,rightmargin=20mm,rightedge=2mm% topspace=22mm,header=12mm,headerdistance=2mm,textheight=164mm,footerdistance=2mm,footer=12mm% ]% \showframe \showsetups
% works as expected, the whole page is red: \setupbackgrounds [page] [background=color, backgroundcolor=red]
% the next does nothing, even being alone (the other \setupbackgrounds commented out) % I tried to colorize only header and footer, without text \setupbackgrounds [text] [header,footer] [background=color, backgroundcolor=yellow]
Change the first and second argument. Wolfgang
On Mon, Feb 17, 2014 at 07:38:20PM +0100, Wolfgang Schuster wrote:
Am 17.02.2014 um 19:28 schrieb Rudolf Bahr
: Hello listmembers,
1. With "\setupbackgrounds" finally I achieved what I intended (see pdf-file), according to Context reference manual p. 187. But a question remains:
Is it a feature of context not to colourize header and footer alone, but only in conjunction with text?
2. In the appended pdf-file it is also to be seen, that the horizontal \hrule strokes are wider than \textwidth, i.e. they begin in leftmargin and extend to within rightmargin, whereas the vertical \vrule strokes exactly are as high as expected.
Is there a bug in my program?
Regards, Rudolf
% -------------------------------------------------------------------------->8 % vim:tw=150:
\language[de]
\setuppapersize [A4,landscape]% \setuplayout [% backspace=42.65mm,leftedge=2mm,leftmargin=20mm,leftmargindistance=5pt,textwidth=230mm,%
Use the width key and not the text width key.
rightmargindistance=5pt,rightmargin=20mm,rightedge=2mm% topspace=22mm,header=12mm,headerdistance=2mm,textheight=164mm,footerdistance=2mm,footer=12mm% ]% \showframe \showsetups
% works as expected, the whole page is red: \setupbackgrounds [page] [background=color, backgroundcolor=red]
% the next does nothing, even being alone (the other \setupbackgrounds commented out) % I tried to colorize only header and footer, without text \setupbackgrounds [text] [header,footer] [background=color, backgroundcolor=yellow]
Change the first and second argument.
OK, Wolfgang, thank you again! Rudolf
participants (2)
-
Rudolf Bahr
-
Wolfgang Schuster