diff options
-rw-r--r-- | zeitung/main.tex | 12 | ||||
-rw-r--r-- | zeitung/parts/studenttemplate.tex | 26 |
2 files changed, 23 insertions, 15 deletions
diff --git a/zeitung/main.tex b/zeitung/main.tex index 3c65d29..4e54881 100644 --- a/zeitung/main.tex +++ b/zeitung/main.tex @@ -53,6 +53,14 @@ \fi } +% Flip image if even +\newcommand\evenflip[2][]{ + \checkoddpage + \ifoddpage\scalebox{-1}[1]{\includegraphics[#1]{#2}} + \else\includegraphics[#1]{#2} + \fi +} + \newcommand\disableheader{ \backgroundsetup{contents={}} } @@ -126,11 +134,11 @@ \fancyfootoffset{1.5cm} \fancyhf{} \fancyhead[L]{\hspace*{1cm}\vspace*{0cm}{\cartamarina\Huge{\rightmark}}} -\fancyfoot[R]{\vspace*{-0.8cm}\oddflip[keepaspectratio=true, width=\paperwidth]{welle.png}} +\fancyfoot[R]{\vspace*{-0.8cm}\evenflip[keepaspectratio=true, width=\paperwidth]{welle.png}} \fancyfoot[L]{ % Hacky but works :) \checkoddpage - \begin{textblock*}{1cm}(\ifoddpage 1.4cm \else 18.6cm \fi, \paperheight-2.1cm) + \begin{textblock*}{1cm}(\ifoddpage 18.6cm \else 1.4cm \fi, \paperheight-2.1cm) \begin{center} \huge{\thepage} \end{center} diff --git a/zeitung/parts/studenttemplate.tex b/zeitung/parts/studenttemplate.tex index b537b85..9f8f137 100644 --- a/zeitung/parts/studenttemplate.tex +++ b/zeitung/parts/studenttemplate.tex @@ -23,9 +23,9 @@ \def\ringwidth{250pt} \def\ringimgwidth{180pt} \def\ringoffset{(\ringwidth - \ringimgwidth) / 2} - \ifoddpage\else + \ifoddpage \def\ringx{-\paperwidth - 325pt} % ringwidth + 2 * ringx % Nope, idk anymore - \fi + \else\fi % Frame and QR-Code \def\framex{160pt} @@ -34,10 +34,10 @@ \def\frameimgwidth{160pt} \def\frameoffset{(\framewidth - \frameimgwidth) / 2} \def\qrcodex{90pt} - \ifoddpage\else + \ifoddpage \def\framex{540pt} % paperwidth - framewidth / 2 % Nope, idk anymore \def\qrcodex{470pt} - \fi + \else\fi \AddToShipoutPictureBG*{ \AtTextUpperLeft{ @@ -62,7 +62,7 @@ \includegraphics[keepaspectratio=true, width=\frameimgwidth]{\imgpath} } \put(\textwidth - \framex, \framey){ - \oddflip[keepaspectratio=true, width=\framewidth]{rahmen.png} + \evenflip[keepaspectratio=true, width=\framewidth]{rahmen.png} } \put(\textwidth - \qrcodex, \framey - 25pt){ \def\stdqrcode{#2} @@ -71,7 +71,7 @@ } } \put(\textwidth - \qrcodex, 250pt){ - \oddflip[keepaspectratio=true, height=3cm]{captain.png} + \evenflip[keepaspectratio=true, height=3cm]{captain.png} } } } @@ -79,11 +79,11 @@ % Steckbrief Tabelle \ifoddpage - \def\tablex{0.5\linewidth} - \def\tablewidth{0.55\linewidth} % Left side -\else \def\tablex{-0cm} \def\tablewidth{0.55\linewidth} % Right side +\else + \def\tablex{0.5\linewidth} + \def\tablewidth{0.55\linewidth} % Left side \fi \hspace*{\tablex}\vspace*{1.4cm}\begin{minipage}{\tablewidth} @@ -113,9 +113,9 @@ \providecommand\divider{ \begin{figure}[H] \ifoddpage - \hspace*{-1.5cm}\includegraphics[keepaspectratio=true, width=\paperwidth]{mittelwelle.png} - \else \hspace*{-1.5cm}\includegraphics[keepaspectratio=true, width=\paperwidth]{mittelwelle_r.png} + \else + \hspace*{-1.5cm}\includegraphics[keepaspectratio=true, width=\paperwidth]{mittelwelle.png} \fi \end{figure} } @@ -123,7 +123,7 @@ % Comments \def\commentswidth{0.7\linewidth} \ifoddpage - \def\commentsx{-0cm} -\else \def\commentsx{\framewidth} +\else + \def\commentsx{-0cm} \fi |