From 603f648a8618cc39d8ec8d5c6d08e7f5a6bab16e Mon Sep 17 00:00:00 2001 From: Peter Nerlich Date: Thu, 23 Sep 2021 02:09:15 +0200 Subject: [PATCH] ensure back cover is on the last page of the brochure --- cover/back.tex | 9 ++++++++- macros.tex | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cover/back.tex b/cover/back.tex index 805db1a..65e4344 100644 --- a/cover/back.tex +++ b/cover/back.tex @@ -1,4 +1,11 @@ -\newpage +\cleardoubleevenemptypage +%make sure we are on a page divisible by 4 for the brochure to work out +\ifcase\numexpr \modulo{\value{page}}{4} \relax +\or% +\or% +\thispagestyle{empty}\hbox{}\cleardoubleevenemptypage\or% +\relax% +\fi% \thispagestyle{empty} %keine Seitenzahl \color{white} diff --git a/macros.tex b/macros.tex index 3584e25..4f2b5d9 100644 --- a/macros.tex +++ b/macros.tex @@ -37,3 +37,5 @@ \href{#1}{\@tmpkey}% } \makeatother + +\def\modulo#1#2{\ifnum#1=0 0\else(#1-#2*((2*#1-#2)/(2*#2)))\fi}