misc/Kaffeeliste/Konsum/Konsum.tex

165 lines
3.8 KiB
TeX

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DATEI: Konsum.tex
% AUTOR: Gaetano Geck
%
% BESCHREIBUNG: Erzeugt eine Ankreuzliste für die Anzahl der Tassen zubereiteten
% Kaffees.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{scrartcl}
%\usepackage{luatex85}
%\usepackage{luaotfload}
%\usepackage[EU2]{fontenc}
\usepackage{lmodern}
\usepackage[left=0.5cm,right=0.5cm,top=.5cm,bottom=.5cm]{geometry}
\usepackage{tcolorbox}
\usepackage{pgffor}
\usepackage{ifthen}
\usepackage{amssymb}
\pagestyle{empty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Daten (Könige des Kaffees, Unbeherrschte, Vieltrinker, Gelegenheitstrinker)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{Konsumenten.tex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LAYOUT (Standardwerte)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\providecommand{\Name}[1]{\large\textbf{#1}}
\providecommand{\Blockseparator}{\quad}
\providecommand{\Zeilenseparator}{\\}
\providecommand{\Symbol}{$\Box$}
\providecommand{\Zeitraum}{??-?? ????}
\providecommand{\Info}{}
\providecommand{\Anzahl}[1]{\tiny #1}
\providecommand{\AnzahlGaeste}{3}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{Titel}%
{%
\begin{center}%
\Huge%
}%
{%
\end{center}%
}
\newenvironment{Eintrag}[1][]%
{%
\begin{tcolorbox}%
[%
leftrule=5mm,%
colframe=gray!50!white,%
colback=white,%
boxsep=1mm,%
#1,%
]%
}%
{%
\end{tcolorbox}%
}
% \Kreuze
% #1: Anzahl der Zeilen (z)
% #2: Anzahl der Blöcke (b)
% #3: Blockgröße (g)
% --------------------------------------
\newcommand{\Kreuze}[3]{%
\foreach \zeile in {1,...,#1}{%
\foreach \block in {1,...,#2}{%
\foreach \eintrag in {1,...,#3}{%
\Symbol
}%
\Blockseparator
}%
\pgfmathparse{int(\zeile*#2*#3)}\Anzahl{\pgfmathresult}%
\ifthenelse{\equal{\zeile}{#1}}{}{\\[-0.0mm]}%
}%
}
\newcommand{\Label}[2][]{%
\ifstrempty{#1}{%
\def\Farbe{gray}%
}{%
\def\Farbe{gray!50!red}%
}%
\hfill\textbf{\textcolor{\Farbe}{#2}}
}
\newcommand{\Eintraege}[5]{%
\foreach \name in #1 {%
\begin{Eintrag}
\begin{minipage}[h]{3.0cm}
\vspace*{#5}
\Name{\name}
\end{minipage}
\begin{minipage}[h]{23cm}
\vspace*{#3}
\Kreuze{#2}{8}{5}\vspace{-\baselineskip}
\end{minipage}
\vspace*{#4}
\end{Eintrag}
}%
% \vspace*{.5em}
}
\begin{document}
\sffamily
\begin{Titel}
\textbf{Kaffee} (\Zeitraum) \textbf{Coffee}
\end{Titel}
\vspace{-4mm}
{\hfill \Info \hfill}
% \Label[gray!50!red]{Kings of Coffee}
% \foreach \name in \KingsOfCoffee {%
% \begin{Eintrag}[colframe=gray!50!red]
% \vspace*{-1.5mm}
% \begin{minipage}[h]{3.0cm}
% \Name{\name}
% \end{minipage}
% \begin{minipage}[h]{23cm}
% \Kreuze{4}{8}{5}\vspace{-\baselineskip}
% \end{minipage}
% \vspace*{+2.4mm}
% \end{Eintrag}
% }%
% \Label{Unbeherrschte}
\textbf{Lehrstuhl Informatik 1}
%\Eintraege{\UnbeherrschteLSI}{3}{-1mm}{+1mm}{0mm}
\Eintraege{\VieltrinkerLSI}{2}{-2mm}{-2mm}{0mm}
\Eintraege{\GelegenheitstrinkerLSI}{1}{-6mm}{-6mm}{-1mm}
\vspace{.25cm}
\textbf{Lehrstuhl Informatik 2}
%\Eintraege{\UnbeherrschteLSII}{3}{-1mm}{+1mm}{0mm}
\Eintraege{\VieltrinkerLSII}{2}{-2mm}{-2mm}{0mm}
%\Eintraege{\GelegenheitstrinkerLSI}{1}{-6mm}{-6mm}{-1mm}
%\pagebreak
%\vfill
\vspace{.25cm}
\textbf{Gäste/Guests/Add-ons}
\foreach \name in {1,...,\AnzahlGaeste} {%
\begin{Eintrag}[colframe=gray!70!green]%
\begin{minipage}[h]{3.0cm}%
\Huge ~%
\end{minipage}%
\begin{minipage}[h]{23cm}%
\vspace*{-5.0mm}%
\Kreuze{1}{8}{5}\vspace{-\baselineskip}%
\vspace*{-1.5mm}%
\end{minipage}%
\end{Eintrag}%
\vspace*{-2mm}%
}%
\end{document}