我正在写一份双页文档。
我想在外部的每页之后的某页。
我知道如何在页面左侧或页面右侧添加出血区域,但我不知道如何在每页的外部添加它。
我怎样才能做到这一点?
这是一个 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}
答案1
灵感来自这个答案,这里有一个解决方案。
\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}