How do I color a page within the margin and still being able to write text on the page? I would like to make something like this.
2 Answers
You can e.g. use eso-pic:
\documentclass{article}
\usepackage{eso-pic,xcolor,lipsum}
\begin{document}
\AddToShipoutPictureBG*
{\AtTextLowerLeft{\textcolor{green!50!white}{\rule{\textwidth}{\textheight}}}}
\lipsum
\end{document}
If you are using OpTeX, you can use \pgbackground
tokens register and create \hrule
with desired dimensions shifted by \voffset
and \hoffset
:
\colordef\LiGreen{.2\Green+.03\Black}
\newbox\bgbox
\setbox\bgbox=\vbox{\LiGreen\hrule height\dimexpr\vsize+3pt width\hsize}
\pgbackground={\kern\voffset \moveright\hoffset\copy\bgbox}
\lorem[1-10]
\bye