[NTG-context] 1. \setupbackgrounds with colours 2. \textwidth = 1.09\textwidth?

Rudolf Bahr quasi at quasi.de
Mon Feb 17 19:28:40 CET 2014


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-8.pdf
Type: application/pdf
Size: 8418 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140217/b12b00d3/attachment-0001.pdf>


More information about the ntg-context mailing list