%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% included packages
% use Helvetica (or equivalent)
\usepackage{helvet}
\renewcommand{\familydefault}{phv}

% use UTF8 symbols
\usepackage[utf8]{inputenc}

% load ticket.sty with a ticket definition (which is overridden below)
\usepackage[freepin,circlemark,rowmode]{ticket}

% other packages
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{afterpage}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% layout definitions
% these work for the ``digital'' brand 2x4 labels
\unitlength=1mm
\hoffset=-25.2mm
\voffset=-16.0mm
\ticketNumbers{2}{4}
%\ticketSize{88}{58} % in unitlength
\ticketSize{105}{67.3} % in unitlength
\ticketDistance{0}{0} %in unitlength

% student badge
\newcommand{\badge}[3]{\ticket{%
    \put(52, 54){\makebox[0mm]{\bfseries\LARGE #1}}
    \put(52, 45){\makebox[0mm]{\large #2}}
    \put(52, 39){\makebox[0mm]{\large #3}}
    \put(10, 26){Name: \line(1,0){74}}
    \put(10, 13){Detections:}
    \emblem
%     \branding
}}

% default is blank background
% branding, emblem only added to \badge
\renewcommand{\ticketdefault}{%
\branding
}

\newcommand{\explanation}{
\ticket{
\put(10,60){
\begin{minipage}[t]{84mm}%
  {\large\bfseries How to play this game:}\\
%    {\bfseries Règle du jeu :}\\
% \small
\explaintext
 Welcome to the IceCube Masterclass!\\\\
%  Bienvenue à la Masterclass d'IceCube!\\\\
\end{minipage}
}%put
}%ticket
}%newcommand

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% macros
% IceCube branding
\newcommand{\branding}{
% option A: watermark
\put(5,  5){\includegraphics[width=40mm]{graphics/icecube}}
% option B: bottom line
% \put(4,  4){\includegraphics[width=80mm]{graphics/icecube-line}}
}
\newcommand{\emblem}{} % gets defined in individual docs

\newcommand{\explaintext}{} % gets defined in individual docs


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% pages

% page with info-less badges
\newcommand{\emptypage}{
\badge{}{}{}\badge{}{}{}\badge{}{}{}\badge{}{}{}\badge{}{}{}
\badge{}{}{}\badge{}{}{}\badge{}{}{}%\badge{}{}{}\badge{}{}{}
}

% page with explanations
\newcommand{\explanationpage}{
\newpage\ticketreset
%\backside
\explanation\explanation\explanation\explanation\explanation
\explanation\explanation\explanation%\explanation\explanation
}

% white page
\newcommand\blankpage{%
    \null
    \thispagestyle{empty}%
    \addtocounter{page}{-1}%
    \newpage}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% shortcuts
\newcommand{\nl}{nederlands}
\newcommand{\fr}{français}
\newcommand{\en}{english}
\newcommand{\de}{Deutsch}
\newcommand{\es}{español}
\renewcommand{\it}{italiano}
\newcommand{\el}{ελληνικά}
\newcommand{\?}[1]{\textit{#1}}
