From 5feb9b1af9f6ff5b2e08bf9c7cc85ffc0f313945 Mon Sep 17 00:00:00 2001
From: Marvin Borner
Date: Thu, 28 Jan 2021 12:22:51 +0100
Subject: Aah oddflip

---
 zeitung/parts/studenttemplate.tex | 38 +++++++++++++++++++++++++++-----------
 1 file changed, 27 insertions(+), 11 deletions(-)

(limited to 'zeitung/parts/studenttemplate.tex')

diff --git a/zeitung/parts/studenttemplate.tex b/zeitung/parts/studenttemplate.tex
index 0acfb0d..eed97ac 100644
--- a/zeitung/parts/studenttemplate.tex
+++ b/zeitung/parts/studenttemplate.tex
@@ -17,23 +17,21 @@
 	\checkoddpage
 
 	% Ring
-	% \ifoddpage
-	% 	\def\ringx{50pt}
-	% \else
-	% 	\def\ringx{\pagewdith - 50pt}
-	% \fi
 	\def\ringx{50pt}
 	\def\ringy{250pt}
 	\def\ringwidth{250pt}
 	\def\ringimgwidth{180pt}
 	\def\ringoffset{(\ringwidth - \ringimgwidth) / 2}
+	\ifoddpage\else
+		\def\ringx{-\paperwidth - 350pt} % ringwidth + 2 * ringx
+	\fi
 	\AddToShipoutPictureBG*{
 		\AtTextUpperLeft{
 			\put(-\ringx + \ringoffset, -\ringy + \ringoffset){
-				\dfincludegraphics[keepaspectratio=true, width=\ringimgwidth]{parts/students/figures/#1.jpg}
+				\dfincludegraphics[keepaspectratio=true, width=\ringimgwidth]{parts/students/figures/bornerma.jpg}
 			}
 			\put(-\ringx, -\ringy){
-				\includegraphics[keepaspectratio=true, width=\ringwidth]{ring.png}
+				\oddflip[keepaspectratio=true, width=\ringwidth]{ring.png}
 			}
 		}
 	}
@@ -44,13 +42,16 @@
 	\def\framewidth{180pt}
 	\def\frameimgwidth{160pt}
 	\def\frameoffset{(\framewidth - \frameimgwidth) / 2}
+	\ifoddpage\else
+		\def\framex{518pt} % paperwidth - framewidth / 2
+	\fi
 	\AddToShipoutPictureBG*{
 		\AtTextLowerLeft{
 			\put(\textwidth - \framex + \frameoffset, \framey + \frameoffset){
-				\dfincludegraphics[keepaspectratio=true, width=\frameimgwidth]{parts/students/figures/#1_child.jpg}
+				\dfincludegraphics[keepaspectratio=true, width=\frameimgwidth]{parts/students/figures/bornerma_child.jpg}
 			}
 			\put(\textwidth - \framex, \framey){
-				\includegraphics[keepaspectratio=true, width=\framewidth]{rahmen.png}
+				\oddflip[keepaspectratio=true, width=\framewidth]{rahmen.png}
 			}
 		}
 	}
@@ -58,10 +59,17 @@
 
 \providecommand\studentprofile[8]{%
 	\sectionmark{Steckbrief - #1}
+	\checkoddpage
 
 	% Steckbrief Tabelle
+	\ifoddpage
+		\def\tablex{12}
+	\else
+		\def\tablex{3}
+	\fi
+	\def\tabley{-5}
 	\begin{tikzpicture}[overlay]
-		\node[text width=250pt, align=left] at (12, -5) {
+		\node[text width=250pt, align=left] at (\tablex, \tabley) {
 			\Large{\begin{tabular}{@{}ll@{}}
 					\textbf{Name:}           & #1 \\
 					\textbf{Geburtstag:}     & #2 \\
@@ -77,8 +85,16 @@
 }
 
 \providecommand\studenttable[2]{%
+	\checkoddpage
+
+	\ifoddpage
+		\def\tablex{-1.25cm}
+	\else
+		\def\tablex{5cm}
+	\fi
+
 	\vskip 10cm
-	\hspace*{-1.2cm}
+	\hspace*{\tablex}
 	\Large{\begin{tabular}{@{}ll@{}}
 			\textbf{Erkennungsmerkmale:} & #1 \\
 			\textbf{Zukunftspläne:}      & #2 \\
-- 
cgit v1.2.3

