0

I am writing a double-paged document.

I would like to add a bleeding colored area on the exterior of each page after some page.

I know how to add the bleeding area on the left of the pages or on the right of the pages, but I don't know how to add it on the exterior of each page.

How can I do that?

Here is a MWE.

\documentclass[doublepage]{book}

\usepackage{everypage}
\usepackage{tikz}

\def\exteriorBleeding{   
\begin{tikzpicture}[remember picture,overlay]
  \fill[blue] ([xshift=-2cm]current page.north east) rectangle (current page.south east);
\end{tikzpicture}}

\begin{document}

This is the first page.
\newpage
\AddEverypageHook{\exteriorBleeding}
On even pages, the bleeding margin should be on the left.
\newpage
On odd pages, the bleeding margin should be on the right.
\newpage

\end{document}

enter image description here

1

1 Answer 1

0

Inspired by this answer, here is a solution.

\documentclass[doublepage]{book}

\usepackage{everypage}
\usepackage{tikz}
\usepackage{changepage}


\def\exteriorBleeding{
\checkoddpage
\ifoddpage 
{%
\begin{tikzpicture}[remember picture,overlay]
  \fill[blue] ([xshift=2cm]current page.north west) rectangle (current page.south west);
\end{tikzpicture}
}
\else 
{%
\begin{tikzpicture}[remember picture,overlay]
  \fill[blue] ([xshift=-2cm]current page.north east) rectangle (current page.south east);
\end{tikzpicture}
}
\fi} 


\begin{document}

This is the first page.
\newpage
\AddEverypageHook{\exteriorBleeding}
On even pages, the bleeding margin should be on the left.
\newpage
On odd pages, the bleeding margin should be on the right.
\newpage

\end{document}
2
  • You can mark your own answer as the correct solution. :-)
    – Tommiie
    Feb 26 at 10:54
  • 1
    I have to wait two days! Thank for your help!
    – Colas
    Feb 26 at 11:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .