ma-cb-en-pagebackgrounds.tex /size: 3228 b    last modification: 2020-07-01 14:35
1\startcomponent ma-cb-en-pagebackgrounds
2
3\enablemode[**en-us]
4
5\project ma-cb
6
7\startchapter[title=Backgrounds in page areas]
8
9\index{page areas}
10\index{background+page areas}
11
12\Command{\tex{setupbackgrounds}}
13
14The page background can be set, with:
15
16\shortsetup{setupbackgrounds}
17
18The first two bracket pairs are used to define the page areas. The last bracket
19pair is used for set up.
20
21\startbuffer
22\hbox
23  {\framed[width=1.5cm,frame=off]                   {}
24   \framed[width=2cm,frame=off]                     {left}
25   \framed[width=2.5cm,frame=off]                   {left}
26   \framed[width=3cm,frame=off]                     {text}
27   \framed[width=2.5cm,frame=off]                   {right}
28   \framed[width=2cm,frame=off]                     {right}}
29\hbox
30  {\framed[width=1.5cm,frame=off]                   {}
31   \framed[width=2cm,frame=off]                     {edge}
32   \framed[width=2.5cm,frame=off]                   {margin}
33   \framed[width=3cm,frame=off]                     {}
34   \framed[width=2.5cm,frame=off]                   {margin}
35   \framed[width=2cm,frame=off]                     {edge}}
36\hbox
37  {\framed[width=1.5cm,frame=off]                   {top}
38   \framed[width=2cm]                               {}
39   \framed[width=2.5cm]                             {}
40   \framed[width=3cm]                               {}
41   \framed[width=2.5cm]                             {}
42   \framed[width=2cm]                               {}}
43\hbox
44  {\framed[width=1.5cm,frame=off]                   {header}
45   \framed[width=2cm]                               {}
46   \framed[width=2.5cm,background=screen]           {}
47   \framed[width=3cm,background=screen]             {}
48   \framed[width=2.5cm,background=screen]           {}
49   \framed[width=2cm]                               {}}
50\hbox
51  {\framed[width=1.5cm,frame=off,height=3cm]        {text}
52   \framed[width=2cm,height=3cm]                    {}
53   \framed[width=2.5cm,height=3cm,background=screen]{}
54   \framed[width=3cm,height=3cm,background=screen]  {}
55   \framed[width=2.5cm,height=3cm,background=screen]{}
56   \framed[width=2cm,height=3cm]                    {}}
57\hbox
58  {\framed[width=1.5cm,frame=off]                   {footer}
59   \framed[width=2cm]                               {}
60   \framed[width=2.5cm,background=screen]           {}
61   \framed[width=3cm,background=screen]             {}
62   \framed[width=2.5cm,background=screen]           {}
63   \framed[width=2cm]                               {}}
64\hbox
65  {\framed[width=1.5cm,frame=off]                   {bottom}
66   \framed[width=2cm]                               {}
67   \framed[width=2.5cm]                             {}
68   \framed[width=3cm]                               {}
69   \framed[width=2.5cm]                             {}
70   \framed[width=2cm]                               {}}
71\stopbuffer
72
73\placefigure
74  [here]
75  [fig:pageareas]
76  {The page areas defined in \type{\setupbackgrounds}.}
77  {\tt\getbuffer}
78
79If you want to have backgrounds in the gray areas of the page layout of
80\in{figure}[fig:pageareas] you type:
81
82\startbuffer
83\setupbackgrounds
84  [header,text,footer]
85  [leftmargin,text,rightmargin]
86  [background=screen]
87\stopbuffer
88
89\typebuffer
90
91\stopchapter
92
93\stopcomponent
94