diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ef5f7e5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.aux +*.log +*.out +*.pdf diff --git a/charlie.jpg b/charlie.jpg new file mode 100644 index 0000000..1dc95e0 Binary files /dev/null and b/charlie.jpg differ diff --git a/kifschild.cls b/kifschild.cls index 578538f..17a4a63 100644 --- a/kifschild.cls +++ b/kifschild.cls @@ -20,6 +20,7 @@ \backgroundsetup{scale = 1.0, angle = 0, opacity = 1.0,% contents = {\includegraphics[width = \paperwidth, height = \paperheight, keepaspectratio] {background}}}% +\usepackage{ifthen} % fitbox stuff \usepackage{environ}% http://ctan.org/pkg/environ @@ -194,4 +195,40 @@ % pagestyle \pagestyle{empty} +\newcommand{\schild}[4]{ + \begin{minipage}[b][\textheight][b]{.25\textwidth}% + \centering + % QR code url is 3rd argument + \ifthenelse{\not{\equal{#3}{}}}{ + % qrcode + \qrcode[height=.95\textwidth]{#3} + \begin{fitbox}{.95\textwidth}{1cm} + \url{#3} + \end{fitbox} + }{\hfill} + % pictogram is 4th argument + \ifthenelse{\not{\equal{#4}{}}}{ + % pictogram + \includegraphics[width=\textwidth, keepaspectratio]{#4}% + }{\hfill} + \vspace{10px} + \end{minipage} + % + \hspace{.05\textwidth} + % + \begin{minipage}[b][\textheight][c]{.65\textwidth} + + \begin{fitbox}{\textwidth}{.5\textheight} % adjust textheight here if too big + \centering + #1 + \end{fitbox} + + \vspace{0cm} + \begin{fitbox}{\textwidth}{.22\textheight} + \centering + #2 + \end{fitbox} + \end{minipage} + +} diff --git a/kifschild.tex b/kifschild.tex index 07abf53..3fdf71d 100644 --- a/kifschild.tex +++ b/kifschild.tex @@ -1,34 +1,7 @@ \documentclass{kifschild} - \begin{document} -\begin{minipage}[b][\textheight][b]{.25\textwidth}% - \centering - % pictogram - %\includegraphics[width=\textwidth, keepaspectratio]{charlie.jpg}% - - % qrcode - \qrcode[height=.95\textwidth]{https://m.dvb.de} - \begin{fitbox}{.95\textwidth}{1cm} - \url{https://m.dvb.de} - \end{fitbox} -\end{minipage} -% -\hspace{.05\textwidth} -% -\begin{minipage}[b][\textheight][c]{.65\textwidth} - - \begin{fitbox}{\textwidth}{.5\textheight} % adjust textheight here if too big - \centering - NP - \end{fitbox} - - \vspace{2cm} - \begin{fitbox}{\textwidth}{.22\textheight} - \centering - Unisex-Toilette\\ - (nicht pissoiriert) - \end{fitbox} -\end{minipage} +\schild{Kein Papier?}{Sag dem Infopoint bescheid}{https://dvb.de}{} +\schild{Kein Papier!}{Ich sag' hier niemandem was.}{}{charlie.jpg} \end{document}