% \iffalse meta-comment
%
%
% Copyright (C) 2010-2011 by Paul Levrie  <paul.levrie@kdg.be>
%                        and Walter Daems <walter.daems@kdg.be>
%
% This work may be used, distributed and/or modified under the
% conditions of the KdG-only LICENSE version 1.0.
%
% This license can be found in the file LICENSE of this work.
%
% This work consists of the files listed in the file manifest.txt.
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{kdgcoursetext.dtx}
%</driver>
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{kdgcoursetext}
%<*class>
    [2011/03/13 v0.4 .dtx skeleton file]
%</class>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{makeidx}
\usepackage{alltt}
\usepackage{booktabs}
\IfFileExists{tocbibind.sty}{\usepackage{tocbibind}}{}
\IfFileExists{hyperref.sty}{\usepackage[bookmarksopen]{hyperref}}{}
\EnableCrossrefs         
\CodelineIndex
\RecordChanges
\begin{document}
  \DocInput{kdgcoursetext.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{0}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%
% \changes{v0.1}{2011/03/10}{
%   Initial version}
% \changes{v0.2}{2011/03/11}{
%   Improved documentation based on revision by Paul}
% \changes{v0.3}{2011/03/12}{\\
%   - Fixed treatment of ligatures for XeTeX\\
%   - Made workaround for positioning of titlepagepicture to overcome
%     XeLaTeX problems.\\
%   - Introduced department and departmentacronym tag macros to
%     allow other departments to use this class.
%   - Made package compliant to CTAG TDS guidelines}
% \changes{v0.4}{2011/03/13}{\\
%   - Corrected license conditions after remark about inconsistency by CTAN maintainer}
% 
% \GetFileInfo{kdgcoursetext.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
% \setlength{\parindent}{0em}
% \addtolength{\parskip}{0.5\baselineskip}
%
% \title{The \textsf{kdgcoursetext} class\thanks{This document
%   corresponds to \textsf{kdgcoursetext}~\fileversion, dated \filedate.}}
% \author{Paul Levrie (\texttt{paul.levrie@kdg.be})\\
%         Walter Daems (\texttt{walter.daems@kdg.be})}
%
% \maketitle
%
% \section{Introduction}
%
% As of 2010, The Karel de Grote University College has adopted a new
% house style. 
% This class file implements the house style for course texts.
% Using this class file will make it easy for you to make and keep
% your course texts compliant to this version and future versions of
% the KdG house style.
%
% If you think
% \begin{itemize}
%   \item there's an error in compliancy w.r.t. the house style,
%   \item there's a feature missing in this class file,
%   \item there's a bug in this class file,
% \end{itemize}
% please, contact us through e-mail (|paul.levrie@kdg.be| or
% |walter.daems@kdg.be|). We'll provide you with an answer
% and if (and as soon as) possible with a solution to the problem
% you spotted.
%
% Do you like this class file? You're welcome to send us beer, wine,
% or just kind words.
%
% \section{Synopsis}
% The |kdgcoursetext| class is an extension to the standard \LaTeX{}
% |book| class. It is intended to be used for writing course texts. It
% provides a title page that is compliant to the KdG house style, and
% it also typesets the rest of your document appropriately.
%
% It requires (and uses) the following packages:
% \begin{itemize}
%   \item the |geometry| package
%   \item the |hyperref| package
%   \item the |fontspec| package (if you are using Xe\TeX)
%   \item the |winfonts| or |verdana| package (if you are not using Xe\TeX)
%   \item the |cmbright| package
%   \item the |graphicx| package
%   \item the |eso-pic| package
%   \item the |color| package
%   \item the |tikz| package
%   \item the |fancyhdr| package
% \end{itemize}
% so make sure these packages are available to your
% \LaTeX{} compiler.
%
% Note: the class supports stuff that deviates from good
% practice. E.g., the class also support two-sided course material,
% while our students have indicated that they prefer one-sided course
% material.
%
% \section{Portability}
% This class file should be ready to use with all common \LaTeX{}
% compilers (PDF\LaTeX{}, \LaTeX{}, Xe\LaTeX{},\ldots) from the major
% \TeX{}-distributions (TeTeX, TexLive, MikTeX). If you experience
% problems, please inform the authors.
%
% \section{Usage}
%
% \subsection{Basic Usage}
%
% To use this class, use the following harness for your \LaTeX{}
% course text:
% \begin{verbatim}
% \documentclass[a4paper]{kdgcoursetext}
%
% \usepackage{<include any packages you require here>}
%
% \department{Industri\"ele Wetenschappen en Technologie}
% \departmentacronym{IWT}
%
% \title{<put your title here>}
% \subtitle{<put your subtitle here>}
% \author{<put your name here>}
%
% \courseversion{<put a version identifier here>}
% \versionyear{<the publication date of the course here>}
% \versioncomment{<some text clarifying the particulars of this version>}
% 
% \professor{<professor teaching the course>}
% \programme{<descriptor of first programme>}
% \coursecode{<first course code>}% 
%
% \academicyear{<XXXX-YYYY>}
%
% \titlepagepicture{coolphoto.jpg}
%
% \begin{document}
%   \maketitle
%
%   % put your LaTeX code here
%
% \end{document}
% \end{verbatim}
% 
% \subsection{The macros explained}
%
% \DescribeMacro{\department} (optional)
%   This macro sets the department name.
%   It defaults to 'Industri\"ele Wetenschappen en Technologie'.
%
% \DescribeMacro{\departmentacronym}
%   This macro sets the acronym of the department.
%   It defaults to 'IWT'.
%
% \DescribeMacro{\title} (mandatory) 
% This macro sets the title of the document.
% It also sets the |pdftitle| tag of the hyperref package, so that
% the PDF-document meta-information is correct.
%
% \DescribeMacro{\subtitle} (optional)
% This macro sets the title of the document. You may use this 
% \begin{itemize}
% \item to further clarify the title
% \item to indicate the nature of this document
% \end{itemize}
% The latter is to be considered when you want to provide multiple
% documents as parts of the full course text (e.g., Course Notes,
% Formula Collection, Exercise Book, Solution Book).
% This macro also sets the |subject| tag of the hyperref package,
% so that the PDF-document meta-information is correct.
%
% \DescribeMacro{\author} (mandatory)
% This macro sets the author of the document.
% It also sets the |pdfauthor| tag of the hyperref package, so that
% the PDF-document meta-information is correct.
%
% \DescribeMacro{\courseversion} (optional)
% This macro indicates which version of the course this is.
% You may use your own versioning system that puts things clear for you.
%
% \DescribeMacro{\versionyear} (mandatory)
% This is to be the year in which you published the current version of
% the course in the form YYYY.
%
% \DescribeMacro{\versioncomment} (optional)
% This (optional) macro is to be used if you want to mention some
% relevant information regarding this version. E.g., if this version
% only differs slightly from the previous one (spelling corrections
% and the addition of a few examples), you may indicate this to make
% sure that people who have to retake your course aren't bying a new
% version.
%
% \DescribeMacro{\professor} (mandatory)
% This is the name of the person that actually teaches the course (in
% Dutch: titularis). If there are mutliple persons, please, use the
% macros |\professori|, |\professorii|, |\professoriii|,
% |\professoriv|. If you are more than four, teaching the course, ask
% your boss to reassign you to a different course.
%
% \DescribeMacro{\programme} (mandatory)
% Code of the subject you are teaching. This should be of the form:\\
% |KdG-IWT-ZZ-VV-XXYY-ABC|
% with:
% \begin{center}
%   \begin{tabular}{cp{10cm}}
%     \toprule
%       Code & Explanation \\
%     \midrule
%       |KdG|  & To be kept verbatim\\
%       |IWT|  & Replace by the three-character acronym of your
%       department \\
%       |ZZ|   & Either 'PB', 'AB' or 'MA', depending on wether this is
%       a course for professional bachelors, academic bachelors or
%       masters.\\
%       |VV|   & Designator for the programme this course is a part of
%       (e.g., ATF, AU, BCH, BL, BLC, C, CH, EI, EM, MCT)\\
%       |XXYY| & Designator for the academic year this course is used
%       in. The year 2010-2011 is abbreviated as 1011.\\
%       |ABC|  & The number of the course (A indicates the year, BC is
%       just a number); the correct number can be found in the study guide.\\
%     \bottomrule
%   \end{tabular}
% \end{center}
%
% \DescribeMacro{\academicyear} (mandatory)
% Use this macro to specify the academicyear in full, i.e. in the form
% |XXXX-YYYY|. 
%
% \DescribeMacro{\titlepagepicture} (optional)
% Specify the filename of a picture you want to appear on your
% titlepage. The picture should display itself nice in the size
% 13,99cm $\times$ 9cm.
%
% \DescribeMacro{\copyrightnotices} (optional)
% Use this macro to specify additional copyright notice messages to
% appear in het copyright notice on the bottom of page 2 of your
% course text.
%
%
% \subsection{Example}
% \begin{verbatim}
%<*example>
\documentclass[a4paper,11pt,oneside,openright,english,copyright]{kdgcoursetext}

\usepackage[english,dutch]{babel}
\selectlanguage{english}

\title{Zagen, zoeken en zuchten}
\subtitle{Cursusnota's}
\author{Walter Daems en Paul Levrie}

\courseversion{ZZZ-1011-1.3-CN}
\versionyear{2010}
\versioncomment{Kleine wijzigingen i.vgl.m. versie 2009}

\professori{Zeger de Zager}
\professorii{Zoltan Zoekers}
\professoriii{Siana Sigh}

\programme{Master IW - Houtbewerking (Meubel en Kunst)}
\coursecodei{KdG-IWT-MA-HM-10-404}
\coursecodeii{KdG-IWT-MA-HK-10-407}
\coursecodeiii{KdG-IWT-MA-H-10-411}

\academicyear{2010-2011}

\titlepagepicture{pi-orchid.jpg}

\copyrightnotices{
  The graphics in this document have been typeset using \texttt{TikZ}.\\
  This document has been \TeX-ed on a GNU/Linux workstation.
}

\begin{document}
\selectlanguage{dutch} % or english if your text is in English

\maketitle

\frontmatter

\tableofcontents

\mainmatter
\chapter*{Inleiding}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.


\chapter{Onzin voor dummies}

\section{Een beetje Cicero}
Sed ut perspiciatis unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae
ab illo inventore veritatis et quasi architecto beatae vitae dicta
sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit
aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos
qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui
dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed
quia non numquam eius modi tempora incidunt ut labore et dolore magnam
aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex
ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in
ea voluptate velit esse quam nihil molestiae consequatur, vel illum
qui dolorem eum fugiat quo voluptas nulla pariatur?

\begin{equation}
  e^{-j\pi} + 1 = 0
\end{equation}

At vero eos et accusamus et iusto odio dignissimos ducimus qui
blanditiis praesentium voluptatum deleniti atque corrupti quos dolores
et quas molestias excepturi sint occaecati cupiditate non provident,
similique sunt in culpa qui officia deserunt mollitia animi, id est
laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita
distinctio. Nam libero tempore, cum soluta nobis est eligendi optio
cumque nihil impedit quo minus id quod maxime placeat facere possimus,
omnis voluptas assumenda est, omnis dolor repellendus. Temporibus
autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe
eveniet ut et voluptates repudiandae sint et molestiae non
recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut
reiciendis voluptatibus maiores alias consequatur aut perferendis
doloribus asperiores repellat.

\section{En waartoe het geleid heeft}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.

\subsection{Herhaling}
Sed ut perspiciatis unde omnis iste natus error sit voluptatem
accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae
ab illo inventore veritatis et quasi architecto beatae vitae dicta
sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit
aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos
qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui
dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed
quia non numquam eius modi tempora incidunt ut labore et dolore magnam
aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum
exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex
ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in
ea voluptate velit esse quam nihil molestiae consequatur, vel illum
qui dolorem eum fugiat quo voluptas nulla pariatur?

\subsection{Begint vervelend te worden}
At vero eos et accusamus et iusto odio dignissimos ducimus qui
blanditiis praesentium voluptatum deleniti atque corrupti quos dolores
et quas molestias excepturi sint occaecati cupiditate non provident,
similique sunt in culpa qui officia deserunt mollitia animi, id est
laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita
distinctio. Nam libero tempore, cum soluta nobis est eligendi optio
cumque nihil impedit quo minus id quod maxime placeat facere possimus,
omnis voluptas assumenda est, omnis dolor repellendus. Temporibus
autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe
eveniet ut et voluptates repudiandae sint et molestiae non
recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut
reiciendis voluptatibus maiores alias consequatur aut perferendis
doloribus asperiores repellat.

\newpage

\subsection{Begint echt vervelend te worden}
At vero eos et accusamus et iusto odio dignissimos ducimus qui
blanditiis praesentium voluptatum deleniti atque corrupti quos dolores
et quas molestias excepturi sint occaecati cupiditate non provident,
similique sunt in culpa qui officia deserunt mollitia animi, id est
laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita
distinctio. Nam libero tempore, cum soluta nobis est eligendi optio
cumque nihil impedit quo minus id quod maxime placeat facere possimus,
omnis voluptas assumenda est, omnis dolor repellendus. Temporibus
autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe
eveniet ut et voluptates repudiandae sint et molestiae non
recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut
reiciendis voluptatibus maiores alias consequatur aut perferendis
doloribus asperiores repellat.


\chapter{Besluit}

\backmatter
\appendix

\chapter{Symbolen}
\chapter{Romeinse sprekers}
\chapter{Referentielijst}

\end{document}
%</example>
% \end{verbatim}
%
% \StopEventually{\PrintChanges\PrintIndex}
%
% \section{Implementation}
%
% \subsection{Class inheritance}
%
%<*class>

%
% For simplicity, we'll derive everything from the standard |article|
% class.
%
% Before loading the class, we provide an extra 'copyright' option
% that forces printing a watermark on every page. For the paper
% version of your course, this is inappropriate, but for any e-copy
% you make available to your students, this may be appropriate.
%
%    \begin{macrocode}
\newif\if@copyright
\DeclareOption{copyright}{\@copyrighttrue}
% We execute some standar options:
\ExecuteOptions{a4paper,11pt,final,oneside,openright}
\ProcessOptions
% And finally, we load the |book| class.
\LoadClassWithOptions{book}
%    \end{macrocode}
%
% \subsection{Modern typesetting}
% Let's force some modern typesetting without paragraph indentation
% and with a decent paragraph spacing.
%
%    \begin{macrocode}
\setlength{\parindent}{0pt}
\addtolength{\parskip}{0.75\baselineskip}
\setcounter{secnumdepth}{3}
%    \end{macrocode}
%
% \subsection{Auxiliary packages}
% Reinventing the wheel is a waste of time, let's preload some
% appropriate auxiliary packages that have proven their value.
% \subsubsection{Geometry}
% Let's reduce the margins to 1 inch each.
%    \begin{macrocode}
\RequirePackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
%    \end{macrocode}
%
% \subsubsection{Font packages}
% 
% First some tricks to load the Verdana font that's used
% on the title page. Fonts are a pain in LaTeX. We're anxiously
% waiting for the first production release of LuaTeX (expected in
% 2012)!
%    \begin{macrocode}
\newcommand{\selectverdananormal}
{
  \PackageError{kdgcoursetext.cls}{
    Sorry, your font system is not set up appropriately.
    Please, use XeTeX, or pdfTeX in conjunction with the
    winfonts package or the verdana package (available from CTAN).
  }{1}
}
\newcommand{\selectverdanabold}{\selectverdananormal}
\RequirePackage{ifxetex}
\ifxetex
\RequirePackage{cmbright}
\RequirePackage{fontspec}
\addfontfeature{Ligatures=Common}
\renewcommand{\selectverdananormal}{\fontspec{Verdana}}
\renewcommand{\selectverdanabold}{\fontspec{Verdana}\bfseries}
\else
\IfFileExists{verdana.sty}
{\RequirePackage{verdana}
  \renewcommand{\selectverdananormal}{\usefont{T1}{vna}{m}{n}}
  \renewcommand{\selectverdanabold}{\usefont{T1}{vna}{b}{n}}
}
{\IfFileExists{winfonts.sty}
  {\RequirePackage{winfonts}
    \renewcommand{\selectverdananormal}{\usefont{T1}{verdana}{m}{n}}
    \renewcommand{\selectverdanabold}{\usefont{T1}{verdana}{b}{n}}}
  {}
}
\RequirePackage{cmbright}
\fi
%    \end{macrocode}
% 
% \subsubsection{Graphics packages}
%
% Graphics packages that are required for the title page, but may come
% in handy for regular use as well.
%    \begin{macrocode}
\RequirePackage{graphicx}
\RequirePackage{eso-pic}
\RequirePackage{color}
\RequirePackage{tikz}
%    \end{macrocode}
%
% \subsubsection{Header/Footer}
%
% The de-facto standard for headers and footers:
%    \begin{macrocode}
\RequirePackage{fancyhdr}
%    \end{macrocode}
%
% \subsection{Tags}
%
% \begin{macro}{\department}
%   The |department| sets the department tag |\@department| that is
%   used on the title page.
%   It defaults to 'Industri\"ele Wetenschappen en Technologie'%
%    \begin{macrocode}
\newcommand{\@department}{Industri\"ele Wetenschappen en Technologie}
\newcommand{\department}[1]{\renewcommand{\@department}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\departmentacronym}
%   The |departmentacronym| sets the department acronym tag
%   |\@departmentacronym| that is used in the header/footer
%   information. It defaults to 'IWT'.
%    \begin{macrocode}
\newcommand{\@departmentacronym}{IWT}
\newcommand{\departmentacronym}[1]{\renewcommand{\@departmentacronym}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\title}
%   The |title| tag is native to \LaTeX{}. It sets the |\@title| tag
%   that will be used on the title page.
% \end{macro}
%
% \begin{macro}{\subtitle}
%   This macro sets the |\@subtitle| tag that later will be used on
%   the title page, in the header/footer and to set the appropriate
%   |hyperref| tag.
%    \begin{macrocode}
\newcommand{\@subtitle}{}
\newcommand{\subtitle}[1]{\renewcommand{\@subtitle}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\author}
%    The |author| tag is native to \LaTeX{}. It sets the |\@author|
%    tag that will be used on the title page.
% \end{macro}
%
% \begin{macro}{\courseversion}
%   This macro sets the |\@courseversion| tag that later will be used
%   on the title page and in the header/footer.
%    \begin{macrocode}
\newcommand{\@courseversion}{}
\newcommand{\courseversion}[1]{\renewcommand{\@courseversion}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\versionyear}
%   This macro sets the |\@versionyear| tag that later will be used on
%   the title page and in the copyright message.
%    \begin{macrocode}
\newcommand{\@versionyear}{}
\newcommand{\versionyear}[1]{\renewcommand{\@versionyear}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\versioncomment}
%   This macro sets the |\@versioncomment| tag that later will be used on
%   the title page and in the copyright message.
%    \begin{macrocode}
\newcommand{\@versioncomment}{}
\newcommand{\versioncomment}[1]{\renewcommand{\@versioncomment}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\professor}
%   This macro sets many |\@professor| tags (max. 4) that later will be used on
%   the title page. If there is only one teaching professor one can
%   use the convenient shorthand without counter.
%    \begin{macrocode}
\newcommand{\@professori}{}
\newcommand{\@professorii}{}
\newcommand{\@professoriii}{}
\newcommand{\@professoriv}{}
\newcommand{\professor}[1]{\renewcommand{\@professori}{#1}}
\newcommand{\professori}[1]{\renewcommand{\@professori}{#1}}
\newcommand{\professorii}[1]{\renewcommand{\@professorii}{#1}}
\newcommand{\professoriii}[1]{\renewcommand{\@professoriii}{#1}}
\newcommand{\professoriv}[1]{\renewcommand{\@professoriv}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\programme}
%   This macro sets the |\@programme| tags that later will
%   be used on the title page. 
%    \begin{macrocode}
\newcommand{\@programme}{}
\newcommand{\programme}[1]{\renewcommand{\@programme}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\coursecode}
%   This macro sets many |\@programme| tags (max. 4) that later will
%   be used on the title page. If there is only one course code
%   one can use the convenient shorthand without counter.
%    \begin{macrocode}
\newcommand{\@coursecodei}{}
\newcommand{\@coursecodeii}{}
\newcommand{\@coursecodeiii}{}
\newcommand{\@coursecodeiv}{}
\newcommand{\coursecode}[1]{\renewcommand{\@coursecodei}{#1}}
\newcommand{\coursecodei}[1]{\renewcommand{\@coursecodei}{#1}}
\newcommand{\coursecodeii}[1]{\renewcommand{\@coursecodeii}{#1}}
\newcommand{\coursecodeiii}[1]{\renewcommand{\@coursecodeiii}{#1}}
\newcommand{\coursecodeiv}[1]{\renewcommand{\@coursecodeiv}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\academicyear}
%   This macro sets the |\@academicyear| tag that later will be used on
%   the title page.
%    \begin{macrocode}
\newcommand{\@academicyear}{}
\newcommand{\academicyear}[1]{\renewcommand{\@academicyear}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\titlepagepicture}
%    \begin{macrocode}
\newcommand{\@titlepagepicture}{}
\newcommand{\titlepagepicture}[1]{\renewcommand{\@titlepagepicture}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\copyrightnotices}
%    \begin{macrocode}
\newcommand{\@copyrightnotices}{}
\newcommand{\copyrightnotices}[1]{\renewcommand{\@copyrightnotices}{#1}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Header and Footer}
% The |fancyhdr| package is used to make a decent header ander footer.
%    \begin{macrocode}
\if@twoside
  \lhead[\thepage]{\slshape\rightmark}
  \chead[]{}
  \rhead[\slshape\leftmark]{\thepage}
  \lfoot[Karel de Grote-Hogeschool -- \@departmentacronym]{\@courseversion}
  \cfoot[]{}
  \rfoot[]{\@title{}\if\@subtitle\else{ ---- \@subtitle}\fi}
\else
  \lhead[]{\leftmark}
  \chead[]{}
  \rhead[]{\thepage}
  \lfoot[]{\@courseversion}
  \cfoot[]{KdG--\@departmentacronym}
  \rfoot[]{\@title{}}
\fi
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}
\pagestyle{fancy}
%    \end{macrocode}
%
% \subsection{Copyright notice}
%
% \begin{macro}{\@crnotice}
%    \begin{macrocode}
\newcommand{\@crnotice}{
  This document has been typeset using \LaTeX{} and the
  \texttt{kdgcoursetext} class.\\
  \@copyrightnotices

  \@courseversion

  CONFIDENTIAL AND PROPRIETARY.

  \copyright{} \@versionyear{} Karel de Grote-Hogeschool, All rights reserved.
}
%    \end{macrocode}
% \end{macro}
%
%
% \subsection{Title page}
%
% \begin{macro}{\maketitle}
% The title page is generated using the |\maketitle| command. As the
% book class from which we inherit already defines this command, we
% need to renew it.
%    \begin{macrocode}
\renewcommand\maketitle{%
  \definecolor{lightlightgray}{cmyk}{0,0,0,0.05}
  \definecolor{kdggroen}{cmyk}{0.29,0,1,0}
  \pagestyle{empty}
  \begin{titlepage}
    \AddToShipoutPicture*{%
      \setlength{\unitlength}{1cm}
      \put(0,0){%
        \begin{tikzpicture}[inner sep=0pt]
          \path
          (19,2.5) node [anchor=south east]{%
            \IfFileExists{\@titlepagepicture}{%
              \includegraphics[width=13.99cm,height=9cm]{\@titlepagepicture}}{}};
          \fill[color=kdggroen] (0,0) 
          (2,1.5) -- (2,26.31) -- (19,27.2) -- (19,22.7) -- 
          (5,22.7) -- (5,2.5) --  (19,2.5) -- (19,1.5) -- cycle;
          \path 
          (2,28.2) node[anchor=north west]{\includegraphics[width=8.3cm]{kdg_color}}
          (3,25.8) node[anchor=north west, text width=15cm]{
            {\selectverdanabold\Large \@programme}\\[0.15cm]
            {\selectverdananormal
              \large Departement \@department{}\\[0.13cm]
              \large Academiejaar \@academicyear\\[0.11cm]
              \large \begin{tabular}{@{}p{3cm}p{5.5cm}p{5.5cm}}
                Cursuscode(s): & \@coursecodei{} & \@coursecodeii \\
                & \@coursecodeiii & \@coursecodeiv
              \end{tabular}}
          }
          (6,21.1) node [anchor=north west, text width=13cm]{
            {\selectverdanabold\huge \@title{}}\\[0.2cm]
            {\selectverdananormal
              \Large \@subtitle{}~\\[0.8cm]
              \Large Auteur(s): \@author{}}
          }
          (6,15.4) node [anchor=south west, text width=13cm]{
            \selectverdananormal\large
            \begin{tabular}{@{}p{3cm}p{11cm}}
              Titularis(sen): 
              & \@professori \\
              & \@professorii \\
              & \@professoriii \\
              & \@professoriv
            \end{tabular}
            ~\\
            \@versionyear
          }
          (6,12.4) node [anchor=south west, text width=13cm]{%
            \selectverdananormal
            \begin{tabular}{@{}p{12.9cm}}
              \if\@versioncomment\else{Commentaar:  \@versioncomment}\fi
            \end{tabular}
          };
        \end{tikzpicture}
      }
    }%
    \phantom{Do not remove: this causes an empty title page to be generated}
  \end{titlepage}%
  \clearpage
  \if@copyright
  \AddToShipoutPicture{\put(120,180){
      \rotatebox{55}{\color{lightlightgray}{
          \selectverdanabold{}\Huge
          Copyright \@versionyear{} Karel de Grote-Hogeschool}}}}
  \fi
  \vspace*{\stretch{1}}
  \@crnotice
  \clearpage
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
  \pagestyle{fancy}
  \thispagestyle{empty}
  }
%    \end{macrocode}
% \end{macro}
%
% \subsection{References}
%    \begin{macrocode}
\RequirePackage{hyperref}
\hypersetup{backref=true,
            breaklinks=true,
            colorlinks=true,
            citecolor=black,
            filecolor=black,
            hyperindex=true,
            linkcolor=black,
            pageanchor=true, 
            pagebackref=true,
            pagecolor=black,
            pdfpagemode=UseOutlines,
            urlcolor=black}
\AtBeginDocument{
  \hypersetup{
    pdftitle={\@title},
    pdfsubject={\@subtitle},
    pdfauthor={\@author}
  }
}
%    \end{macrocode}
%</class>
%
% \Finale
\endinput
