From 9bcea6d78937bc80c603c99eafac38d4b32b988c Mon Sep 17 00:00:00 2001 From: "Marcus J. Ertl" Date: Wed, 28 Nov 2018 22:11:15 +0100 Subject: [PATCH] document allways has a multiple of 4 pages --- backside.tex | 30 +++--------------------------- main.tex | 9 --------- styles.tex | 25 ++++++++++++++++++++++++- 3 files changed, 27 insertions(+), 37 deletions(-) diff --git a/backside.tex b/backside.tex index 7dabff3..0bcb0d4 100644 --- a/backside.tex +++ b/backside.tex @@ -1,15 +1,14 @@ -\newgeometry{left=60mm, right=15mm, top=20cm, bottom=2.5cm} - -\cleardoublepage +\null\newpage \thispagestyle{RWBackside} +\newgeometry{outer=62mm, inner=15mm, top=20cm, bottom=2.5cm} \mbox{ }\vfill % pushing following text to bottom ;-) Dieses Dokument wurde nur unter der Verwendung von Open Source Software erstellt:\\ \definecolor{tableRow1}{RGB}{255,255,255} -\begin{tabularx}{\textwidth}{lX} +\begin{tabularx}{\textwidth}{@{}lX} {\fontspec{Latin Modern Roman}\hologo{LuaLaTeX}} & \url{http://www.luatex.org/} \\ %Scribus & \url{https://www.scribus.net/} \\ Inkscape & \url{https://www.inkscape.org/} \\ @@ -20,26 +19,3 @@ LibreOffice & \url{https://www.libreoffice.org/} \\ pdftk & \url{https://www.pdflabs.com/} \\ Linux & \url{https://www.linux.org/} \end{tabularx} - -% \begin{figure}[b] -% \begin{subfigure}[b]{0.22\textwidth} -% \begin{center} -% \vspace{-14pt} -% \includegraphics[width=\textwidth]{Bilder/opensource.pdf} -% \end{center} -% \end{subfigure}% -% \hfill% -% \begin{subfigure}[b]{0.72\textwidth} -% Dieses Dokument wurde nur unter der Verwendung von Open Source Software erstellt:\\ -% -% \begin{tabularx}{\textwidth}{lX} -% {\fontspec{Latin Modern Roman} \LaTeX} & \url{https://www.latex-project.org/} \\ -% Scribus & \url{http://www.scribus.net/} \\ -% Inkscape & \url{http://www.inkscape.org/} \\ -% The Gimp & \url{http://www.gimp.org/} \\ -% LibreOffice & \url{http://de.openoffice.org/} \\ -% pdftk & \url{http://www.pdfhacks.com/pdftk/} \\ -% Linux & \url{http://www.linux.org/} -% \end{tabularx} -% \end{subfigure} -% \end{figure} diff --git a/main.tex b/main.tex index 0ba6bf2..fb42c65 100644 --- a/main.tex +++ b/main.tex @@ -264,20 +264,11 @@ Für den Stabtunnel wird die Mitte des Schrägbands markiert. Das Schrägband an - - - - - - - \cleardoublepage \input{teilnehmer.tex} \newpage \listoffixmes -\input{backside.tex} - \end{document} diff --git a/styles.tex b/styles.tex index 83ec32e..b42871e 100644 --- a/styles.tex +++ b/styles.tex @@ -30,6 +30,28 @@ \usepackage{varioref} \usepackage{csvsimple} +\usepackage{refcount,lastpage} +\usepackage{kantlipsum} +\makeatletter +\newcommand{\checkmultipleoffour}{% + \count@=\getpagerefnumber{LastPage}% + \count@=\the\numexpr\count@+1\relax + \@tempcnta=\count@ + \divide\@tempcnta by 4 + \multiply\@tempcnta by 4 + \count@=\numexpr\count@-\@tempcnta\relax + \ifnum\count@>0 + \pagestyle{empty} + \loop\ifnum\count@<3 + \null\clearpage + \advance\count@\@ne + \repeat + \fi + \input{backside.tex} +} +\makeatother +\AtEndDocument{\checkmultipleoffour} + % font settings \directlua{ fonts.handlers.otf.addfeature{ @@ -74,6 +96,7 @@ %\addtocontents{toc}{\cftpagenumbersoff{subsection}} %\addtocontents{toc}{\cftpagenumbersoff{subsubsection}} \renewcommand{\cftsecfont}{} +\renewcommand{\cftsecpagefont}{} \pagenumbering{arabic} @@ -273,7 +296,7 @@ \DeclareNewLayer[% align=tl, hoffset=15mm, - voffset=22.2cm, + voffset=21.7cm, width=35mm, height=60mm, contents={%