I understand one can easily change the background color for text portion easily, but I would like to do the same for an entire portion of the page. How does one change background color for only a section of the page?
[Tex/LaTex] Change background color for only a section of the page
backgrounds
Best Answer
The following example uses this approach:
Mark or save the top and bottom positions of the band you want to highlight using
zref
'ssavepos
module (via\zsaveposy{<label>}
);Insert content into the
B
ackG
round of the current page only usingeso-pic
's\AddToShipoutPictureBG*
;That content is a rectangle based on
\rule[<raise>]{<width>}{<height>}
.Since
\zsaveposy
uses the\label
-\ref
system, you'll have to compile at least twice with every change in the vertical position oftop
and/orbottom
.You can automate the process into an environment
colourband
: