6

I want to delimit margin note area by a background color for all the document like in some nice books.

I tried with marginnote and todonote packages without success.

You are my last hope...

1 Answers1

7

This is a job for the background and tikzpagenodes packages:

\documentclass{book}
\usepackage{tikzpagenodes}
\usepackage{background}
\usepackage{lipsum}

\backgroundsetup{
scale=1,
angle=0,
contents={\tikz[remember picture,overlay]\fill[red!30] (current page marginpar area.north west) rectangle (current page marginpar area.south east);
}}

\begin{document}
\lipsum[1-15]
\end{document}

enter image description here

The code needs two or three runs to stabilize.

Gonzalo Medina
  • 505,128