% \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{kdgdocs.dtx}
%</driver>
%<ct|mt>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<ct>\ProvidesClass{kdgcoursetext}
%<mt>\ProvidesClass{kdgmasterthesis}
%<ct|mt>    [2011/11/01 v1.0 .dtx skeleton file]
%
%<*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{kdgdocs.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}
% \changes{v0.5}{2011/07/19}{\\
%   - Minor corrections applied on first real-world use (a.o. raggedbottom and raggedright, to comply with the KdG quality standard for written study content)}
% \changes{v1.0}{2011/11/01}{\\
%   - Consolidated kdgcoursetext class (thoroughly tested with my DSP course)
%   - Added kdgmasterthesis class}
% \GetFileInfo{kdgdocs.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 package implements the house style for course texts and
% master's theses.
% Using these class files will make it easy for you to make and keep
% your course texts and master's theses 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 (|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 these class files? You're welcome to send us beer, wine,
% or just kind words.
%
% \section{Synopsis}
% The |kdgcoursetext| and |kdgmasterthesis| classes are an extension
% to the standard \LaTeX{} |book| class. 
% It is intended to be used for writing course texts and master's
% theses. 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}
%
% \subsubsection{\texttt{kdgcoursetext} 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}
%
% \subsubsection{\texttt{kdgmasterthesis} class}
% Use the following harness for your \LaTeX{} master's thesis:
% \begin{verbatim}
% \documentclass[a4paper]{kdgmasterthesis}
%
% \usepackage{<include any packages you require here>}
%
% \department{Industri\"ele Wetenschappen en Technologie}
% \departmentacronym{IWT}
%
% \title{<put your title here>}
% \author{<put your name here>}
% \promoteri{<put the first promoter's name(s) here}
% \promoterii<put the first promoter's name(s) here}
% \promoteriii{<put the first promoter's name(s) here}
% \promoteriv{<put the first promoter's name(s) here}
%
% % classmarker
% \academicyear{<XXXX-YYYY>}
%
% \begin{document}
%   \maketitle
%
%   % put your LaTeX code here
%
% \end{document}
% \end{verbatim}
%
% 
% \subsection{The macros explained}
%
% After every macro, it has been indicated to which class the macro
% applies (between square brackets), and whether it is mandatory or not.
%
% \DescribeMacro{\department} [kdgcoursetext / kdgmasterthesis] (optional)
%   This macro sets the department name.
%   It defaults to 'Industri\"ele Wetenschappen en Technologie'.
%
% \DescribeMacro{\departmentacronym} [kdgcoursetext / kdgmasterthesis] (optional)
%   This macro sets the acronym of the department.
%   It defaults to 'IWT'.
%
% \DescribeMacro{\title} [kdgcoursetext / kdgmasterthesis] (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} [kdgcoursetext] (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} [kdgcoursetext / kdgmasterthesis] (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} [kdgcoursetext] (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} [kdgcoursetext] (mandatory)
% This is to be the year in which you published the current version of
% the course in the form YYYY.
%
% \DescribeMacro{\versioncomment} [kdgcoursetext] (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} [kdgcoursetext] (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{\promoter} [kdgmasterthesis] (mandatory)
% This is the name of the person that promotes the thesis.
% If there are mutliple persons, please, use the
% macros |\promoteri|, |\promoterii|, |\promoteriii|,
% |\promoteriv|. If there are more than four, ask
% the dean to give you a new thesis subject. Upon reassignment, 
% repeat the last sentence.
%
% \DescribeMacro{\programme} [kdgcoursetext] (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} [kdgcoursetext / kdgmasterthesis] (mandatory)
% Use this macro to specify the academicyear in full, i.e. in the form
% |XXXX-YYYY|. 
%
% \DescribeMacro{\diploma} [kdgmasterthesis] (mandatory)
% Code of the diploma you are pursuing. This is one of the following acronyms:
% \begin{itemize}
%   \item |BCH|: Biochemie
%   \item |CH|: Chemie
%   \item |EI-AE|: Elektroncia-ICT, afstudeerrichting Automotive Engineering
%   \item |EI-ICT|: Elektroncia-ICT, afstudeerrichting ICT
%   \item |EM-AE|: Elektromechanica, afstudeerrichting Automotive Engineering
%   \item |EM-AU|: Elektromechanica, afstudeerrichting Automatisering
%   \item |EM-EM|: Elektromechanica, afstudeerrichting Elektromechanica
% \end{itemize}
%
% \DescribeMacro{\defensedate} [kdgmasterthesis] (mandatory)
% Date of the defense in Dutch, in the form 'month year', e.g. ``juni 2012''.
%
% \DescribeMacro{\defenselocation} [kdgmasterthesis] (optional)
% Location of the defense. Defaults to ``Hoboken''.
%
% \DescribeMacro{\titlepagepicture} [kdgcoursetext] (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} [kdgcoursetext] (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{Examples}
% \subsubsection{\texttt{kdgcoursetext}}
%
% \begin{verbatim}
%<*ct-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}
%</ct-example>
% \end{verbatim}
%
%
% \subsubsection{\texttt{kdgmasterthesis}}
%
% \begin{verbatim}
%<*mt-example>
\documentclass[a4paper,11pt,twoside,openright,english,copyright]{kdgmasterthesis}

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

\title{Minimax optimisatie voor performantieruimtemodellering}
\author{Bert Bibber}

\promoteri{Prof. dr. ir. Kumulus (KdG)}
\promoterii{Prof. dr. Hilarius Warwinkel (TNT-Bang, N.V.)}
\promoteriii{ing. Piet Pienter (POM)}

\academicyear{2011-2012}
\diploma{EI-ICT}
\defenselocation{Hoboken}
\defensedate{juni 2012}

\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{Onderzoeksvraag}

\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.

\chapter{Literatuurstudie}

\chapter{Theoretische achtergrond}

\chapter{Eigen realisatie}

\chapter{Besluit}

\backmatter
\appendix

\chapter{Symbolen}
\chapter{Referentielijst}

\end{document}
%</mt-example>
% \end{verbatim}
%
%
% \StopEventually{\PrintChanges\PrintIndex}
%
% \section{Implementation}
%
% \subsection{Class inheritance}
%
%
% 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}
%<*ct>
\newif\if@copyright
\DeclareOption{copyright}{\@copyrighttrue}
%</ct>
% We execute some standard options:
% We load the |book| class.
%<*ct|mt>
\ExecuteOptions{a4paper,11pt,final,oneside,openright}
\ProcessOptions
\LoadClassWithOptions{book}
%</ct|mt>
%    \end{macrocode}
%
% \subsection{Modern typesetting}
% Let's force some modern typesetting without paragraph indentation
% and with a decent paragraph spacing.
%
%    \begin{macrocode}
%<*ct|mt>
\setlength{\parindent}{0pt}
\addtolength{\parskip}{0.75\baselineskip}
\setcounter{secnumdepth}{3}
%</ct|mt>
%    \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}
%<*ct|mt>
\RequirePackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
%</ct|mt>
%    \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}
%<*ct|mt>
\newcommand{\selectverdananormal}
{
  \PackageError{kdgdocs}{
    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}
\RequirePackage{ifthen}
\fi
%</ct|mt>
%    \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}
%<*ct|mt>
\RequirePackage{graphicx}
\RequirePackage{eso-pic}
\RequirePackage{color}
\RequirePackage{tikz}
%</ct|mt>
%    \end{macrocode}
%
% \subsubsection{Header/Footer}
%
% The de-facto standard for headers and footers:
%    \begin{macrocode}
%<*ct|mt>
\RequirePackage{fancyhdr}
%</ct|mt>
%    \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}
%<*ct|mt>
\newcommand{\@department}{Industri\"ele Wetenschappen en Technologie}
\newcommand{\department}[1]{\renewcommand{\@department}{#1}}
%</ct|mt>
%    \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}
%<*ct|mt>
\newcommand{\@departmentacronym}{IWT}
\newcommand{\departmentacronym}[1]{\renewcommand{\@departmentacronym}{#1}}
%</ct|mt>
%    \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}
%<*ct>
\newcommand{\@subtitle}{}
\newcommand{\subtitle}[1]{\renewcommand{\@subtitle}{#1}}
%</ct>
%    \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}
%<*ct>
\newcommand{\@courseversion}{}
\newcommand{\courseversion}[1]{\renewcommand{\@courseversion}{#1}}
%</ct>
%    \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}
%<*ct>
\newcommand{\@versionyear}{}
\newcommand{\versionyear}[1]{\renewcommand{\@versionyear}{#1}}
%</ct>
%    \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}
%<*ct>
\newcommand{\@versioncomment}{}
\newcommand{\versioncomment}[1]{\renewcommand{\@versioncomment}{#1}}
%</ct>
%    \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}
%<*ct>
\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}}
%</ct>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\promoter}
%   This macro sets many |\@promoter| tags (max. 4) that later will be used on
%   the title page. If there is only one promoter one can
%   use the convenient shorthand without counter.
%    \begin{macrocode}
%<*mt>
\newcommand{\@promoteri}{}
\newcommand{\@promoterii}{}
\newcommand{\@promoteriii}{}
\newcommand{\@promoteriv}{}
\newcommand{\promoter}[1]{\renewcommand{\@promoteri}{#1}}
\newcommand{\promoteri}[1]{\renewcommand{\@promoteri}{#1}}
\newcommand{\promoterii}[1]{\renewcommand{\@promoterii}{#1}}
\newcommand{\promoteriii}[1]{\renewcommand{\@promoteriii}{#1}}
\newcommand{\promoteriv}[1]{\renewcommand{\@promoteriv}{#1}}
%</mt>
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\programme}
%   This macro sets the |\@programme| tags that later will
%   be used on the title page. 
%    \begin{macrocode}
%<*ct>
\newcommand{\@programme}{}
\newcommand{\programme}[1]{\renewcommand{\@programme}{#1}}
%</ct>
%    \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}
%<*ct>
\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}}
%</ct>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\diploma}
%   This macro sets the |\@diploma| tags that later will
%   be used on the title page. 
%    \begin{macrocode}
%<*mt>
\newcommand{\@diploma}{ERROR}
\newcommand{\diploma}[1]{
  \newcommand{\MoSIW}{Master of Science in de Industri\"ele Wetenschappen}
  \renewcommand{\@diploma}{
    \ifthenelse{\equal{#1}{BCH}}{\MoSIW{} Biochemie}{
    \ifthenelse{\equal{#1}{CH}}{\MoSIW{} Chemie}{
    \ifthenelse{\equal{#1}{EI-AE}}{\MoSIW\\Elektroncia-ICT, afstudeerrichting Automotive Engineering}{
    \ifthenelse{\equal{#1}{EI-ICT}}{\MoSIW\\Elektroncia-ICT, afstudeerrichting ICT}{
    \ifthenelse{\equal{#1}{EM-AE}}{\MoSIW\\Elektromechanica, afstudeerrichting Automotive Engineering}{
    \ifthenelse{\equal{#1}{EM-AU}}{\MoSIW\\Elektromechanica, afstudeerrichting Automatisering}{
    \ifthenelse{\equal{#1}{EM-EM}}{\MoSIW\\Elektromechanica, afstudeerrichting Elektromechanica}{>> ERROR: diploma must be one of BCH, CH, EI-AE, EI-ICT, EM-AE, EM-AU, EM-EM! <<}}}}}}}}
}

%</mt>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\defensedate}
%   This macro sets the |\@defensedate| tags that later will
%   be used on the title page. 
%    \begin{macrocode}
%<*mt>
\newcommand{\@defensedate}{ERROR}
\newcommand{\defensedate}[1]{\renewcommand{\@defensedate}{#1}}
%</mt>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\defenselocation}
%   This macro sets the |\@defenselocation| tags that later will
%   be used on the title page. 
%    \begin{macrocode}
%<*mt>
\newcommand{\@defenselocation}{Hoboken}
\newcommand{\defenselocation}[1]{\renewcommand{\@defenselocation}{#1}}
%</mt>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\academicyear}
%   This macro sets the |\@academicyear| tag that later will be used on
%   the title page.
%    \begin{macrocode}
%<*ct|mt>
\newcommand{\@academicyear}{XXX-YYYY}
\newcommand{\academicyear}[1]{\renewcommand{\@academicyear}{#1}}
%</ct|mt>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\titlepagepicture}
%    \begin{macrocode}
%<*ct>
\newcommand{\@titlepagepicture}{}
\newcommand{\titlepagepicture}[1]{\renewcommand{\@titlepagepicture}{#1}}
%</ct>
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\copyrightnotices}
%    \begin{macrocode}
%<*ct>
\newcommand{\@copyrightnotices}{}
\newcommand{\copyrightnotices}[1]{\renewcommand{\@copyrightnotices}{#1}}
%</ct>
%    \end{macrocode}
% \end{macro}
%
% \subsection{Header and Footer}
% The |fancyhdr| package is used to make a decent header ander footer.
% The header and footer of the |kdgcoursetext| package are defined to be:
%    \begin{macrocode}
%<*ct>
\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
%</ct>
%    \end{macrocode}
%
% The header and footer of the |kdgmasterthesis| package are defined to be:
%    \begin{macrocode}
%<*mt>
\if@twoside
  \lhead[\thepage]{\slshape\rightmark}
  \chead[]{}
  \rhead[\slshape\leftmark]{\thepage}
  \lfoot[Karel de Grote-Hogeschool -- \@departmentacronym]{}
  \cfoot[]{}
  \rfoot[]{\@title{}}
\else
  \lhead[]{\leftmark}
  \chead[]{}
  \rhead[]{\thepage}
  \lfoot[]{}
  \cfoot[]{KdG--\@departmentacronym}
  \rfoot[]{\@title{}}
\fi
%</mt>
%    \end{macrocode}
%
% Some common code remains:
%    \begin{macrocode}
%<*ct|mt>
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}
\pagestyle{fancy}
\raggedbottom
\raggedright
\pagenumbering{arabic}
\onecolumn
%</ct|mt>
%    \end{macrocode}
%
% \subsection{Copyright notice}
%
% \begin{macro}{\@crnotice}
%    \begin{macrocode}
%<*ct>
\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.
}
%</ct>
%    \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.
%
% Below, one can find the code for the title page of the
% |kdgcoursetext| class:
%    \begin{macrocode}
%<*ct>
\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}
}
%</ct> 
%    \end{macrocode}
% 
% And next, the code for the title page of the |kdgmasterthesis| class:
%    \begin{macrocode}
%<*mt>      
\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]
          \fill[color=kdggroen] (0,0) 
          (2,1.5) -- (2,2.5) -- (19,2.5) -- (19,1.5) -- cycle;
          \fill[color=lightlightgray] (0,0) 
          (2,2.5) -- (2,26.31) -- (19,27.2) -- (19,2.5) -- cycle;
          \path 
          (2,28.2) node[anchor=north west]{\includegraphics[width=8.3cm]{kdg_color}}
          (2.5,25.8) node[anchor=north west, text width=15cm]{
            {\selectverdanabold\large Departement \@department{}}\\[0.13cm]
            {\selectverdanabold\large Masterproef \@academicyear}
          }
          (3.5,20) node [anchor=north west, text width=14cm]{
            {\selectverdanabold\Large \@title{}}\\[0.2cm]
            {\selectverdananormal\large \@author{}}
          }
          (2.5,12.2) node [anchor=south west, text width=13cm]{
            \selectverdananormal\small
            \begin{tabular}{@{}p{2.5cm}p{11cm}}
              \textbf{Promotoren:} 
              & \@promoteri \\
              & \@promoterii \\
              & \@promoteriii \\
              & \@promoteriv
            \end{tabular}
          }
          (18.5,5.5) node [anchor=north east]{%
            \selectverdananormal\small
            \begin{tabular}{@{}r}
              Proefschrift tot het behalen van de graad van\\
              \@diploma\\
              \@defenselocation, \@defensedate
            \end{tabular}
          };
        \end{tikzpicture}
      }
    }%
    \phantom{Do not remove: this causes an empty title page to be generated}
  \end{titlepage}%
  \if@twoside
  \cleardoublepage
  \else
  \clearpage
  \fi
  \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}
  }
%</mt>
%    \end{macrocode}
% \end{macro}
%
% \subsection{References}
%    \begin{macrocode}
%<*ct|mt>
\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}
%</ct|mt>
%
%<*ct>
\AtBeginDocument{
  \hypersetup{
    pdftitle={\@title},
    pdfsubject={\@subtitle},
    pdfauthor={\@author}
  }
}
%</ct>
%
%<*mt>
\AtBeginDocument{
  \hypersetup{
    pdftitle={\@title},
    pdfsubject={Master's Thesis},
    pdfauthor={\@author}
  }
}
%</mt>
%    \end{macrocode}
%
% \Finale
\endinput
