% Hoofdingtest: \OR toegevoegd: indien [geen] moet vakje onder naam leraar leeg blijven
% Hoofddingtest: [] als Atotaal, anders [A], [B] of [C] of [geen]
% donderdag 25 november 2010:  \lhead enn \rightmark en \sectionmark eindelijk gevonden!
% donderdag 25 november 2010 optie [geen]: zonder puntentabel
% vrijdag   22 januari   2010: hoofdingtest eerste pagina thispagestyle{empty} verwijderd; \par toegevoegd  ???? bestaat dit nog???????

\usepackage{preamble}
% ===============================================
% ====== Hoofding 
% ===============================================
\newcommand{\titel}{}
\newcommand{\klas}{}
\newcommand{\naam}{}
\newcommand{\ikwasklaarom}{}
\newcommand{\datum}{}
\newcommand{\datuminhaling}{}
\newcommand{\aantalpaginas}{}
\newcommand{\testnummer}{}
% ===============================================
% ====== Commands with more than one optional arguments
% ===============================================
%Eerste optioneel argument: \ArgI
%Tweede optioneel argument: #1
\newcommand{\hoofdingtitel}{
   {\sffamily
   \begin{center}
   {\LARGE\  \textcolor{black} \jobname{} \footnotesize{\today} }
   \end{center}
   }
}
\newcommand{\hoofdingtest}[1][]{%niets, Atotaal, A, B of C(=inhaaltest) of leeg 
    \def\ArgI{{#1}}%
    \blabla[#1]
}
%\usepackage{xargs}
\newcommand{\blabla}[1][A]{
   %\thispagestyle{empty}
   {\sffamily
   \begin{center}
   {\LARGE\  \textcolor{black} \titel}
   \end{center}
   \begin{tabular}{p{6cm}ll}%
     \raisebox{-2.5ex}[0ex][0ex]{\figuur{1.7em}{silalogo}} ~ Sint-Lambertus Westerlo  &\klas & Naam: \naam
      %\includegraphics[width=1.5em]{silalogo} ~ 
      \\\hspace{1.7em} ~ Leraar: Wilfried Van Hirtum                                  &      & Nr.:
      \\\ifthenelse{\equal{\ArgI}{{Atotaal}}\OR\equal{\ArgI}{{geen}}}{}{\ArgI} \ifthenelse{\equal{\ikwasklaarom}{}}{}{                     & Ik was klaar om: \quad \qquad \\}
         %\raisebox{-.5cm}{\includegraphics[height=.75cm]{klok}}\\ }
                                                                       %& Klas: \klas
								     && 
      \ifthenelse{\equal{\ArgI}{{C}}}{\cancel{\datum}  \qquad \testnummer 
                  \\&& Datum inhaling: \hphantom{M} \datuminhaling 
               }
               {\datum \qquad \testnummer} \qquad 
      %\ifthenelse{\equal{\testnummer}{}}{}{                          \testnummer}      
      %\ifthenelse{\equal{\testnummer}{}}{}{\\                          & \testnummer}      
      \ifthenelse{\equal{\aantalpaginas}{}}{}{\\                       &  & Aantal pagina's: \aantalpaginas}
   \end{tabular}\par
   %\ifthenelse{\equal{#1}{totaal}}{\footnotesize\pointtable[h]}{}}%
   %\ifthenelse{\equal{#1}{ }}{\footnotesize\partialpointtable{a}[h]}{}}%
   \ifthenelse{\equal{#1}{}}{\footnotesize\pointtable[h]}{}%
   \ifthenelse{\equal{#1}{Atotaal}}{\footnotesize\pointtable[h] \\ \partialpointtable{A}[h]}{}%
   \ifthenelse{\equal{#1}{A}}{\footnotesize\partialpointtable{A}[h]}{}%
   \ifthenelse{\equal{#1}{B}}{\footnotesize\partialpointtable{B}[h]}{}%
   \ifthenelse{\equal{#1}{C}}{\footnotesize\partialpointtable{C}[h]}{}%
   \ifthenelse{\equal{#1}{geen}}{}{}%
   }
}
\pointsinmargin
\pointpoints{pt}{pt}
\pointformat{({\sffamily\footnotesize\thepoints})~}
\renewcommand{\questionlabel}{\llap{\colorbox{grijs}{\makebox[1.2em][c]{\bfseries\sffamily \thequestion}}\hspace{-0.0em}}}
\renewcommand{\solutiontitle}{\noindent\textbf{Oplossing:}\par\noindent}
\hqword{Vraag}
\hpword{Punten}
\htword{Totaal} 
%\lfoot[
	%\ifthenelse{\equal\numpages{1}}{slechts één pagina}{}
	%{\jobname}
	%]
	%{\thesection}
% ===============================================
% ====== Eens proberen, gevonden in de fancyhdr.sty en na lang zoeken op internet
% ===============================================
% ===============================================
% ====== Ma question est toute simple, à quoi servent les commandes \leftmark et \rightmark?
% ===============================================
% \leftmark : contient le nom du chapitre courant.
% \rightmark : contient le nom de la section courante.
% \leftmark et \rightmark sont définies à l'aide des commandes \chaptermark et \sectionmark
% 		Pour modifier leur valeur, il suffira de redéfinir 
%		\chaptermark et/ou \sectionmark selon son besoin
%===============================================
\renewcommand{\sectionmark}[1]{\markright{\small \sffamily \bfseries \thesection{} ~  #1}}
\rhead{\rightmark \sectionmark{} }	
\rfoot[\ifthenelse {\equal\numpages{1}} {$\square$ } {} {\footnotesize \jobname}]{}
\cfoot[\ifthenelse{\equal\numpages{1}}{}{\thepage{} / \numpages{}}]{\thepage{} / \numpages{}}
\renewenvironment{TheSolution}%
  {%
    \par
    \vspace{\parskip}%
    % If we don't set \leftskip and \rightskip to 0pt, then if we
    % appear inside of an \uplevel command we'd have indentation
    % inside of the solution box:
    \leftskip=0pt
    \rightskip=0pt
    %\if@framedsolutions
      %% Do nothing; we'll use the default \FrameCommand
    %\else
      %\def\FrameCommand{\colorbox{SolutionColor}}%
    %\fi
    %\MakeFramed{\advance\hsize-\width}%
    \solutiontitle
    \ignorespaces
  }%
  {%
    %\unskip
    %\endMakeFramed
	%%\clearpage
  }%
\usepackage[text={13cm, 24cm}, hmarginratio=1:1]{geometry}
\geometry{text={15cm, 25cm}}
% ===============================================
% ====== Onderverdeling punt in marge, geen marginnote gebruiken: te veel floats!!!
% ===============================================
\newcommand{\punt}[1]{\leavevmode  \llap{\makebox[4em][l]{/#1}}\ignorespaces}

