The kdgcoursetext class ∗
Paul Levrie ([email protected]) Walter Daems ([email protected])
November 1, 2011
1 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
• there’s an error in compliancy w.r.t. the house style,
• there’s a feature missing in this class file,
• there’s a bug in this class file,
please, contact us through e-mail ([email protected]). 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.
2 Synopsis
Thekdgcoursetextand kdgmasterthesisclasses are an extension to the stan- dard 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.
∗This document corresponds tokdgcoursetext?, dated ?.
It requires (and uses) the following packages:
• thegeometrypackage
• thehyperrefpackage
• thefontspecpackage (if you are using XeTEX)
• thewinfontsor verdanapackage (if you are not using XeTEX)
• thecmbrightpackage
• thegraphicxpackage
• theeso-picpackage
• thecolorpackage
• thetikzpackage
• thefancyhdrpackage
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.
3 Portability
This class file should be ready to use with all common LATEX compilers (PDFLATEX, LATEX, XeLATEX,. . . ) from the major TEX-distributions (TeTeX, TexLive, Mik- TeX). If you experience problems, please inform the authors.
4 Usage
4.1 Basic Usage
4.1.1 kdgcoursetext class
Use the following harness for your LATEX course text:
\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}
4.1.2 kdgmasterthesisclass
Use the following harness for your LATEX master’s thesis:
\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}
4.2 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.
[kdgcoursetext / kdgmasterthesis] (optional) This macro sets the department
\department
name. It defaults to ’Industri¨ele Wetenschappen en Technologie’.
[kdgcoursetext / kdgmasterthesis] (optional) This macro sets the acronym of the
\departmentacronym
department. It defaults to ’IWT’.
[kdgcoursetext / kdgmasterthesis] (mandatory) This macro sets the title of the
\title
document. It also sets the pdftitle tag of the hyperref package, so that the PDF-document meta-information is correct.
[kdgcoursetext] (optional) This macro sets the title of the document. You may
\subtitle
use this
• to further clarify the title
• to indicate the nature of this document
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 thesubjecttag of the hyperref package, so that the PDF-document meta-information is correct.
[kdgcoursetext / kdgmasterthesis] (mandatory) This macro sets the author of the
\author
document. It also sets the pdfauthor tag of the hyperref package, so that the PDF-document meta-information is correct.
[kdgcoursetext] (optional) This macro indicates which version of the course this
\courseversion
is. You may use your own versioning system that puts things clear for you.
[kdgcoursetext] (mandatory) This is to be the year in which you published the
\versionyear
current version of the course in the form YYYY.
[kdgcoursetext] (optional) This (optional) macro is to be used if you want to
\versioncomment
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.
[kdgcoursetext] (mandatory) This is the name of the person that actually teaches
\professor
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.
[kdgmasterthesis] (mandatory) This is the name of the person that promotes
\promoter
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.
[kdgcoursetext] (mandatory) Code of the subject you are teaching. This should
\programme
be of the form:
KdG-IWT-ZZ-VV-XXYY-ABCwith:
Code Explanation
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.
[kdgcoursetext / kdgmasterthesis] (mandatory) Use this macro to specify the aca-
\academicyear
demicyear in full, i.e. in the formXXXX-YYYY.
[kdgmasterthesis] (mandatory) Code of the diploma you are pursuing. This is one
\diploma
of the following acronyms:
• BCH: Biochemie
• CH: Chemie
• EI-AE: Elektroncia-ICT, afstudeerrichting Automotive Engineering
• EI-ICT: Elektroncia-ICT, afstudeerrichting ICT
• EM-AE: Elektromechanica, afstudeerrichting Automotive Engineering
• EM-AU: Elektromechanica, afstudeerrichting Automatisering
• EM-EM: Elektromechanica, afstudeerrichting Elektromechanica
[kdgmasterthesis] (mandatory) Date of the defense in Dutch, in the form ’month
\defensedate
year’, e.g. “juni 2012”.
[kdgmasterthesis] (optional) Location of the defense. Defaults to “Hoboken”.
\defenselocation
[kdgcoursetext] (optional) Specify the filename of a picture you want to appear on
\titlepagepicture
your titlepage. The picture should display itself nice in the size 13,99cm×9cm.
[kdgcoursetext] (optional) Use this macro to specify additional copyright notice
\copyrightnotices
messages to appear in het copyright notice on the bottom of page 2 of your course text.
4.3 Examples
4.3.1 kdgcoursetext
<*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>
4.3.2 kdgmasterthesis
<*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>
5 Implementation
5.1 Class inheritance
For simplicity, we’ll derive everything from the standardarticleclass.
Before loading the class, we provide an extra ’copyright’ option that forces print- ing 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.
1h∗cti
2\newif\if@copyright
3\DeclareOption{copyright}{\@copyrighttrue}
4h/cti
5% We execute some standard options:
6% We load the |book| class.
7h∗ct|mti
8\ExecuteOptions{a4paper,11pt,final,oneside,openright}
9\ProcessOptions
10\LoadClassWithOptions{book}
11h/ct|mti
5.2 Modern typesetting
Let’s force some modern typesetting without paragraph indentation and with a decent paragraph spacing.
12h∗ct|mti
13\setlength{\parindent}{0pt}
14\addtolength{\parskip}{0.75\baselineskip}
15\setcounter{secnumdepth}{3}
16h/ct|mti
5.3 Auxiliary packages
Reinventing the wheel is a waste of time, let’s preload some appropriate auxiliary packages that have proven their value.
5.3.1 Geometry
Let’s reduce the margins to 1 inch each.
17h∗ct|mti
18\RequirePackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
19h/ct|mti
5.3.2 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)!
20h∗ct|mti
21\newcommand{\selectverdananormal}
22{
23 \PackageError{kdgdocs}{
24 Sorry, your font system is not set up appropriately.
25 Please, use XeTeX, or pdfTeX in conjunction with the
26 winfonts package or the verdana package (available from CTAN).
27 }{1}
28}
29\newcommand{\selectverdanabold}{\selectverdananormal}
30\RequirePackage{ifxetex}
31\ifxetex
32\RequirePackage{cmbright}
33\RequirePackage{fontspec}
34\addfontfeature{Ligatures=Common}
35\renewcommand{\selectverdananormal}{\fontspec{Verdana}}
36\renewcommand{\selectverdanabold}{\fontspec{Verdana}\bfseries}
37\else
38\IfFileExists{verdana.sty}
39{\RequirePackage{verdana}
40 \renewcommand{\selectverdananormal}{\usefont{T1}{vna}{m}{n}}
41 \renewcommand{\selectverdanabold}{\usefont{T1}{vna}{b}{n}}
42}
43{\IfFileExists{winfonts.sty}
44 {\RequirePackage{winfonts}
45 \renewcommand{\selectverdananormal}{\usefont{T1}{verdana}{m}{n}}
46 \renewcommand{\selectverdanabold}{\usefont{T1}{verdana}{b}{n}}}
47 {}
48}
49\RequirePackage{cmbright}
50\RequirePackage{ifthen}
51\fi
52h/ct|mti
5.3.3 Graphics packages
Graphics packages that are required for the title page, but may come in handy for regular use as well.
53h∗ct|mti
54\RequirePackage{graphicx}
55\RequirePackage{eso-pic}
56\RequirePackage{color}
57\RequirePackage{tikz}
58h/ct|mti
5.3.4 Header/Footer
The de-facto standard for headers and footers:
59h∗ct|mti
60\RequirePackage{fancyhdr}
61h/ct|mti
5.4 Tags
\department Thedepartment sets the department tag\@department that is used on the title page. It defaults to ’Industri¨ele Wetenschappen en Technologie’
62h∗ct|mti
63\newcommand{\@department}{Industri\"ele Wetenschappen en Technologie}
64\newcommand{\department}[1]{\renewcommand{\@department}{#1}}
65h/ct|mti
\departmentacronym Thedepartmentacronymsets the department acronym tag\@departmentacronym that is used in the header/footer information. It defaults to ’IWT’.
66h∗ct|mti
67\newcommand{\@departmentacronym}{IWT}
68\newcommand{\departmentacronym}[1]{\renewcommand{\@departmentacronym}{#1}}
69h/ct|mti
\title Thetitle tag is native to LATEX. It sets the \@titletag that will be used on the title page.
\subtitle This macro sets the\@subtitle tag that later will be used on the title page, in the header/footer and to set the appropriatehyperreftag.
70h∗cti
71\newcommand{\@subtitle}{}
72\newcommand{\subtitle}[1]{\renewcommand{\@subtitle}{#1}}
73h/cti
\author Theauthortag is native to LATEX. It sets the\@authortag that will be used on the title page.
\courseversion This macro sets the\@courseversiontag that later will be used on the title page and in the header/footer.
74h∗cti
75\newcommand{\@courseversion}{}
76\newcommand{\courseversion}[1]{\renewcommand{\@courseversion}{#1}}
77h/cti
\versionyear This macro sets the\@versionyear tag that later will be used on the title page and in the copyright message.
78h∗cti
79\newcommand{\@versionyear}{}
80\newcommand{\versionyear}[1]{\renewcommand{\@versionyear}{#1}}
81h/cti
\versioncomment This macro sets the \@versioncomment tag that later will be used on the title page and in the copyright message.
82h∗cti
83\newcommand{\@versioncomment}{}
84\newcommand{\versioncomment}[1]{\renewcommand{\@versioncomment}{#1}}
85h/cti
\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.
86h∗cti
87\newcommand{\@professori}{}
88\newcommand{\@professorii}{}
89\newcommand{\@professoriii}{}
90\newcommand{\@professoriv}{}
91\newcommand{\professor}[1]{\renewcommand{\@professori}{#1}}
92\newcommand{\professori}[1]{\renewcommand{\@professori}{#1}}
93\newcommand{\professorii}[1]{\renewcommand{\@professorii}{#1}}
94\newcommand{\professoriii}[1]{\renewcommand{\@professoriii}{#1}}
95\newcommand{\professoriv}[1]{\renewcommand{\@professoriv}{#1}}
96h/cti
\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.
97h∗mti
98\newcommand{\@promoteri}{}
99\newcommand{\@promoterii}{}
100\newcommand{\@promoteriii}{}
101\newcommand{\@promoteriv}{}
102\newcommand{\promoter}[1]{\renewcommand{\@promoteri}{#1}}
103\newcommand{\promoteri}[1]{\renewcommand{\@promoteri}{#1}}
104\newcommand{\promoterii}[1]{\renewcommand{\@promoterii}{#1}}
105\newcommand{\promoteriii}[1]{\renewcommand{\@promoteriii}{#1}}
106\newcommand{\promoteriv}[1]{\renewcommand{\@promoteriv}{#1}}
107h/mti
\programme This macro sets the\@programme tags that later will be used on the title page.
108h∗cti
109\newcommand{\@programme}{}
110\newcommand{\programme}[1]{\renewcommand{\@programme}{#1}}
111h/cti
\coursecode This macro sets many\@programmetags (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.
112h∗cti
113\newcommand{\@coursecodei}{}
114\newcommand{\@coursecodeii}{}
115\newcommand{\@coursecodeiii}{}
116\newcommand{\@coursecodeiv}{}
117\newcommand{\coursecode}[1]{\renewcommand{\@coursecodei}{#1}}
118\newcommand{\coursecodei}[1]{\renewcommand{\@coursecodei}{#1}}
119\newcommand{\coursecodeii}[1]{\renewcommand{\@coursecodeii}{#1}}
120\newcommand{\coursecodeiii}[1]{\renewcommand{\@coursecodeiii}{#1}}
121\newcommand{\coursecodeiv}[1]{\renewcommand{\@coursecodeiv}{#1}}
122h/cti
\diploma This macro sets the\@diplomatags that later will be used on the title page.
123h∗mti
124\newcommand{\@diploma}{ERROR}
125\newcommand{\diploma}[1]{
126 \newcommand{\MoSIW}{Master of Science in de Industri\"ele Wetenschappen}
127 \renewcommand{\@diploma}{
128 \ifthenelse{\equal{#1}{BCH}}{\MoSIW{} Biochemie}{
129 \ifthenelse{\equal{#1}{CH}}{\MoSIW{} Chemie}{
130 \ifthenelse{\equal{#1}{EI-AE}}{\MoSIW\\Elektroncia-ICT, afstudeerrichting Automotive Engineering}{
131 \ifthenelse{\equal{#1}{EI-ICT}}{\MoSIW\\Elektroncia-ICT, afstudeerrichting ICT}{
132 \ifthenelse{\equal{#1}{EM-AE}}{\MoSIW\\Elektromechanica, afstudeerrichting Automotive Engineering}{
133 \ifthenelse{\equal{#1}{EM-AU}}{\MoSIW\\Elektromechanica, afstudeerrichting Automatisering}{
134 \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! <<}}}}}}}}
135}
136 137h/mti
\defensedate This macro sets the\@defensedatetags that later will be used on the title page.
138h∗mti
139\newcommand{\@defensedate}{ERROR}
140\newcommand{\defensedate}[1]{\renewcommand{\@defensedate}{#1}}
141h/mti
\defenselocation This macro sets the\@defenselocationtags that later will be used on the title page.
142h∗mti
143\newcommand{\@defenselocation}{Hoboken}
144\newcommand{\defenselocation}[1]{\renewcommand{\@defenselocation}{#1}}
145h/mti
\academicyear This macro sets the\@academicyeartag that later will be used on the title page.
146h∗ct|mti
147\newcommand{\@academicyear}{XXX-YYYY}
148\newcommand{\academicyear}[1]{\renewcommand{\@academicyear}{#1}}
149h/ct|mti
\titlepagepicture
150h∗cti
151\newcommand{\@titlepagepicture}{}
152\newcommand{\titlepagepicture}[1]{\renewcommand{\@titlepagepicture}{#1}}
153h/cti
\copyrightnotices
154h∗cti
155\newcommand{\@copyrightnotices}{}
156\newcommand{\copyrightnotices}[1]{\renewcommand{\@copyrightnotices}{#1}}
157h/cti
5.5 Header and Footer
Thefancyhdrpackage is used to make a decent header ander footer. The header and footer of thekdgcoursetextpackage are defined to be:
158h∗cti
159\if@twoside
160 \lhead[\thepage]{\slshape\rightmark}
161 \chead[]{}
162 \rhead[\slshape\leftmark]{\thepage}
163 \lfoot[Karel de Grote-Hogeschool -- \@departmentacronym]{\@courseversion}
164 \cfoot[]{}
165 \rfoot[]{\@title{}\if\@subtitle\else{ ---- \@subtitle}\fi}
166\else
167 \lhead[]{\leftmark}
168 \chead[]{}
169 \rhead[]{\thepage}
170 \lfoot[]{\@courseversion}
171 \cfoot[]{KdG--\@departmentacronym}
172 \rfoot[]{\@title{}}
173\fi
174h/cti
The header and footer of thekdgmasterthesispackage are defined to be:
175h∗mti
176\if@twoside
177 \lhead[\thepage]{\slshape\rightmark}
178 \chead[]{}
179 \rhead[\slshape\leftmark]{\thepage}
180 \lfoot[Karel de Grote-Hogeschool -- \@departmentacronym]{}
181 \cfoot[]{}
182 \rfoot[]{\@title{}}
183\else
184 \lhead[]{\leftmark}
185 \chead[]{}
186 \rhead[]{\thepage}
187 \lfoot[]{}
188 \cfoot[]{KdG--\@departmentacronym}
189 \rfoot[]{\@title{}}
190\fi
191h/mti
Some common code remains:
192h∗ct|mti
193\renewcommand{\headrulewidth}{1pt}
194\renewcommand{\footrulewidth}{1pt}
195\pagestyle{fancy}
196\raggedbottom
197\raggedright
198\pagenumbering{arabic}
199\onecolumn
200h/ct|mti
5.6 Copyright notice
\@crnotice
201h∗cti
202\newcommand{\@crnotice}{
203 This document has been typeset using \LaTeX{} and the
204 \texttt{kdgcoursetext} class.\\
205 \@copyrightnotices
206
207 \@courseversion
208
209 CONFIDENTIAL AND PROPRIETARY.
210
211 \copyright{} \@versionyear{} Karel de Grote-Hogeschool, All rights reserved.
212}
213h/cti
5.7 Title page
\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 thekdgcoursetextclass:
214h∗cti
215\renewcommand\maketitle{%
216 \definecolor{lightlightgray}{cmyk}{0,0,0,0.05}
217 \definecolor{kdggroen}{cmyk}{0.29,0,1,0}
218 \pagestyle{empty}
219 \begin{titlepage}
220 \AddToShipoutPicture*{%
221 \setlength{\unitlength}{1cm}
222 \put(0,0){%
223 \begin{tikzpicture}[inner sep=0pt]
224 \path
225 (19,2.5) node [anchor=south east]{%
226 \IfFileExists{\@titlepagepicture}{%
227 \includegraphics[width=13.99cm,height=9cm]{\@titlepagepicture}}{}};
228 \fill[color=kdggroen] (0,0)
229 (2,1.5) -- (2,26.31) -- (19,27.2) -- (19,22.7) --
230 (5,22.7) -- (5,2.5) -- (19,2.5) -- (19,1.5) -- cycle;
231 \path
232 (2,28.2) node[anchor=north west]{\includegraphics[width=8.3cm]{kdg_color}}
233 (3,25.8) node[anchor=north west, text width=15cm]{
234 {\selectverdanabold\Large \@programme}\\[0.15cm]
235 {\selectverdananormal
236 \large Departement \@department{}\\[0.13cm]
237 \large Academiejaar \@academicyear\\[0.11cm]
238 \large \begin{tabular}{@{}p{3cm}p{5.5cm}p{5.5cm}}
239 Cursuscode(s): & \@coursecodei{} & \@coursecodeii \\
240 & \@coursecodeiii & \@coursecodeiv
241 \end{tabular}}
242 }
243 (6,21.1) node [anchor=north west, text width=13cm]{
244 {\selectverdanabold\huge \@title{}}\\[0.2cm]
245 {\selectverdananormal
246 \Large \@subtitle{}~\\[0.8cm]
247 \Large Auteur(s): \@author{}}
248 }
249 (6,15.4) node [anchor=south west, text width=13cm]{
250 \selectverdananormal\large
251 \begin{tabular}{@{}p{3cm}p{11cm}}
252 Titularis(sen):
253 & \@professori \\
254 & \@professorii \\
255 & \@professoriii \\
256 & \@professoriv
257 \end{tabular}
258 ~\\
259 \@versionyear
260 }
261 (6,12.4) node [anchor=south west, text width=13cm]{%
262 \selectverdananormal
263 \begin{tabular}{@{}p{12.9cm}}
264 \if\@versioncomment\else{Commentaar: \@versioncomment}\fi
265 \end{tabular}
266 };
267 \end{tikzpicture}
268 }
269 }%
270 \phantom{Do not remove: this causes an empty title page to be generated}
271 \end{titlepage}%
272 \clearpage
273 \if@copyright
274 \AddToShipoutPicture{\put(120,180){
275 \rotatebox{55}{\color{lightlightgray}{
276 \selectverdanabold{}\Huge
277 Copyright \@versionyear{} Karel de Grote-Hogeschool}}}}
278 \fi
279 \vspace*{\stretch{1}}
280 \@crnotice
281 \clearpage
282 \setcounter{footnote}{0}%
283 \global\let\thanks\relax
284 \global\let\maketitle\relax
285 \global\let\@thanks\@empty
286 \global\let\title\relax
287 \global\let\author\relax
288 \global\let\date\relax
289 \global\let\and\relax
290 \pagestyle{fancy}
291 \thispagestyle{empty}
292}
293h/cti
And next, the code for the title page of thekdgmasterthesisclass:
294h∗mti
295\renewcommand\maketitle{%
296 \definecolor{lightlightgray}{cmyk}{0,0,0,0.05}
297 \definecolor{kdggroen}{cmyk}{0.29,0,1,0}
298 \pagestyle{empty}
299 \begin{titlepage}
300 \AddToShipoutPicture*{%
301 \setlength{\unitlength}{1cm}
302 \put(0,0){%
303 \begin{tikzpicture}[inner sep=0pt]
304 \fill[color=kdggroen] (0,0)
305 (2,1.5) -- (2,2.5) -- (19,2.5) -- (19,1.5) -- cycle;
306 \fill[color=lightlightgray] (0,0)
307 (2,2.5) -- (2,26.31) -- (19,27.2) -- (19,2.5) -- cycle;
308 \path
309 (2,28.2) node[anchor=north west]{\includegraphics[width=8.3cm]{kdg_color}}
310 (2.5,25.8) node[anchor=north west, text width=15cm]{
311 {\selectverdanabold\large Departement \@department{}}\\[0.13cm]
312 {\selectverdanabold\large Masterproef \@academicyear}
313 }
314 (3.5,20) node [anchor=north west, text width=14cm]{
315 {\selectverdanabold\Large \@title{}}\\[0.2cm]
316 {\selectverdananormal\large \@author{}}
317 }
318 (2.5,12.2) node [anchor=south west, text width=13cm]{
319 \selectverdananormal\small
320 \begin{tabular}{@{}p{2.5cm}p{11cm}}
321 \textbf{Promotoren:}
322 & \@promoteri \\
323 & \@promoterii \\
324 & \@promoteriii \\
325 & \@promoteriv
326 \end{tabular}
327 }
328 (18.5,5.5) node [anchor=north east]{%
329 \selectverdananormal\small
330 \begin{tabular}{@{}r}
331 Proefschrift tot het behalen van de graad van\\
332 \@diploma\\
333 \@defenselocation, \@defensedate
334 \end{tabular}
335 };
336 \end{tikzpicture}
337 }
338 }%
339 \phantom{Do not remove: this causes an empty title page to be generated}
340 \end{titlepage}%
341 \if@twoside
342 \cleardoublepage
343 \else
344 \clearpage
345 \fi
346 \setcounter{footnote}{0}%
347 \global\let\thanks\relax
348 \global\let\maketitle\relax
349 \global\let\@thanks\@empty
350 \global\let\title\relax
351 \global\let\author\relax
352 \global\let\date\relax
353 \global\let\and\relax
354 \pagestyle{fancy}
355 \thispagestyle{empty}
356 }
357h/mti
5.8 References
358h∗ct|mti
359\RequirePackage{hyperref}
360\hypersetup{backref=true,
361 breaklinks=true,
362 colorlinks=true,
363 citecolor=black,
364 filecolor=black,
365 hyperindex=true,
366 linkcolor=black,
367 pageanchor=true,
368 pagebackref=true,
369 pagecolor=black,
370 pdfpagemode=UseOutlines,
371 urlcolor=black}
372h/ct|mti
373%
374h∗cti
375\AtBeginDocument{
376 \hypersetup{
377 pdftitle={\@title},
378 pdfsubject={\@subtitle},
379 pdfauthor={\@author}
380 }
381}
382h/cti
383%
384h∗mti
385\AtBeginDocument{
386 \hypersetup{
387 pdftitle={\@title},
388 pdfsubject={Master’s Thesis},
389 pdfauthor={\@author}
390 }
391}
392h/mti
Change History
v0.1
General: Initial version . . . 1 v0.2
General: Improved documentation based on revision by Paul . . . . 1 v0.3
General:
- Fixed treatment of ligatures for XeTeX
- Made workaround for position- ing of titlepagepicture to over- come XeLaTeX problems.
- Introduced department and departmentacronym tag macros to allow other departments to use this class. - Made package compliant to CTAG TDS guide- lines . . . 1
v0.4 General:
- Corrected license conditions after remark about inconsis- tency by CTAN maintainer . . . 1 v0.5
General:
- Minor corrections applied on first real-world use (a.o. ragged- bottom and raggedright, to comply with the KdG quality standard for written study con- tent) . . . 1 v1.0
General:
- Consolidated kdgcoursetext class (thoroughly tested with my DSP course) - Added kdg- masterthesis class . . . 1
Index
Numbers written in italic refer to the page where the corresponding entry is de- scribed; numbers underlined refer to the code line of the definition; numbers in roman refer to the code lines where the entry is used.
Symbols
\" . . . 63, 126
\@academicyear . . . . . 147, 148, 237, 312
\@author . . . . . 247, 316, 379, 389
\@copyrightnotices . . . . . 155, 156, 205
\@copyrighttrue . . . . 3
\@coursecodei . . . . . . 113, 117, 118, 239
\@coursecodeii . . . . . . . . 114, 119, 239
\@coursecodeiii . . . . . . . 115, 120, 240
\@coursecodeiv . . . . . . . . 116, 121, 240
\@courseversion . . . 75, 76, 163, 170, 207
\@crnotice . . . 201, 280
\@defensedate . . . . . . . . . 139, 140, 333
\@defenselocation . . . . . 143, 144, 333
\@department . . . . . . 63, 64, 236, 311
\@departmentacronym . . . 67, 68, 163, 171, 180, 188
\@diploma . 124, 127, 332
\@empty . . . 285, 349
\@professori . . . . . . . 87, 91, 92, 253
\@professorii 88, 93, 254
\@professoriii . . . . . . . 89, 94, 255
\@professoriv 90, 95, 256
\@programme 109, 110, 234
\@promoteri . . . . . 98, 102, 103, 322
\@promoterii 99, 104, 323
\@promoteriii . . . . . . . . . 100, 105, 324
\@promoteriv . . . . . . . . 101, 106, 325
\@subtitle . . . . 71, 72, 165, 246, 378
\@thanks . . . 285, 349
\@title . . . 165, 172, 182, 189, 244, 315, 377, 387
\@titlepagepicture . . 151, 152, 226, 227
\@versioncomment . . . . . 83, 84, 264
\@versionyear . . . . . 79, 80, 211, 259, 277
\\ . . . 130–134, 204, 234, 236, 237, 239, 244, 246, 253–255, 258, 311, 315, 322–324, 331, 332
A
\academicyear . . . 146
\addfontfeature . . . 34
\addtolength . . . 14
\AddToShipoutPicture . . . . 220, 274, 300
\and . . . 289, 353
\AtBeginDocument . . . . . 375, 385
\author . . . 74, 287, 351 B
\baselineskip . . . 14
\begin . . . . 219, 223, 238, 251, 263, 299, 303, 320, 330
\bfseries . . . 36 C
\cfoot 164, 171, 181, 188
\chead 161, 168, 178, 185
\cleardoublepage . . 342
\clearpage 272, 281, 344
\color . . . 275
\copyright . . . 211
\copyrightnotices . 154
\coursecode . . . 112
\coursecodei . . . 118
\coursecodeii . . . 119
\coursecodeiii . . . . 120
\coursecodeiv . . . 121
\courseversion . . . . 74 D
\date . . . 288, 352
\DeclareOption . . . 3
\defensedate . . . 138
\defenselocation . . 142
\definecolor . . . . . 216, 217, 296, 297
\department . . . 62
\departmentacronym . 66
\diploma . . . 123 E
\else . . . 37, 165, 166, 183, 264, 343
\end . . . 241, 257, 265, 267, 271, 326, 334, 336, 340
\equal . . . 128–134
\ExecuteOptions . . . . 8 F
\fi . . . 51, 165, 173, 190, 264, 278, 345
\fill . . . 228, 304, 306
\fontspec . . . 35, 36
\footrulewidth . . . . 194 G
\global 283–289, 347–353 H
\headrulewidth . . . . 193
\Huge . . . 276
\huge . . . 244
\hypersetup 360, 376, 386 I \if . . . 165, 264 \if@copyright . . . 2, 273 \if@twoside 159, 176, 341 \IfFileExists 38, 43, 226 \ifthenelse . . . 128–134 \ifxetex . . . 31
\includegraphics . . . . . . 227, 232, 309 L \Large 234, 246, 247, 315 \large . . . . 236–238, 250, 311, 312, 316 \LaTeX . . . 203
\leftmark . . . . . 162, 167, 179, 184 \let . . 283–289, 347–353 \lfoot 163, 170, 180, 187 \lhead 160, 167, 177, 184 \LoadClassWithOptions . . . 10
M \maketitle . . . 214
\MoSIW . . . . 126, 128–134 N \newif . . . 2
O \onecolumn . . . 199
P \PackageError . . . 23
\pagenumbering . . . . 198
\pagestyle . . . 195,
218, 290, 298, 354 \parindent . . . 13
\parskip . . . 14
\path . . . 224, 231, 308 \phantom . . . 270, 339 \ProcessOptions . . . . 9
\professor . . . 86
\professori . . . 92
\professorii . . . 93
\professoriii . . . 94
\professoriv . . . 95
\programme . . . 108
\promoter . . . 97
\promoteri . . . 103
\promoterii . . . 104
\promoteriii . . . 105
\promoteriv . . . 106
\put . . . 222, 274, 302 R \raggedbottom . . . 196
\raggedright . . . 197
\relax . . . 283,
284, 286–289, 347, 348, 350–353 \renewcommand . . 35,
36, 40, 41, 45, 46, 64, 68, 72, 76, 80, 84, 91– 95, 102–106, 110, 117–121, 127, 140, 144, 148, 152, 156, 193, 194, 215, 295 \RequirePackage . . . . . . 18, 30, 32, 33, 39, 44, 49, 50, 54–57, 60, 359 \rfoot 165, 172, 182, 189 \rhead 162, 169, 179, 186 \rightmark . . . 160, 177 \rotatebox . . . 275
S \selectverdanabold . . . . 29, 36, 41, 46, 234, 244, 276, 311, 312, 315 \selectverdananormal . . . 21,
29, 35, 40, 45, 235, 245, 250, 262, 316, 319, 329 \setcounter 15, 282, 346 \setlength 13, 221, 301 \slshape . . . . . 160, 162, 177, 179 \small . . . 319, 329 \stretch . . . 279
\subtitle . . . 70
T \textbf . . . 321
\texttt . . . 204
\thanks . . . 283, 347 \thepage . . 160, 162, 169, 177, 179, 186 \thispagestyle 291, 355 \title . . . . 70, 286, 350 \titlepagepicture . 150 U \unitlength . . . 221, 301 \usefont . 40, 41, 45, 46 V \versioncomment . . . 82
\versionyear . . . 78
\vspace . . . 279