diff options
author | Marvin Borner | 2021-01-27 23:28:55 +0100 |
---|---|---|
committer | Marvin Borner | 2021-01-27 23:28:55 +0100 |
commit | 3045ccac64a1595a7ed89415cd0521e387bfa2c7 (patch) | |
tree | 40989f641afead3fee265715fb3be950323c2456 /zeitung/parts/studenttemplate.tex | |
parent | a032120bf8fe1e905082ade0dd14fd2198a4574b (diff) |
That's dump (pun intended)
Diffstat (limited to 'zeitung/parts/studenttemplate.tex')
-rw-r--r-- | zeitung/parts/studenttemplate.tex | 15 |
1 files changed, 13 insertions, 2 deletions
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} |