From 8c629a12ed7ac964e9c3b79693144496d256ad3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <andreas.mueller@ost.ch>
Date: Mon, 24 Jan 2022 18:37:24 +0100
Subject: include cover in PDF

---
 buch/buch.tex | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

(limited to 'buch/buch.tex')

diff --git a/buch/buch.tex b/buch/buch.tex
index de40b1f..e708b72 100644
--- a/buch/buch.tex
+++ b/buch/buch.tex
@@ -34,6 +34,12 @@ pdfauthor={Andreas Müller}
 \DeclareGraphicsRule{*}{mps}{*}{}
 \begin{document}
 
+% cover page
+\ifthenelse{\boolean{includecover}}{
+\incgraph[documentpaper][width=\paperwidth,height=\paperheight]{../cover/buchcover.jpg}
+\newpage\null\thispagestyle{empty}\newpage
+}{}
+
 \input{common/titlepage.tex}
 
 % add common macros
@@ -50,6 +56,12 @@ pdfauthor={Andreas Müller}
 \lhead{Index}
 \rhead{}
 \addcontentsline{toc}{chapter}{\indexname}
-\input{buch.ind}
+\InputIfFileExists{buch.ind}
+
+% cover page
+\ifthenelse{\boolean{includecover}}{
+\newpage\null\thispagestyle{empty}\newpage
+\incgraph[documentpaper][width=\paperwidth,height=\paperheight]{../cover/backcover.jpg}
+}{}
 
 \end{document}
-- 
cgit v1.2.1

