From 3045ccac64a1595a7ed89415cd0521e387bfa2c7 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 27 Jan 2021 23:28:55 +0100 Subject: That's dump (pun intended) --- zeitung/parts/studenttemplate.tex | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'zeitung/parts/studenttemplate.tex') diff --git a/zeitung/parts/studenttemplate.tex b/zeitung/parts/studenttemplate.tex index 72e7763..2f3e3b0 100644 --- a/zeitung/parts/studenttemplate.tex +++ b/zeitung/parts/studenttemplate.tex @@ -2,6 +2,17 @@ \clearpage +% Returns a default file if not found +\providecommand\dfincludegraphics[2][]{ + \IfFileExists{#2} + { + \includegraphics[#1]{#2} + } + { + %\fbox{File not found} + } +} + \providecommand\studentimages[1]{% % Ring \def\ringx{50pt} @@ -12,7 +23,7 @@ \AddToShipoutPictureBG*{ \AtTextUpperLeft{ \put(-\ringx + \ringoffset, -\ringy + \ringoffset){ - \includegraphics[keepaspectratio=true, width=\ringimgwidth]{parts/students/figures/#1.jpg} + \dfincludegraphics[keepaspectratio=true, width=\ringimgwidth]{parts/students/figures/#1.jpg} } \put(-\ringx, -\ringy){ \includegraphics[keepaspectratio=true, width=\ringwidth]{ring.png} @@ -29,7 +40,7 @@ \AddToShipoutPictureBG*{ \AtTextLowerLeft{ \put(\textwidth - \framex + \frameoffset, \framey + \frameoffset){ - \includegraphics[keepaspectratio=true, width=\frameimgwidth]{parts/students/figures/#1_child.jpg} + \dfincludegraphics[keepaspectratio=true, width=\frameimgwidth]{parts/students/figures/#1_child.jpg} } \put(\textwidth - \framex, \framey){ \includegraphics[keepaspectratio=true, width=\framewidth]{rahmen.png} -- cgit v1.2.3