% \iffalse meta-comment
%
% Extracted from uccthesis.xml
% uccthesis.dtx is copyright © 2010-2014 by Peter Flynn <pflynn@ucc.ie>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3 of this license or (at your option) any later
% version. The latest version of this license is in:
%
%     http://www.latex-project.org/lppl.txt
%
% and version 1.3 or later is part of all distributions of
% LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
% 
% The current maintainer of this work is Peter Flynn <pflynn@ucc.ie>
%
% This work consists of the files uccthesis.dtx and uccthesis.ins,
% the derived file uccthesis.cls, and any ancillary files listed
% in the MANIFEST.
%
% \fi
% \iffalse
%<*driver>
\ProvidesFile{uccthesis.dtx}
%</driver>
%<class>\NeedsTeXFormat{LaTeX2e}[2009/09/24]
%<class>\ProvidesClass{uccthesis}[2014/09/21 v2.3
%<class> Typesetting a UCC thesis with LaTeX]
%<*driver>
\RequirePackage{fixltx2e,fix-cm}
\PassOptionsToPackage{svgnames}{xcolor}
\documentclass[a4paper,11pt]{ltxdoc}
\makeatletter
\renewcommand\appendix{\par
  \setcounter{section}{0}%
  \setcounter{subsection}{0}%
  \gdef\thesection{\@Alph\c@section}}
\makeatother
%%
%% Packages added automatically
%%
\usepackage{classpack}% '' was detected.
\let\SavedShow\show
\usepackage[utf8x]{inputenc}[2008/03/30]% '' was detected.
\AtBeginDocument{\let\show\SavedShow}
\DeclareUnicodeCharacter{9251}{\textvisiblespace}
\PrerenderUnicode{–}
\PrerenderUnicode{š}
\PrerenderUnicode{ć}
\PrerenderUnicode{Å}
\usepackage[T1]{fontenc}% '' was detected.
\usepackage{lmodern}% '' was detected.
\usepackage{mflogo}% '' was detected.
\usepackage{array}% 'tgroup' was detected.
\usepackage{calc}% '' was detected.
\usepackage{ccaption}% '' was detected.
\captionnamefont{\bfseries}
\captionstyle{\raggedright}
\usepackage[inline]{enumitem}% orderedlist/@spacing='compact' was detected.
\setlist[description]{style=unboxed}
\usepackage{fancybox}% 'guibutton' was detected.
\usepackage{fancyvrb}% 'programlisting' was detected.
\usepackage{fmtcount}% xref/@linkend='varlistentry' was detected.
\usepackage[a4paper,left=1in,right=1in,
  textwidth=160mm,textheight=9in]{geometry}% '' was detected.
\usepackage{graphicx}% 'imagedata/@fileref' was detected.
\usepackage{listings}% 'programlisting' was detected.
\lstdefinelanguage[DocBook]{XML} {morekeywords={abstract,address,affiliation,annotation,arg,author, book,chapter,classname,cmdsynopsis,command,constraintdef,contrib, copyright,cover,date,email,emphasis,envar,filename,firstname, footnote,guibutton,guilabel,guimenu,guimenuitem,guisubmenu, holder,info,itemizedlist,listitem,literal,member,option, orderedlist,orgdiv,orgname,package,para,parameter,part, personname,phrase,procedure,productname,programlisting,quote, refsection,remark,constructorsynopsis,methodparan,modifier, funcparams,olink,bibliography,biblioentry,biblioset,subtitle, artpagenums,volumenum,issuenum, releaseinfo,replaceable,revdescription,revhistory,revision, sect1,sect2,sect3,sect4,seg,seglistitem,segmentedlist,segtitle, simplelist,step,surname,systemitem,tag,term,title,uri,userinput, variablelist,varlistentry,wordasword,xref,year,xml:id,xlink:href},}
\lstdefinelanguage[TEI]{XML} {morekeywords={TEI.2,teiHeader,div2,head,p,num,val,xml:id}, }[keywords,comments,strings]
\lstloadlanguages{[LaTeX]TeX,[DocBook]XML,XSLT,bash,R}
\lstnewenvironment{listingsdoc} {\lstset{language={[LaTeX]TeX}}} {}
\lstset{basicstyle=\small\color{Black}\ttfamily, literate= {Ö}{{\"O}}1 {Ä}{{\"A}}1 {Ü}{{\"U}}1 {ß}{{\ss}}2 {ü}{{\"u}}1 {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1 {ä}{{\"a}}1 {ö}{{\"o}}1, keywordstyle=\color{DarkGreen}\bfseries, commentstyle=\color{Gray}\upshape, stringstyle=\color{DarkRed}\upshape, emphstyle=\color{MediumBlue}\itshape, showstringspaces=false, columns=fullflexible, keepspaces=true}
\usepackage{makeidx}% '' was detected.
\makeindex
\usepackage{multirow}% 'entry/@morerows' was detected.
\usepackage{nicefrac}% '' was detected.
\def\textonehalf{\ensuremath{\nicefrac12}}
\usepackage{sectsty}% '' was detected.
\allsectionsfont{\sffamily}
\renewcommand*{\descriptionlabel}[1]{\hspace\labelsep \sffamily\bfseries #1}
\usepackage{url}% 'uri' was detected.
\usepackage{varioref}% 'xref' was detected.
\vrefwarning
\labelformat{chapter}{Chapter~#1}
\makeatletter
\labelformat{chapter}{\@chapapp~#1}
\makeatother
\labelformat{section}{section~#1}
\labelformat{subsection}{section~#1}
\labelformat{subsubsection}{section~#1}
\labelformat{paragraph}{section~#1}
\labelformat{figure}{Figure~#1}
\labelformat{table}{Table~#1}
\labelformat{item}{item~#1}
\renewcommand{\reftextcurrent}{elsewhere on this page}
\def\reftextafter{on the \reftextvario{next}{following} page}
\usepackage[svgnames]{xcolor}% '' was detected.
\makeatletter
\@ifundefined{T}{\newcommand{\T}[2]{{\fontencoding{T1}\selectfont#2}}}{}
\makeatother
\usepackage{dox}% '' was detected.
\makeatletter
\doxitem[idxtype=attribute]{Attribute}{CPK@attribute}{attributes}
\makeatother
\makeatletter
\doxitem[idxtype=attributevalue]{AttributeValue}{CPK@attributevalue}{attribute values}
\makeatother
\makeatletter
\doxitem[idxtype=class]{Class}{CPK@class}{classes}
\makeatother
\makeatletter
\doxitem[idxtype=colour]{Colour}{CPK@colour}{colours}
\makeatother
\makeatletter
\doxitem[idxtype=counter]{Counter}{CPK@counter}{counters}
\makeatother
\makeatletter
\doxitem[idxtype=DTD]{DTD}{CPK@dtd}{DTDs/Schemas}
\makeatother
\makeatletter
\doxitem[idxtype=element]{Element}{CPK@element}{element types}
\makeatother
\makeatletter
\doxitem[idxtype=entity]{Entity}{CPK@entity}{entities}
\makeatother
\makeatletter
\doxitem[idxtype=error]{Error}{CPK@error}{errors}
\makeatother
\makeatletter
\doxitem[idxtype=function]{Function}{CPK@function}{functions}
\makeatother
\makeatletter
\doxitem[idxtype=language]{Language}{CPK@language}{languages}
\makeatother
\makeatletter
\doxitem[macrolike,idxtype=length]{Length}{CPK@length}{lengths}
\makeatother
\makeatletter
\doxitem[idxtype=mode]{Mode}{CPK@mode}{modes}
\makeatother
\makeatletter
\doxitem[idxtype=option]{Option}{CPK@option}{options}
\makeatother
\makeatletter
\doxitem[idxtype=package]{Package}{CPK@package}{packages}
\makeatother
\makeatletter
\doxitem[idxtype=template]{Template}{CPK@template}{templates}
\makeatother
\newcommand{\LabelFont}[2][\relax]{\strut {\fontencoding\encodingdefault \fontfamily{lmtt}\fontseries{lc}#1\selectfont#2}\space}
\makeatletter
\let\CPK@macro\macro\let\CPK@endmacro\endmacro
\makeatother
\makeatletter
\let\CPK@environment\environment\let\CPK@endenvironment\endenvironment
\makeatother
\makeatletter
\def\PrintAttributeName#1{\LabelFont{@#1}}
\makeatother
\def\PrintAttributeValueName#1{\LabelFont{"#1"}}
\def\PrintClassName#1{\LabelFont[\fontfamily{lmss}]{#1}}
\def\PrintColourName#1{\LabelFont[\color{#1}]{#1}}
\def\PrintCounterName#1{\LabelFont{#1}}
\def\PrintDTDName#1{\LabelFont{#1}}
\def\PrintElementName#1{\LabelFont{<#1>}}
\def\PrintEntityName#1{\LabelFont{\&#1;}}
\def\PrintEnvironmentName#1{\LabelFont[\fontfamily{lmss}]{#1}}
\def\PrintErrorName#1{\LabelFont[\color{Red}!]{#1}}
\def\PrintFunctionName#1{\LabelFont[\bfseries\itshape]{#1}}
\def\PrintLanguageName#1{\LabelFont{#1}}
\def\PrintLengthName#1{\LabelFont{#1}}
\def\PrintMacroName#1{\LabelFont{#1}}
\def\PrintModeName#1{\LabelFont[\sffamily]{\textlangle#1\textrangle}}
\def\PrintOptionName#1{\LabelFont[\bfseries]{#1}}
\def\PrintPackageName#1{\LabelFont[\fontfamily{lmss}]{#1}}
\def\PrintTemplateName#1{\LabelFont[\bfseries]{#1}}
% added babel automatically
\usepackage[irish,english]{babel}
\usepackage{apacite}
%%
%% Packages added by author
%%
\usepackage{pslatex}
\usepackage{DejaVuSerif}
\usepackage{DejaVuSans}
\usepackage{textcomp}
\usepackage{bbding}
\usepackage{bigdelim}
\usepackage{printlen}
\usepackage{parskip}
\makeatletter
\renewcommand{\BibTeX}{%
	B\kern-.05em\textsc{i\kern-.025em b}\kern-.08em\TeX}
\newcommand{\menusep}{%
	\enspace\vrule width.6667pt depth.333ex
	    height1em\enspace}
\def\hline{%
	\noalign{\ifnum0=`}\fi
  \@ifnextchar[{\@@hline}{\@@hline[\arrayrulewidth]}}
\def\@@hline[#1]{%
	\hrule \@height#1 \futurelet
  \reserved@a\@xhline}
\newcounter{fnote}
\newcommand{\fnote}{%
	\stepcounter{fnote}\llap{%
  \footnotesize\textsuperscript{%
    \itshape\alph{fnote}\upshape)}\thinspace}}
\makeatother
\usepackage{classpack}
%%
%% Settings for docstrip and latexdoc 
%%
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}\raggedright
  \DocInput{uccthesis.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{2445}
%
% \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{v2.3}{2014/09/21}{Added doc on resetbibstyle: Coping with LaTeX and BibTeX styles, and MLA's need for PassOptionsToPackage.}
% \changes{v2.2}{2014/08/06}{Added DAH: Digital Arts and Humanities.}
% \changes{v2.1}{2014/06/29}{Revised for new regulations: Changed to 12pt.}
% \changes{v1.21}{2014/06/26}{Adjusted top and bottom margins: This allows less room at the top and more at the bottom.}
% \changes{v1.20}{2014/06/24}{Added availability to maketitle: Used for links to epub version.}
% \changes{v1.19}{2014/05/30}{Fixed bug in automated LOF/LOT: Added separate counters, incremented by endtable and endfigure (thanks to Malcolm Prinn of Tyndall for finding this bug).}
% \changes{v1.18}{2014/03/08}{Split options tables into two chapters: Refactored code for updated ClassPack.}
% \changes{v1.17}{2014/01/27}{Added switch to force apacite to load after hyperref: And removed the data, as the problem is fixed, but retained the code.}
% \changes{v1.16}{2013/11/19}{Added switch to fix Head of Dept/School: .}
% \changes{v1.15}{2013/11/12}{Added method to change tocdepth: .}
% \changes{v1.14}{2013/11/12}{Changed prelims to onehalfspacing: .}
% \changes{v1.13}{2013/10/02}{Added detection for glossaries package: .}
% \changes{v1.12}{2013/07/25}{Fixed double-sided: .}
% \changes{v1.11}{2013/07/23}{Removed from auto-maketitle and put in start of part or chapter: .}
% \changes{v1.10}{2013/07/09}{Added twoside option: Some people need to print bindable two-sided copies of long theses..}
% \changes{v1.09}{2013/07/06}{Corrected locations for installation in build file: Distinct directories for different embedded filetypes; also updated BIS to use APA.}
% \changes{v1.08}{2013/06/04}{Added short title to main title: Use the @title and @@title.}
% \changes{v1.07}{2013/05/06}{Reorganisation of implementations sections: Addition of crest files, changes to description lists.}
% \changes{v1.06}{2013/03/27}{Changes to bibrefs: Physics changed to ieeetr; resetbibstyle updated.}
% \changes{v1.05}{2013/03/23}{Updated for autopackage: General revision of packages; removed flag-protectors like mode="kernel".}
% \changes{v1.04}{2013/02/08}{Changes to quotations: Spacing of instep citation was not flush to margin.}
% \changes{v1.03}{2012/12/18}{Renamed Bibliography to References: Following suggestion from Ehsan Sooudi of Tyndall..}
% \changes{v1.02}{2012/11/22}{Added revision date facility for drafts: Added @revdate and revdate; if present in drafts, they supersede the default TODAY date..}
% \changes{v1.01}{2012/07/28}{Updated installation instructions: Added detail about installing the crest..}
% \changes{v1.00}{2012/06/11}{Added new code for citations in quotations: This tucks citations into the remaining space of the last line where possible..}
% \changes{v0.99}{2012/04/07}{Added tracing to bibliography: Reset page margins to allow printing on inkjets with restricted paper-handling.}
% \changes{v0.98}{2012/04/02}{Tidying up packages: Removed xcolor and ulem.}
% \changes{v0.97}{2012/03/31}{Experimenting with mdiss option for dissertations: Minor Dissertation option.}
% \changes{v0.96}{2012/03/16}{Rewrite of XML for new version of classpack: Changed method of specification of packages.}
% \changes{v0.95}{2011/08/21}{Reinforced wording of justification option: Justification option was open to misinterpretation..}
% \changes{v0.94}{2011/08/05}{Fixed incorrect recording of justification option: Justification option was not resetting indentation and paragraph spacing..}
% \changes{v0.93}{2011/06/10}{More bugs reported by testers: 1) Re-placed refloating to put captions under figures (already above tables).; 2) Enclosed footmisc in ifjustified to defeat ragged footnotes; moved ragged redefinition of captions to do the same.; 3) Added plainheaders option to avoid fancy headers.; 4) Added indented option to revert to indented/unspaced paragraphs.; 5) Added stable option to footmisc to allow footnotes in chapter and section headings..}
% \changes{v0.92}{2011/05/22}{Bugs reported by testers: 1) Added code to automate detection of use of tables and figures, and disable LoT and LoF accordingly.; 2) Added nolot and nolof options to manually disable automated Lists of Tables and Figures.; 3) Replaced the harvard package reference with natbib and har2nat, because harvard on its own was invoking html and breaking on an undefined htmladdnormallink* command (thanks to Dan Luecking, Mico Loretan, and others for this).; 4) Corrected misspelling of Sociology..}
% \changes{v0.91}{2011/05/10}{Changes after first release: 1) Added justified option; 2) Implemented 10/11/12 point size options; 3) Changed proportions of the page for floats.}
% \changes{v0.90}{2011/04/07}{Last changes before release: 1) Added all known degrees; 2) Updated bibliographic reference styles for those schools and departments who responded to the request; 3) Fixed text-wrapping error in footers and headers.}
% \changes{v0.70}{2010/05/22}{First working version derived from the author's personal thesis class.: Added running headers and footers.}
%
% \GetFileInfo{uccthesis.dtx}
%
% \DoNotIndex{\@,\@@par,\@beginparpenalty,\@empty}
% \DoNotIndex{\@flushglue,\@gobble,\@input}
% \DoNotIndex{\@makefnmark,\@makeother,\@maketitle}
% \DoNotIndex{\@namedef,\@ne,\@spaces,\@tempa}
% \DoNotIndex{\@tempb,\@tempswafalse,\@tempswatrue}
% \DoNotIndex{\@thanks,\@thefnmark,\@topnum}
% \DoNotIndex{\@@,\@elt,\@forloop,\@fortmp,\@gtempa,\@totalleftmargin}
% \DoNotIndex{\",\/,\@ifundefined,\@nil,\@verbatim,\@vobeyspaces}
% \DoNotIndex{\|,\~,\ ,\active,\advance,\aftergroup,\begingroup,\bgroup}
% \DoNotIndex{\mathcal,\csname,\def,\documentstyle,\dospecials,\edef}
% \DoNotIndex{\egroup}
% \DoNotIndex{\else,\endcsname,\endgroup,\endinput,\endtrivlist}
% \DoNotIndex{\expandafter,\fi,\fnsymbol,\futurelet,\gdef,\global}
% \DoNotIndex{\hbox,\hss,\if,\if@inlabel,\if@tempswa,\if@twocolumn}
% \DoNotIndex{\ifcase}
% \DoNotIndex{\ifcat,\iffalse,\ifx,\ignorespaces,\index,\input,\item}
% \DoNotIndex{\jobname,\kern,\leavevmode,\leftskip,\let,\llap,\lower}
% \DoNotIndex{\m@ne,\next,\newpage,\nobreak,\noexpand,\nonfrenchspacing}
% \DoNotIndex{\obeylines,\or,\protect,\raggedleft,\rightskip,\rm,\sc}
% \DoNotIndex{\setbox,\setcounter,\small,\space,\string,\strut}
% \DoNotIndex{\strutbox}
% \DoNotIndex{\thefootnote,\thispagestyle,\topmargin,\trivlist,\tt}
% \DoNotIndex{\twocolumn,\typeout,\vss,\vtop,\xdef,\z@}
% \DoNotIndex{\,,\@bsphack,\@esphack,\@noligs,\@vobeyspaces,\@xverbatim}
% \DoNotIndex{\`,\catcode,\end,\escapechar,\frenchspacing,\glossary}
% \DoNotIndex{\hangindent,\hfil,\hfill,\hskip,\hspace,\ht,\it,\langle}
% \DoNotIndex{\leaders,\long,\makelabel,\marginpar,\markboth,\mathcode}
% \DoNotIndex{\mathsurround,\mbox,\newcount,\newdimen,\newskip}
% \DoNotIndex{\nopagebreak}
% \DoNotIndex{\parfillskip,\parindent,\parskip,\penalty,\raise,\rangle}
% \DoNotIndex{\section,\setlength,\TeX,\topsep,\underline,\unskip,\verb}
% \DoNotIndex{\vskip,\vspace,\widetilde,\\,\%,\@date,\@defpar}
% \DoNotIndex{\[,\{,\},\]}
% \DoNotIndex{\count@,\ifnum,\loop,\today,\uppercase,\uccode}
% \DoNotIndex{\baselineskip,\begin,\tw@}
% \DoNotIndex{\a,\b,\c,\d,\e,\f,\g,\h,\i,\j,\k,\l,\m,\n,\o,\p,\q}
% \DoNotIndex{\r,\s,\t,\u,\v,\w,\x,\y,\z,\A,\B,\C,\D,\E,\F,\G,\H}
% \DoNotIndex{\I,\J,\K,\L,\M,\N,\O,\P,\Q,\R,\S,\T,\U,\V,\W,\X,\Y,\Z}
% \DoNotIndex{\1,\2,\3,\4,\5,\6,\7,\8,\9,\0}
% \DoNotIndex{\!,\#,\$,\&,\',\(,\),\+,\.,\:,\;,\<,\=,\>,\?,\_}
% \DoNotIndex{\discretionary,\immediate,\makeatletter,\makeatother}
% \DoNotIndex{\meaning,\newenvironment,\par,\relax,\renewenvironment}
% \DoNotIndex{\repeat,\scriptsize,\selectfont,\the,\undefined}
% \DoNotIndex{\arabic,\do,\makeindex,\null,\number,\show,\write,\@ehc}
% \DoNotIndex{\@author,\@ehc,\@ifstar,\@sanitize,\@title,\everypar}
% \DoNotIndex{\if@minipage,\if@restonecol,\ifeof,\ifmmode}
% \DoNotIndex{\lccode,\newtoks,\onecolumn,\openin,\p@,\SelfDocumenting}
% \DoNotIndex{\settowidth,\@resetonecoltrue,\@resetonecolfalse,\bf}
% \DoNotIndex{\clearpage,\closein,\lowercase,\@inlabelfalse}
% \DoNotIndex{\selectfont,\mathcode,\newmathalphabet,\rmdefault}
% \DoNotIndex{\bfdefault,\DeclareRobustCommand}
% \DoNotIndex{\menusep}
% \DoNotIndex{\hline}
% \DoNotIndex{\@@hline}
% \DoNotIndex{\fnote}
% \DoNotIndex{\htmladdnormallink*}
% \DoNotIndex{\documentclass}
% \DoNotIndex{\usepackage}
% \DoNotIndex{\appendix}
% \DoNotIndex{\prelim}
% \DoNotIndex{\project}
% \DoNotIndex{\title}
% \DoNotIndex{\author}
% \DoNotIndex{\date}
% \DoNotIndex{\supervisor}
% \DoNotIndex{\professor}
% \DoNotIndex{\maketitle}
% \DoNotIndex{\supervisors}
% \DoNotIndex{\qualifications}
% \DoNotIndex{\subtitle}
% \DoNotIndex{\volume}
% \DoNotIndex{\institute}
% \DoNotIndex{\centre}
% \DoNotIndex{\unit}
% \DoNotIndex{\hospital}
% \DoNotIndex{\sponsor}
% \DoNotIndex{\school}
% \DoNotIndex{\department}
% \DoNotIndex{\cjktext}
% \DoNotIndex{\ListOf...}
% \DoNotIndex{\prelim*}
% \DoNotIndex{\part}
% \DoNotIndex{\chapter}
% \DoNotIndex{\label}
% \DoNotIndex{\pageref}
% \DoNotIndex{\textbf}
% \DoNotIndex{\bfseries}
% \DoNotIndex{\section}
% \DoNotIndex{\subsection}
% \DoNotIndex{\subsubsection}
% \DoNotIndex{\paragraph}
% \DoNotIndex{\subparagraph}
% \DoNotIndex{\small}
% \DoNotIndex{\cite}
% \DoNotIndex{\bibliography}
% \DoNotIndex{\resetbibstyle}
% \DoNotIndex{\documentclass...}
% \DoNotIndex{\EUR}
% \DoNotIndex{\raggedright}
% \DoNotIndex{\texteuro}
% \DoNotIndex{\relax}
% \DoNotIndex{\@userbibstyle}
% \DoNotIndex{\@usebib}
% \DoNotIndex{\ifthenelse}
% \DoNotIndex{\ifthesis}
% \DoNotIndex{\sloppy}
% \DoNotIndex{\raggedbottom}
% \DoNotIndex{\class@mode}
% \DoNotIndex{\iflot}
% \DoNotIndex{\iflof}
% \DoNotIndex{\institution}
% \DoNotIndex{\ackname}
% \DoNotIndex{\today}
% \DoNotIndex{\ifcjk}
% \DoNotIndex{\ifjustified}
% \DoNotIndex{\ifindented}
% \DoNotIndex{\iffancy}
% \DoNotIndex{\parbox}
% \DoNotIndex{\chaptermark}
% \DoNotIndex{\sectionmark}
% \DoNotIndex{\ps@headings}
% \DoNotIndex{\availability}
% \DoNotIndex{\@submission}
% \DoNotIndex{\@ifpackageloaded}
% \DoNotIndex{\pdfinfo}
% \DoNotIndex{\refsec}
% \DoNotIndex{\ifoptarg}
% \DoNotIndex{\sourceatright}
% \DoNotIndex{\abovecaptionskip}
% \DoNotIndex{\belowcaptionskip}
% \DoNotIndex{\vstrut}
% \setcounter{secnumdepth}{5}
%
% \def\fileversion{2.3}
% \def\filedate{2014/09/21}
% \title{The  \textsf{uccthesis} \LaTeXe\ document class\thanks{%
% This document corresponds to \textsf{uccthesis}
% \textit{v.}\ \fileversion $\beta$, dated \filedate.}
% \\[1em]\Large 
% Typesetting a UCC thesis with \LaTeX{}}
% \author{Peter Flynn MA MICS\\\normalsize UCC Computer Centre\\[-.25ex]\normalsize Electronic Publishing Unit\\\normalsize(\url{pflynn@ucc.ie})}
% \maketitle
% \renewcommand{\abstractname}{Summary}\thispagestyle{empty}
% \begin{abstract}
% \parskip=0.5\baselineskip
% \advance\parskip by 0pt plus 2pt
% \parindent=0pt% \noindent
% This is a \LaTeX{} document class for typesetting theses at
% University College Cork, according to the layout rules
% specified by the Registrar, Academic Council, and the Graduate
% Studies Office.\par
% These rules (especially the naming of degrees and the
% disciplines within which they are granted) are subject to
% change from time to time, so before using this software,
% please check \url{http://research.ucc.ie/latex/} to see
% if there is an updated version.\par
% This is a late draft for testing. All users at this stage
% are regarded as testers, and should report any difficulties
% with the software or the documentation in the first instance
% to \url{epu@ucc.ie}.\par
% You need a copy of the \LaTeX{} software and a suitable
% editor on your computer in order to use this document class.
% If you are new to \LaTeX{}, please ensure that you read the
% documentation referred to in
% \url{http://research.ucc.ie/latex/} before
% starting.\par
% \end{abstract}
% \clearpage
% \tableofcontents
% \clearpage\null\vfill\begingroup\centering
% To struggling authors everywhere\par
% \par\endgroup\vfill
% \clearpage\section*{Acknowledgements}\addcontentsline{toc}{subsection}{Acknowledgements}
% My thanks go to all the people who have kept me supplied
% with solutions to formatting problems which I have been able to
% incorporate into this package.\par
% Thank you also to the inhabitants of the \url{comp.text.tex}
% Usenet newsgroup for answering questions, and for their work in
% writing and maintaining all the packages on which this class
% depends.\par
% Most of all, thanks to the patient students of UCC who
% waited for me to finish this.\par
% \clearpage\section*{What's new?}\addcontentsline{toc}{subsection}{What's new?}
% The Change History \vpageref{changehistory} which lists the stages of
% development, and the Index lists every \TeX{} and \LaTeX{}
% command used in the class. Technically-minded authors might
% want to examine the commented listing in
% \vref{implementation}: there is much to be gained
% from understanding how something works.\par
% From version 0.95 this class is distributed in the
% standard DTX format. Please read the installation instructions
% in \vref{installation}.\par
% \subsection*{Main differences from \LaTeX{}'s default classes}
% \begin{itemize}
% \item You {\small MUST} start by
%       declaring the document class
%       \textsf{uccthesis} instead of \textsf{article}, \textsf{book}, or \textsf{report} (details \vpageref{setup})
% \item You {\small MUST} use at least
%       two options in your document class declaration: one for
%       your discipline and one for your degree (details \vpageref{setdeg})
% \item You {\small MUST} specify your
%       Supervisor[s] and Professor (Head of School or
%       Department) using the special commands provided in \vref{titlepage}. (You give your title, author,
%       and date in the normal way.)
% \item The Table of Contents, List of Figures (if used),
%       List of Tables (if used), and Declaration are all
%       automated: you {\small SHOULD NOT}
%       include commands for these yourself (see \vref{docstruct})
% \item There are new environments for your
%       Acknowledgements,  Dedication, and any preliminary
%       explanatory sections, if you need them, before your
%       first Part or Chapter (see \vref{prelims})
% \item There is an optional Epigraph (cited quotation)
%       which you can use immediately after a chapter title
%       (see `\textbf{\texttt{epigraph}}', the first item in the list in \vref{epigraph})
% \item The Quotation environment now has an optional
%       argument for a \BibTeX{} citation key (see `\textbf{\texttt{quotation}}', the \ordinalstringnum{2} item in the list in \vref{quotation})
% \item The default format is draft-mode,
%       1\nicefrac12-line-spaced, unjustified text, no indentation,
%       and a line-space between paragraphs. These defaults
%       (except draft mode) were set to maximise readability,
%       but can be changed via class options: see the list in
%       \vref{moreopts}
% \item Some 30 or so packages are preloaded (according to
%       the options you choose for the document class): see
%       \vref{preloaded}. You
%       {\small SHOULD NOT} re-specify any
%       of these if they have already been loaded
% \end{itemize}
% \clearpage\section*{Introduction to \LaTeX{}}\addcontentsline{toc}{subsection}{Introduction to \LaTeX{}}\label{intro}
% \LaTeX{} is a document preparation system for the \TeX{}
% typesetting program. It is designed to automate all the tedious
% and repetitive tasks of preparing a document, freeing authors to
% concentrate on their writing.\par
% While it can also be used for almost any typesetting task,
% it is ideal for long or complex documents (the two are not
% necessarily synonymous), especially for documents with a
% well-defined structure such as books, articles, journals,
% theses, reports, white papers, and manuals.\par
% Although it originally came from the disciplines of
% mathematics and computing science, it is nowadays equally at
% home in the Humanities, thanks to the enormous range of
% add-ons or plug-ins (`document classes' and
% `packages'), and the extensive range of
% typefaces, which extend the basic typesetting capabilities
% into hundreds of specialist areas and formatting
% requirements.\par
% \par\begingroup\fboxsep1em\centering
%   \fbox{\begin{minipage}{0.8\columnwidth}\sffamily
%  \raggedright\parindent0pt\parskip=.5\baselineskip
% \subsubsection*{\sffamily What You Got Is What You Gave Me}
% \LaTeX{} is a typesetter, not a wordprocessor. It has no
%   graphical interface of its own~--- instead, you can choose
%   one of many \LaTeX{} editors available, or use your own
%   favourite plaintext editor.\par
% \LaTeX{} works by formatting your text according to how
%   you have labelled it. If you label some text as a section
%   title, that is how it will be formatted. If you mislabel it,
%   \LaTeX{} cannot guess how you really wanted it: you have to
%   tell it.\par
% \end{minipage}}\par\endgroup
% \subsection*{Documentation and training}
% If you haven't used \LaTeX{} before, you
%   should read the online beginners' guide, \emph{Formatting Information} \cite{fi} from
%   \url{http://latex.silmaril.ie/formattinginformation/},
%   and install the latest version of the software from the
%   \TeX{} Collection DVD issued by the \TeX{} Users Group
%   (\url{http://www.tug.org/}). UCC is a TUG member and
%   the DVD can be obtained from the Computer Centre Electronic
%   Publishing Unit. The software is free in both senses: free
%   of restrictions (it can be copied and given away); and also
%   free of charge.\par
% \begin{itemize}
% \item Unix and GNU/Linux users do not normally need the
%       DVD: the software can be installed online as
%       \url{texlive-full} from each distribution's own
%       archive or Software Centre (eg
%       \emph{yum},
%       \emph{rpm},
%       \emph{apt},
%       \emph{Synaptic}, etc). A choice of
%       editors and viewers is available the same way.
% \item Apple Mac users should use the DVD or download the
%       latest \url{MacTeX.mpkg.zip} from
%       \url{http://tug.org/mactex/} (about 1.5Gb);
% \item Windows users should use the DVD and select the
%       \emph{Pro\TeX{}t}
%       distribution. Details of how to do this are in
%       \emph{Formatting Information} \cite{fi}.
% \end{itemize}
% The Training Centre holds occasional 1--day beginners'
%   courses in \LaTeX{}: contact \url{tcentre@ucc.ie} for
%   details.\par
% \subsection*{\LaTeX{} support (questions about \LaTeX{} itself, not
%   about the \textsf{uccthesis} document class)}
% \TeX{} and \LaTeX{} are strongly supported by millions of
%   users worldwide, and by the teams of developers organised
%   around the \TeX{} Users Group and other users groups around
%   the world.\par
% There are therefore lots of places you can ask or search
%   for help, depending on how common or rare your query is.
%   Before you post a question on a web site or mailing list or
%   newsgroup, make sure you are providing enough information
%   for people to understand what you are trying to do. Best of
%   all, have a minimal example that you can upload, that
%   demonstrates what you want, or how what you are trying
%   doesn't work.\par
% \begin{enumerate}
% \item The \TeX{} FAQ maintained by the UK \TeX{} Users Group
%       on behalf of the worldwide \TeX{} community at
%       \url{http://www.tex.ac.uk/faq}~--- always try here
%       first, to make sure you're not asking something that a
%       million people before you have asked
% \item The UCC \LaTeX{} mailing list
%       \url{tex-users@lists.ucc.ie}~--- this is open to
%       all: those who go on the 1--day course are
%       automatically added; anyone can join at
%       \url{http://lists.ucc.ie/tex-users.html}
% \item The island-wide public mailing list
%       \url{italic-l@listserv.heanet.ie} for the Irish
%       \TeX{} And \LaTeX{} In-print Community at
%       \url{http://listserv.heanet.ie/italic-l.html}
% \item The Usenet newsgroup \url{comp.text.tex} (ask
%       your ISP for access, or use the Google Groups
%       interface). This is the principal technical forum,
%       monitored by the designers and developers. High-volume
%       (which is why it's a newsgroup, not a web site or
%       mailing list), but full of information
% \item A native Google Group called
%       {\ttfamily{}latexusersgroup@gmail.com}
% \item Hundreds of web sites, led by the excellent
%     \url{tex.stackexchange.com}, whose searchable archive
%     and votable answers make it heavily used
% \item Online and on paper: \emph{TUGboat},
%       the quarterly journal of the \TeX{} Users Group.
%       Reference copies are available in UCC; email
%       \url{latex@ucc.ie} or check the index at
%       \url{http://tug.org/tugboat/}.
% \item Dozens of languages and cultures have \TeX{} users
%       groups for communication, development of their own
%       typefaces and resources: see the list at
%       \url{http://tug.org/usergroups.html}
% \end{enumerate}
% \clearpage\section*{Terminology}\addcontentsline{toc}{subsection}{Terminology}\label{terms}
% \TeX{} and \LaTeX{} terminology and appearances used in
% this document are highlighted in the following ways:\par
% \begin{itemize}
% \item The names of class options and package options are
%     shown in \textbf{\texttt{bold monospace type}};\\ Example: \textbf{\texttt{phd}}\par
% Class options are the ones you use in the {\ttfamily{}\textbackslash{}documentclass} (first) line of your document;
%     package options are the ones you use in {\ttfamily{}\textbackslash{}usepackage} commands in your Preamble. Class
%     and package options always go in [square brackets] between
%     the command and the curly brace of the argument.
% \item The names of document classes
%     and packages are shown in \textsf{sans-serif type};\\
%     Example: \textsf{xcolor};
% \item The names of \LaTeX{} commands
%     are in {\ttfamily{}monospace type};\\ Example:
%     {\ttfamily{}\textbackslash{}appendix};
% \item Where it is important to demonstrate the
%     arguments that a command may take,
%     they are shown mnemonically in angled brackets; this means
%     yu must replace them with meaningful values of your own:\\ Examples: {\ttfamily{}\textbackslash{}prelim}\marg{title},\quad{\ttfamily{}\textbackslash{}project}\oarg{option}\marg{name};
% \item The names of environments are
%     in \texttt{monospace type};\\ Example: \texttt{dedication}.
% \end{itemize}
% Commands and environments are also shown in the margin,
% if specially relevant, and can be found in the Index.\par
% The keywords {\small MUST},
% {\small MUST NOT},
% {\small REQUIRED},
% {\small SHALL}, {\small SHALL NOT}, {\small SHOULD},
% {\small SHOULD NOT},
% {\small RECOMMENDED},
% {\small MAY}, and
% {\small OPTIONAL} have a specific
% meaning when shown in {\small THIS TYPESTYLE}, following the specification in
% RFC 2119 \cite{rfc2119}.\par
% \clearpage
% \section{Installation}\label{installation}
% \par\begingroup\fboxsep1em\centering
%   \shadowbox{\begin{minipage}{0.8\columnwidth}\sffamily
%  \raggedright\parindent0pt\parskip=.5\baselineskip
% \subsubsection*{\sffamily Please note}
% As of June 2012 these instructions have changed. This
%   class is now distributed as a
%   {\small TDS}-conformant zip file.\par
% Please remove any earlier copy you may have been using,
%   because the subfolders have changed.\par
% \end{minipage}}\par\endgroup
% You {\small MUST} have a full \TeX{}
% system installed before you can use this document class.
% \LaTeX{} is a part of every full \TeX{} installation.  Please
% see the details \vref{intro}. For further
% information and a copy of the installation DVD, contact the
% Electronic Publishing Unit. \TeX{} is also available online at
% \url{http://www.tug.org/interest.html#free} or from the
% \TeX{} Users Group or a local user group.\par
% For personal use, this class
% {\small MUST} be installed in the same
% way as any add-on \LaTeX{} package or document class:
% \emph{in your personal \TeX{} folder} as
% described in \vref{personaltexfolder},
% \emph{not}, repeat
% {\small NOT} in the main or local \TeX{}
% folders used by your \TeX{} system installation.\par
% If this is the first time you have installed a package or
% class like this, or if you haven't yet set up your personal
% \TeX{} folder, see \vref{personaltexfolder} first.\par
% Installation on shared (multiuser) systems is different:
% see the instructions for systems administrators in \vref{shared}.\par
% \subsubsection*{Instructions for personal users}
% \begin{enumerate}
% \item Download the \textsf{uccthesis} document class zip file from the
%     link in \url{http://research.ucc.ie/latex/}. This is
%     only accessible from UCC IP addresses\par
% \item Unzip the {\ttfamily{}uccthesis-n.nn.tds.zip}
%     file directly into your personal \TeX{} folder.\par
% \item Users of \emph{MiK\TeX{}} on
%     Windows {\small MUST} update the
%     FNDB after installation (see the list `Updating the FileName DataBase' in \vref{update-fndb}), otherwise \LaTeX{} will not
%     find the new files.\par
% \end{enumerate}
% UCC users must also download and install the
% \textsf{ucccrest} from
% \url{http://research.ucc.ie/latex/#uccclasses} (section
% 2.4.1). This is only accessible from UCC IP addresses, as the
% crest is restricted to UCC students. You unzip this file
% into your personal \TeX{} folder in the same way as for the
% document class above.\par
% \subsection{Your personal \TeX{} folder}\label{personaltexfolder}
% If you don't have a personal \TeX{} folder yet, create one
%   now. The place for your personal \TeX{} folder is different
%   on Apple Mac, Linux, and Windows systems:\par
% \par\medskip{\sffamily\small\label{crefol}
% \begingroup
% \centering
% \begin{tabular}{@{}%
% 	l<{\poststrut\arraybackslash}%
% 	l<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}l<{\poststrut\arraybackslash}}{\sffamily\bfseries Operating System}&\multicolumn{1}{l<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Location of your personal \TeX{} folder}\\[2pt]\hline
% \vstrut
% Apple Macintosh OS\thinspace{}X&\url{~/Library/texmf}\\
% Unix and GNU/Linux&\url{~/texmf}\\
% Microsoft Windows&\\
%  • 95/98/XP/2003&\verb|C:\texmf|\\
%  • 2007/2010 and up&\verb|Computer\System\Users\|{\ttfamily\itshape your~name}\verb|\texmf|\\[2pt]\hline
% \end{tabular}
% \par\endgroup
% }
% If this folder does not already exist on your computer,
%   create it now.\par
% \subsubsection{Unix, GNU/Linux, and Apple Macintosh OS\thinspace{}X}
% You do not need to run
%     \emph{texhash} or
%     \emph{mktexlsr} after installing
%     software into your personal \TeX{} folder (indeed, you
%     should \emph{not} do so).\par
% \subsubsection{\emph{MiK\TeX{}} on
%   Windows}
% For users of \emph{MiK\TeX{}} on
%     Windows, there is an additional task after you create your
%     personal \TeX{} folder:\par
% \begin{enumerate}
% \item \label{runsettings}Run the \emph{MiK\TeX{} Settings}
%       program by clicking on the
%       \textsf{\bfseries Start}\menusep\textsf{Programs} 
%       or
%       \textsf{\bfseries Windows}\menusep\textsf{Programs} 
%       button, and then click on
%       \menusep\textsf{MiKTeX~{\itshape x}.{\itshape y}}\menusep\textsf{Maintenance}\menusep\textsf{\itshape Settings};
% \item Click on the {\fboxsep2pt\fbox{\sffamily Roots}} tab;
% \item Click the {\fboxsep2pt\ovalbox{\sffamily Add}} button;
% \item Navigate to your new {\ttfamily{}texmf}
%       folder;
% \item Click {\fboxsep2pt\ovalbox{\sffamily OK}}.
% \end{enumerate}
% On subsequent occasions (when you install
%   software or updates manually) you must update the FileName
%   DataBase (FNDB):\par
% \subsubsection*{Updating the FileName DataBase}
% \label{update-fndb}
% \begin{enumerate}
% \item Run the \emph{MiK\TeX{} Settings}
%       program as before;
% \item \label{refresh-fndb}In the {\fboxsep2pt\fbox{\sffamily Main}} tab, click the
%       {\fboxsep2pt\ovalbox{\sffamily Refresh FNDB}} button.
% \end{enumerate}
% You {\small MUST} do this after
%   installing or updating software in your personal \TeX{} folder,
%   otherwise MiK\TeX{} won't find anything.\par
% \subsection{Installation on a shared (multiuser) computer}\label{shared}
% If you need to install the files on a shared (multiuser)
%   system, you need to be root (Administrator). If you are not,
%   ask your local systems administrator to do it for you.\par
% \begin{enumerate}
% \item \label{loc}Identify where the local shared \TeX{} directory is.
%       This is conventionally something like
%       {\ttfamily{}/usr/local/share/texmf/} or
%       {\ttfamily{}/usr/local/texlive/2012/../texmf-local} 
%       but you can find out by typing the command:\par
% \verb|kpsewhich -expand-var '$TEXMFLOCAL'|;
% \item Unzip the {\ttfamily{}uccthesis-n.nn.tds.zip}
%       and the {\ttfamily{}ucccrest.zip} files 
%       into this folder;
% \item Run the \TeX{} index program
%       \emph{texhash} (some systems call
%       this \emph{mktexlsr}) to update the
%       fast-find ({\ttfamily{}ls-R}) database. Until
%       you do this, your \LaTeX{} users will not be able
%       to find the files.
% \end{enumerate}
% These instructions are for Unix-based systems, including
%   GNU/Linux and Apple Macintosh OS\thinspace{}X. If someone would
%   like to provide me the equivalents for shared Windows
%   systems I would be pleased to include them.\par
% \subsection{Manual installation}
% This is only for older or
%   non-{\small TDS}-conformant systems. Do not use
%   this method on modern systems.\par
% \begin{enumerate}
% \item Download and unzip the {\ttfamily{}uccthesis-n.nn.tds.zip} file into a
%       temporary directory (eg {\ttfamily{}/tmp}),
%       \emph{without} preserving all the paths:
%       use the \textbf{\texttt{-j}} option to
%       \emph{unzip} to do this\par
% \item Run \emph{pdflatex} on
%       {\ttfamily{}uccthesis.ins}. This will re-extract
%       the {\ttfamily{}uccthesis.cls} file (so the
%       program will ask you if you want to overwrite it: answer
%       yes by typing \texttt{y} and pressing the Return or
%       Enter key)\par
% \item Move or copy the files into a location where your
%       installation of \TeX{} will find them. This varies from
%       distribution to distribution: it is sometimes known as
%       `the {\ttfamily{}TEXINPUTS}
% directory', but it is \emph{your
% responsibility} to know where this
%       is.\par
% \item Repeat the procedure for the
%     {\ttfamily{}ucccrest.zip} file.\par
% \item Run the \TeX{} index program
%       \emph{texhash} (some systems call
%       this \emph{mktexlsr}) to update the
%       fast-find ({\ttfamily{}ls-R}) database. Until
%       you do this, your \LaTeX{} users will not be able to find
%       the files.\par
% \end{enumerate}
% \subsection{Testing the installation}
% The file {\ttfamily{}thesis-example.tex}
%   (one-sided) is provided as an example to test the document
%   class with.\par
% Move this file into your {\ttfamily{}Documents}
%   folder (or somewhere else you keep documents) and open it
%   with your \LaTeX{} editor and click
%   {\fboxsep2pt\ovalbox{\sffamily Typeset}} or
%   {\fboxsep2pt\ovalbox{\sffamily pdf\LaTeX{}}} to typeset it. This should
%   create a file {\ttfamily{}thesis-example.pdf} that
%   you can open in your {\small PDF} reader or
%   viewer.\par
% MiK\TeX{} users please note you
%   {\small CANNOT} do this in your
%   personal \TeX{} folder or any of its subfolders, as MiK\TeX{}
%   will not run \LaTeX{} in those folders. You must move the
%   document to somewhere else to process it.\par
% \clearpage
% \section[Author's Guide]{Author's Guide~--- How to set up your thesis}\label{setup}
% The first line of your thesis document
% {\small MUST} say\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={options}]
\documentclass[options]{uccthesis}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% where {\itshape options} is a list of
% options separated by commas. Two options are compulsory (see
% \vref{setdeg}):\par
% \begin{enumerate}
% \item one option for specifying your discipline or
%     affiliation, taken from the tables in \vref{affoptions};
% \item one option for specifying your class of degree, taken
%     from the tables in \vref{degreeoptions}.
% \end{enumerate}
% In addition, you can also use any of the other options
% explained in \vref{moreopts} that you
% find relevant.\par
% Apart from the title page (see \vref{titlepage}) and a few additional structures (see
% \vref{struct}), the remainder of your document
% {\small SHOULD} use standard \LaTeX{}
% commands, environments, and packages which you can find
% explained in \emph{Formatting Information} \cite{fi} or any book or web site
% on how to use \LaTeX{}.\par
% \subsection{Selecting your discipline and class of degree}\label{setdeg}
% \begin{enumerate}
% \item You {\small MUST} select one
%       of the options for your College, Faculty, School,
%       Department, or discipline from the first column in the
%       lists in
%       \vrefrange{sefsopts}{instopts}.
% \item You {\small MUST} select one
%       of the options for the class of degree for which you are
%       submitting from the first column in the lists in
%       \vrefrange{acsssdegs}{sefsdegs}.
% \end{enumerate}
% These options automatically use the official names of
%   the disciplines and degrees granted by UCC: you cannot make
%   up your own. The two options are mutually exclusive within
%   their respective lists: you can only use one of each.
%   Consult your supervisor if you are unsure. \par
% The disciplines and degrees change from time to time,
%   and are updated in this class when they become known. Older
%   names and codes are kept (but undocumented) so that your
%   thesis will remain processable as long as \LaTeX{} is
%   around (nearly 30 years so far, and going strong).\par
% \subsection{Setting up your title page}\label{titlepage}
% The title page of your thesis follows the rules set down
%   by the Registrar's Office and the Graduate Studies Office.
%   This package does the formatting automatically if you
%   provide the right information.\par
% You will have already given your class of degree and
%   your discipline or affiliation in the
%   {\ttfamily{}\textbackslash{}documentclass} options described in \vref{setdeg}.\par
% You {\small MUST} provide the
%   following (see \vref{basic} for an
%   example):\par
% \label{l1}
% \begin{enumerate}[noitemsep]
% \item Your thesis title;
% \item Your full name;
% \item The date of submission;
% \item The name[s] of your Supervisor[s];
% \item The name of your Professor or Head of Department, School,
%       or Discipline.
% \end{enumerate}
% These are done with standard \LaTeX{}
%   {\ttfamily{}\textbackslash{}title}, {\ttfamily{}\textbackslash{}author}, and
%   {\ttfamily{}\textbackslash{}date} commands, plus two additional
%   commands which are compulsory: {\ttfamily{}\textbackslash{}supervisor}
%   and {\ttfamily{}\textbackslash{}professor}.\par
% The {\ttfamily{}\textbackslash{}title} command has an optional
%   argument where you can supply a short title for use in
%   running headers and footers, eg\footnote{%
% \url{http://nar.oxfordjournals.org/content/15/1/51.abstract}}\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={\subtitle}]
\title[Nucleotide sequence of mitochondrial maxicircle DNA]
      {The nucleotide sequence of a 3.2 kb segment of mitochondrial
      maxicircle DNA from \textit{Crithidia fasciculata} containing
      the gene for cytochrome oxidase subunit III, the N-terminal 
      part of the apocytochrome $b$ gene and a possible frameshift
      gene}
\subtitle{Further evidence for the use of unusual initiator triplets
	  in trypanosome mitochondria}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% You {\small MAY} also 
%   provide any of the following:\par
% \begin{enumerate}[resume,noitemsep]
% \item Your existing postgraduate or professional
%       qualifications, if relevant and permitted (see \vref{quals});
% \item A subtitle for your thesis (see \vref{subtitle});
% \item The volume number and total number of
%       volumes\footnote{%
% This is compulsory if there is more than one
%   volume to your thesis.} (see \vref{volumes});
% \item Your Institute, Research Centre, Unit, or Hospital,
%       if appropriate (see \vref{subaffil});
% \item The name of your sponsor or funding organisation or
%       person, if relevant (see \vref{sponsor}).
% \end{enumerate}
% The title block commands
%   {\small MAY} occur in any order, but
%   they {\small MUST} be terminated in
%   the normal way with the {\ttfamily{}\textbackslash{}maketitle} command. See the example
%   in \vref{basic} and the output in
%   \vref{basic-output}.\par
% \begin{figure}\small\sffamily\centering
% \caption{Example title block of a \LaTeX{} UCC thesis
%     document}\label{basic}\medskip
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},frame=single,framesep=1em,emph={\professor,\supervisors,\subtitle,\qualifications,\sponsor,german,phd},xrightmargin=1em,xleftmargin=1em]
\documentclass[german,phd]{uccthesis} 
\begin{document}
\title{Goethe's political involvement in Italy}
\subtitle{Sturm und Drang in Malcesine} 
\author{Wilhelm Werther} 
\qualifications{bb} 
\date{May 2011}
\professor{Prof NE One}
\supervisors{Dr AN Dere\\Mr AN Other} 
\sponsor{The Goethe Institut, Dublin} 
\maketitle
... 
\end{document}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% See the output in \vref{basic-output}.\par
% \end{figure}
% \begin{figure}\small\sffamily\centering
% \caption{Result of the title block in \vref{basic}}\label{basic-output}\medskip
% \centering
% \fbox{%
% \includegraphics[width=0.9\columnwidth]{thesis-example-p1}}
% \end{figure}
% \subsubsection{Professor and Supervisor}\label{profsup}
% Give the name of your Professor (or Head of College,
%     School, Department, or Discipline) with the command
%     {\ttfamily{}\textbackslash{}professor}. Give the name of your
%     Supervisor with the command {\ttfamily{}\textbackslash{}supervisor}
%     (but see the note below). These commands are
%     compulsory.\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={\professor,\supervisor,\supervisors}]
\professor{Dr F Händel}
\supervisor{Dr PDQ Bach}
\supervisors{Dr WA Mozart\\Mr L van Beethoven}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% If you have more than one Supervisor, use the command
%     {\ttfamily{}\textbackslash{}supervisors} (plural) instead, and
%     separate their names with a double backslash
%     (\verb|\\|).\par
% \subsubsection{Qualifications}\label{quals}
% If you have prior postgraduate qualifications or
%     membership of relevant professional bodies, you can
%     specify them with the {\ttfamily{}\textbackslash{}qualifications}
%     command.\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={\qualifications}]
\qualifications{msc mieee}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% \emph{Always use lowercase for
%       qualifications}, as they will be typeset in
%     small capitals (which are the lowercase equivalent of
%     all-capitals). A space is better than a comma for
%     separating qualifications, as in the example above.\par
% \subsubsection{Subtitle}\label{subtitle}
% If your thesis has a subtitle, use the
%     {\ttfamily{}\textbackslash{}subtitle} command: you
%     {\small MUST NOT} embed the subtitle
%     in the {\ttfamily{}\textbackslash{}title} with a
%     colon.\par
% \subsubsection{Multi-volume theses}\label{volumes}
% If your thesis runs to two or more volumes, you
%     {\small MUST} specify this with the
%     {\ttfamily{}\textbackslash{}volume}
%     command. This has a special format:\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX}]
\volume n of m
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% where {\itshape n} and
%   {\itshape m} are the number of the volume
%     and the total number of volumes respectively, for example
%     \verb|\volume 3 of 5|\par
% \subsubsection{Subsidiary affiliations}\label{subaffil}
% In addition to the College, Faculty, School, or
%     Department in which you conducted your research, you
%     {\small MAY} also specify your
%     Institute, Research Centre (Group), Unit, or Hospital
%     with the commands {\ttfamily{}\textbackslash{}institute},
%     {\ttfamily{}\textbackslash{}centre}, {\ttfamily{}\textbackslash{}unit}, and
%     {\ttfamily{}\textbackslash{}hospital}.\par
% These four commands automatically add the suffix
%     `Institute',
%     `Centre',
%     `Unit', or
%     `Hospital' respectively, so you
%     {\small MUST} not include it in the
%     curly braces. For example:\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX}]
\institute{Tyndall National}
\centre{Macrobiotic Research}
\unit{Linguistic Synthesis}
\hospital{Mercy University}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% In some special circumstances this can be
%   circumvented, where the syntax of the name requires
%     it. Details are in \vref{modaffil}\par
% \subsubsection{Sponsorship}\label{sponsor}
% Where your research has been sponsored by an external
%     organisation, you {\small MAY} be
%     required under the terms of your contract to add
%     their name.  Use the {\ttfamily{}\textbackslash{}sponsor} command to
%     do this, for example:\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={\sponsor}]
\sponsor{Silmaril Consultants}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% \subsubsection{Modifying the format of affiliations}\label{modaffil}
% Need may occasionally arise for the inclusion of
%     variant forms of names of the affiliations
%     {\ttfamily{}\textbackslash{}institute}, {\ttfamily{}\textbackslash{}hospital},
%     {\ttfamily{}\textbackslash{}centre}, and {\ttfamily{}\textbackslash{}unit}.
%     These commands therefore all have an optional argument
%     which can be used for three purposes:\par
% \begin{description}[style=unboxed]
% \item[Specifying a full name\thinspace:]Supplying the square brackets but
%   \emph{without} a value (ie the
%   optional argument is present but null), will
%   suppress the automatic prefix or suffix that is
%   otherwise added to the name, letting you specify a
%   name that does not fit the conventional pattern, for
%   example:
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={\institute,\centre,\unit}]
\institute[]{Institute for Advanced Studies} 
\centre[]{Centre of Excellence in Executive Education} 
\unit[]{Isolation Unit for Nervous Diseases}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% \item[Specifying an acronym\thinspace:]Where an Institute, Hospital, Centre, or Unit
%   (\emph{only}) is normally known by an
%   acronym, this can be given in the optional argument,
%   and the name given in full in the main argument (no
%   prefix or suffix will be added); for example:\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={\institute,\hospital,\centre,\unit}]
\institute[IMI]{Irish Management Institute} 
\hospital[CUH]{Cork University Hospital} 
\centre[APC]{Alimentary Pharmabiotic Centre}
\unit[HFRG]{Human Factors Research Group}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% This method will print the full name followed by
%   the acronym in parentheses. Note that this only
%   works with the {\ttfamily{}\textbackslash{}institute},
%   {\ttfamily{}\textbackslash{}hospital},
%   {\ttfamily{}\textbackslash{}centre}, and
%   {\ttfamily{}\textbackslash{}unit} commands.
% \item[Specifying an alternative prefix\thinspace:]Where a School or Department name requires a
%   different prefix from `School of' or
%   `Department of', this can be given in
%   the optional argument, for example:\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={\school,\department}]
\school[Summer School in]{Irish Studies} 
\department[Roinn an]{Ontolaoiachta}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% This method will print the full name preceded by
%   the new prefix, and is useful for the Irish forms of
%   names pending the integration of an Irish-language
%   option for titling. Note that this only works with
%   the {\ttfamily{}\textbackslash{}school} and
%   {\ttfamily{}\textbackslash{}department} commands.
% \end{description}
% \begin{table}[t]\small\sffamily
% \caption{Summary of title block commands}\label{tpcommands}\medskip
% \begingroup
% \centering
% \begin{tabular}{@{}%
% 	>{\ttfamily\textbackslash\prestrut\arraybackslash}l<{\char'173\dots\char'175\poststrut\arraybackslash}%
% 	l<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}>{\ttfamily\textbackslash\prestrut\arraybackslash}l<{\char'173\dots\char'175\poststrut\arraybackslash}}{\sffamily\bfseries command}&\multicolumn{1}{l<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Usage}\\[2pt]\hline
% 
% \multicolumn{2}{@{}c<{\poststrut\arraybackslash}@{}}{\vstrut\bfseries Compulsory}\\[2pt]\hline\vstrut
% title&Title of your thesis\\
% author&Your name\\
% date&Date of submission\\
% professor&Name of your Professor or Head of
%     Department\\
% supervisor&\llap{\rdelim\}2{12pt}}%
% 	\multirow{2}{8cm}{Supervisor's name[s]. With the plural
%     form, separate the names with {\texttt{\textbackslash}}{\texttt{\textbackslash}}}\\
% supervisors&\\
% \multicolumn{1}{@{}>{\ttfamily\textbackslash\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\ttfamily\textbackslash{}maketitle}&Finishes the title block: must come
%     last\\
% [2pt]\hline
% \multicolumn{2}{@{}c<{\poststrut\arraybackslash}@{}}{\vstrut\bfseries Optional}\\[2pt]\hline\vstrut
% subtitle&Subtitle\\
% qualifications&Your existing qualifications\\
% institute[...]&\llap{\rdelim\}4{12pt}}%
% 	\multirow{4}{8cm}{Your institute, hospital, centre, or
%     unit, if relevant (\vref{subaffil}
%     for details)}\\
% hospital[...]&\\
% centre[...]&\\
% unit[...]&\\
% \multicolumn{1}{@{}>{\ttfamily\textbackslash\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\ttfamily\textbackslash{}vol $n$ of
%     $m$}&For multi-volume theses\\
% sponsor&Sponsor or funding agency name, if
%     relevant\\
% [2pt]\hline
% \multicolumn{2}{@{}c<{\poststrut\arraybackslash}@{}}{\vstrut\bfseries Pre-specified}\\[2pt]\hline\vstrut
% school&\llap{\rdelim\}3{12pt}}%
% 	\multirow{3}{8.5cm}{Not normally used: these are automatically
%     specified by using the relevant class options (see
%     \vref{setdeg})}\\
% department&\\
% degree&\\[2pt]\hline
% \end{tabular}
% \par\endgroup
% \end{table}
% \subsubsection{Specifying your degree manually}\label{manualspec}
% In very rare circumstances you may need to specify
%     your degree manually. Details are in the commented code in
%     \vref{implementation}, and the usage may be
%     examined in the {\ttfamily{}.dtx} and
%     {\ttfamily{}.cls} files.\par
% \subsection{Additional class options}\label{moreopts}
% There are some additional options that can be specified
%   in the {\ttfamily{}\textbackslash{}documentclass}
%   command at the start of the document. These are all
%   optional: use them if you need them.\par
% \begin{description}[style=unboxed]
% \item[{\ttfamily{}cjk}\thinspace:]As indicated in a footnote to \vref{acsssopts}, this option loads the
% \textsf{CJK} package for typesetting
% Chinese, Japanese, and Korean. You
% {\small MUST} ensure that you
% have suitable fonts installed (eg
% \textsf{wadalab} for Japanese: consult with
% the local users group for the relevant language or
% culture~--- there is a list of these at
% \url{http://www.tug.org/lugs}). The
% \texttt{CJK} environment can then be used for
% blocks of text, and the {\ttfamily{}\textbackslash{}cjktext}
% command can be used for words and short
% phrases.\par
% The \textsf{babel} package enables
% culture-specific typesetting options, including
% hyphenation, and {\small SHOULD}
% be used in any document where another language is used
% for more than the odd word or phrase. Read the package
% documentation for more information.\par
% Because it is not possible to know which of the
% many language[s] provided you need to use, you
% {\small MUST} add them as
% options to the \textsf{babel} package
% yourself, in your Preamble, with the
% main language of the document as the last option,
% eg
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emphstyle=\bfseries,emph={cjk,babel}]
\documentclass[msc,zeps,cjk]{uccthesis}
\usepackage[japanese,english]{babel}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% \item[{\ttfamily{}draft}\thinspace:]\label{draft}Draft mode is the default: this allows a draft to
% be printed with a frame replacing the images, saving
% toner or ink, and speeding up the printout.  It also
% highlights hyphenation and justification problems like
% overlong lines and unbreakable words with a black
% rectangle in the right
% margin.\hfill\rlap{\rule{5pt}{1ex}}\par
% In draft mode, the running head shows the current
% section on the left and the current subsection on the
% right. The running foot shows the name of the file on
% the left and the date and time on the right.
% \item[{\ttfamily{}final}\thinspace:]\label{final}Final mode prints all images and removes the black
% rectangles (it doesn't solve the hyphenation and
% justification problems: you have to fix those
% yourself).\par
% In final mode, the running head is the same as in
% draft mode, but the running foot shows the title of
% the thesis on the left and the author's name on the
% right.
% \item[{\ttfamily{}gaeilge}\thinspace:]This option does for Irish what the \textbf{\texttt{cjk}} option does for CJK languages: it
% loads the Irish-language options for a thesis written
% in Irish, and adds the \textsf{eiad} package
% for typesetting with a {\fontencoding{OT1}\fontfamily{eiad}\selectfont{}sean-chló} 
% typeface (you will still need to install the
% \textsf{eiad} font package yourself, if it
% is not already on your computer).  Unlike \textbf{\texttt{cjk}}, however, the \textbf{\texttt{gaeilge}} option \emph{does}
% preload the \textsf{babel} package, with
% \textbf{\texttt{[english,irish]}} as the
% options.
% \item[{\ttfamily{}nolot}\thinspace:]\label{noloft}Disables the automatic List of Tables.
% \item[{\ttfamily{}nolof}\thinspace:]Disables the automatic List of Figures.
% \item[{\ttfamily{}justified}\thinspace:]Text in this document class is set
% \emph{unjustified} (ragged right margin)
% by default. This option turns justification back on.
% See \vref{just}. This option does
% \emph{not} restore indentation and
% remove paragraph-spacing: use the \textbf{\texttt{indented}} option for
% that.
% \item[{\ttfamily{}indented}\thinspace:]Text in this document class is set
% \emph{unindented} by default. This
% option turns indentation back on. See \vref{just}. This option does
% \emph{not} restore justification: use
% the \textbf{\texttt{justified}} option
% for that.
% \item[{\ttfamily{}termpaper}\thinspace:]This is an experimental option for typesetting
% term papers. Feedback on useful features would be
% welcomed.
% \item[{\ttfamily{}essay}\thinspace:]This is an experimental option for typesetting
% undergraduate essays. Feedback on useful features
% would be welcomed.
% \item[{\ttfamily{}wp}\thinspace:]This is an experimental option for making the
% document look as if it was done with a wordprocessor.
% This may be useful for drafts if your supervisor is
% accustomed to seeing theses done with systems such as
% \emph{OpenOffice},
% \emph{Libre Office}, or Microsoft
% \emph{Word}.
% \item[{\ttfamily{}plainheaders}\thinspace:]\label{plainheaders}This disables the automated running headers
% described in \vref{headers} and reverts to
% \LaTeX{}'s defaults.
% \end{description}
% \clearpage
% \section{Document structure}\label{docstruct}
% After the title page, which is created by the
% {\ttfamily{}\textbackslash{}maketitle} command at the end of the title
% block, the UCC rules specify that there must be a Table of
% Contents, followed by the formal statement that this research
% is your own work. Both of these are inserted automatically:
% you do not need to add anything.\par
% If you have used tables or figures, a List of Tables and
% List of Figures will also be printed automatically after the
% Table of Contents. If you have only a very small number of
% tables or figures, you can disable the List of Tables or List
% of Figures independently with the \textbf{\texttt{nolot}} and
% \textbf{\texttt{nolof}} class options (see `\textbf{{\ttfamily{}nolot}}', the \ordinalstringnum{5} item in the list in \vref{noloft}).\par
% \par\begingroup\fboxsep1em\centering
%   \shadowbox{\begin{minipage}{0.8\columnwidth}\sffamily
%  \raggedright\parindent0pt\parskip=.5\baselineskip
% \subsubsection*{\sffamily Addition in 1.11: self-controlled lists or tables of
% ancillary matter}
% For glossaries, lists of symbols or acronyms, and
%   similar terminological lists, you
%   {\small SHOULD} use the relevant
%   packages, and include the {\ttfamily{}\textbackslash{}ListOf...}
%   command (provided by the package) \emph{after}
%   the {\ttfamily{}\textbackslash{}maketitle} and
%   \emph{before} the preliminaries.\par
% If you create these lists by hand, you
%   {\small MUST} include them in the same
%   place using the starred form of the prelimiaries command
%   {\ttfamily{}\textbackslash{}prelim*}. This is necessary to avoid the
%   Declaration being triggered prematurely.\par
% \end{minipage}}\par\endgroup
% \subsection{Preliminaries (front matter)}\label{prelims}
% Before the text begins, there are usually some preliminary
%   sections together referred to as `front matter'
%   or `prelims'. This class provides the
%   following environments and commands for these:\par
% \begin{description}[style=unboxed]
% \item[\texttt{dedication}\thinspace:]The \texttt{dedication}
% environment is for you to add a dedication.
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={dedication}]
\begin{dedication}
...
\end{dedication}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% \item[\texttt{acknowledgements}\thinspace:]The \texttt{acknowledgements}
% environment is for you to add your
% acknowledgements.
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={acknowledgements}]
\begin{acknowledgements}
...
\end{acknowledgements}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% \item[\texttt{abstract}\thinspace:]This is the normal \LaTeX{} \texttt{abstract} environment except
% that the heading starts a new page and is in the same
% format as all the other preliminary sections.\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={abstract}]
\begin{abstract}
...
\end{abstract}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% The UCC thesis rules state that an Abstract must be
% limited to 300 words.
% \item[\texttt{\textbackslash{}prelim}\thinspace:]The {\ttfamily{}\textbackslash{}prelim}\marg{title} command is
% available for starting any other preliminary sections
% you may need, such as explanations of terminology or
% lists of equipment. It works exactly like an
% unnumbered section heading, but it starts a new page,
% and \emph{is} included in the Table of
% Contents (see the example \vref{terms}).\par
% There is a special starred form of this command,
% {\ttfamily{}\textbackslash{}prelim*} which can be used
% before\emph{} any of the above commands
% or environments to create preliminary sections that do
% not trigger the Declaration prematurely. Use with
% caution!
% \end{description}
% \par\begingroup\fboxsep1em\centering
%   \shadowbox{\begin{minipage}{0.8\columnwidth}\sffamily
%  \raggedright\parindent0pt\parskip=.5\baselineskip
% \subsubsection*{\sffamily Declaration}
% The UCC Declaration (that this is your own work) is
%     automatically inserted by the \emph{first
%       use} of any of the following: \par
% \begin{itemize}
% \item a \texttt{dedication} environment;
% \item an \texttt{acknowledgements}
% environment;
% \item a
% {\ttfamily{}\textbackslash{}prelim}~\emph{without} 
% the star;
% \item a {\ttfamily{}\textbackslash{}part};
% \item a {\ttfamily{}\textbackslash{}chapter}.
% \end{itemize}
% The {\ttfamily{}\textbackslash{}prelim*} command can be used to
%     add material \emph{before} these without
%     triggering the Declaration.\par
% \end{minipage}}\par\endgroup
% \subsection{Text body (main matter)}
% For the body of your text, a thesis is usually divided
%   into chapters, containing sections and subsections (and
%   perhaps subsubsections). For a very long thesis you may use
%   the standard \LaTeX{} {\ttfamily{}\textbackslash{}part} command to divide
%   the chapters into parts.\par
% Some changes, listed below, have been made to the
%   default appearance to improve readability and
%   consistency.\par
% \subsubsection{Size, spacing, justification, indentation, and paragraph
%     spacing}\label{just}
% The default typesetting in this class is\par
% \begin{itemize}[noitemsep]
% \item 12pt type;
% \item 1½ line spacing;
% \item unjustified (ragged-right margin);
% \item no indentation;
% \item white-space between paragraphs.
% \end{itemize}
% This makes it easier for your supervisor and Extern to
%     read, and avoids most problems with hyphenation and
%     justification, which are more frequent in technical and
%     academic work because of the high incidence of specialist
%     terms.\par
% Unless you are very skilled at typographic production,
%     it is probably better not to try to typeset a thesis as if
%     it were a book for publication.\par
% However, there are two class options available if you
%     want to return to the book-style with indented paragraphs and
%     no space between them:\par
% \begin{description}[style=unboxed]
% \item[\textbf{\texttt{justified}}\thinspace:]this option sets the text justified. It does not
% affect the indentation or the space between paragraphs.
% \item[\textbf{\texttt{indented}}\thinspace:]this option indents paragraphs
% \emph{and} removes the space between
% paragraphs. It does not affect justification.
% \end{description}
% \par\begingroup\fboxsep1em\centering
%   \fbox{\begin{minipage}{0.8\columnwidth}\sffamily
%  \raggedright\parindent0pt\parskip=.5\baselineskip
% Be aware that justified text in the rather long
%     lines used in theses makes your work harder to read.\par
% \end{minipage}}\par\endgroup
% \subsubsection{Running headers and footers}\label{headers}
% Running headers and footers are printed on all pages
%     except chapter openings. This is so that photocopies or
%     page-extracts of your thesis will show what it is
%     and who wrote it; otherwise the eventual reader of a
%     fragment would not know whose work it was. Details of what
%     appears in draft and final mode are in `\textbf{{\ttfamily{}draft}}', the \ordinalstringnum{2} item in the list in \vref{draft}.\par
% If you want the original (\LaTeX{}) default of page
%     number at the bottom, you can use the
%     \textbf{\texttt{plainheaders}} class option, and you can
%     then use \LaTeX{}'s own headings commands.\par
% \subsubsection{Page numbering}
% The title page is not numbered (internally it is
%     numbered zero).\par
% All the preliminary pages from the Table of Contents
%     up to (but not including) the first page of the first Part
%     or Chapter are numbered in lowercase Roman
%     numerals.\par
% All remaining pages are numbered in Arabic numerals,
%     starting at~1 for the first page of the first Part or
%     Chapter.\par
% You should use the standard \LaTeX{}
%     {\ttfamily{}\textbackslash{}label} and {\ttfamily{}\textbackslash{}pageref}
%     commands for making cross-references to pages. For more
%     complex cross-referencing, use the
%     \textsf{varioref} package.\par
% \subsubsection{Typefaces and fonts}
% The default typeface is Computer Modern (based on
%     Monotype Series~8), using the updated version from
%     the \textsf{lmodern} package. The default
%     boldface font has been changed to normal bold from bold
%     extended, but you can still use the {\ttfamily{}\textbackslash{}textbf} and {\ttfamily{}\textbackslash{}bfseries} commands
%     normally.\par
% The default type size is 12pt, but the
%     \textbf{\texttt{11pt}} option can be used if you need
%     smaller type and less space. The 10pt option is not
%     recommended, as it makes the lines harder to read.\par
% You {\small MAY} use additional
%     font or typeface packages, but you {\small MUST NOT} use display (decorative) fonts for
%     the text of a thesis.\par
% \subsubsection{Structure}\label{struct}
% The basic structure is handled by the standard \LaTeX{}
%     commands {\ttfamily{}\textbackslash{}part}, {\ttfamily{}\textbackslash{}chapter}, {\ttfamily{}\textbackslash{}section}, {\ttfamily{}\textbackslash{}subsection}, and {\ttfamily{}\textbackslash{}subsubsection}.\par
% \LaTeX{} also provides the commands {\ttfamily{}\textbackslash{}paragraph} and {\ttfamily{}\textbackslash{}subparagraph} for numbered,
%     headed paragraphs and subparagraphs, but you should avoid
%     them if possible because they make it harder for your
%     readers (your Professor and your External
%     Examiner).\par
% Within the sectional divisions, separate your
%     paragraphs by a blank line in the normal way. All the
%     standard \LaTeX{} environments can be used for tables and
%     figures, lists, quotations, equations, theorems,
%     etc.\par
% A few small changes have been made to the formatting
%     and features of the following environments:\par
% \begin{description}[style=unboxed]
% \item[\texttt{epigraph}\thinspace:]\label{epigraph}The \texttt{epigraph}\marg{citekey} environment
%   is a specialised format of short quotation that
%   comes immediately after a chapter or section title.
%   It typesets the contents centred and italicised,
%   with the source cited underneath, right-aligned. The
%   one (compulsory) argument
%   {\small SHOULD} contain a
%   \BibTeX{} citation key for the source of the
%   quotation.\par
% (This is the same principle as for the \texttt{quotation} environment
%   described in `\textbf{\texttt{quotation}}', the \ordinalstringnum{2} item in the list in \vref{quotation}, except
%   that this argument in \texttt{epigraph}is compulsory, so
%   it goes in curly braces.)\par
% However, if you want an indirect citation to
%   your epigraph, as at the start of this section, you
%   {\small MAY} put it in an
%   optional argument in square brackets, and leave the
%   normal argument empty: \verb|\begin{epigraph}[GBS, writing in 1940]{}|
% \item[\texttt{quotation}\thinspace:]\label{quotation}There is a new, optional, argument to the \texttt{quotation}\oarg{citekey} environment which
%   is for the \BibTeX{} citation key of the source, eg
%   \verb|\begin{quotation}[shaw]|.\par
% When used, the quotation is followed by a
%   right-aligned short-form citation. The quotation is
%   set in the {\ttfamily{}\textbackslash{}small}
%   type size and the first line is
%   \emph{not} indented.\par
% The argument is optional because quotations may
%   also be cited indirectly in the preceding or
%   following text, and may therefore not always need
%   direct citation.\par
% If you need to give a page number or other
%   qualifier to such a reference (as the page range in
%   the example above), which would usually go in square
%   brackets before a normal {\ttfamily{}\textbackslash{}cite} command, you
%   {\small MUST} embed the whole
%   thing in curly braces inside the optional argument,
%   otherwise \LaTeX{} will not be able to distinguish
%   the square brackets of the citation modifier from
%   those which surround the argument. For example:
%   \verb|\begin{quotation}[{[pp.80--81]{shaw}}]|
% \item[\texttt{table} and
% \texttt{figure}\thinspace:]The standard parameters in \LaTeX{} for the
%   proportions of a page which can be occupied by
%   tables and figures are too small for theses, which
%   typically have many floats. In this class, they have
%   been increased to the value suggested in the \TeX{}
%   FAQ at
%   \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats}; 
%   and additionally, the overall proportion of the page
%   that can be occupied by floats has been increased
%   from 66\% to 75\%. See the detailed code
%   description at \vref{floating} for the
%   exact values used.
% \end{description}
% \subsection{Back matter}
% The final sections are your Appendices, References, and
%   possibly an Index or Glossary.\par
% \subsubsection{Appendices}
% Appendices are done in the standard way, using the
%     {\ttfamily{}\textbackslash{}appendix} command to
%     signal the change from chapters to appendices, and
%     continuing to use the {\ttfamily{}\textbackslash{}chapter} command to create the
%     appendix headings.\par
% \subsubsection{References (Bibliography)}
% Until the new \textsf{biblatex} package is
%     fully implemented, you should continue to use \BibTeX{} for
%     your references and citations. The correct package[s] and
%     styles for citation in your discipline are pre-loaded on
%     the basis of the package option for your College, Faculty,
%     School, or Department that you selected in the {\ttfamily{}\textbackslash{}documentclass} line. The format
%     which is pre-loaded is listed in the final column of \vrefrange{sefsopts}{instopts}. You should read
%     the documentation on the reference style package used,
%     because many of them provide useful and time-saving
%     commands for citing your references correctly.\par
% To get your References section printed, you
%     {\small MUST} give the {\ttfamily{}\textbackslash{}bibliography}\marg{bibdbname} command
%     at the place where you want the references printed
%     (usually near the end of your thesis). The argument is the
%     name of your \BibTeX{} database file,
%     \emph{without} the {\ttfamily{}.bib}
%     on the end, eg\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX},emph={\bibliography}]
\bibliography{myrefs}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% \par\begingroup\fboxsep1em\centering
%   \shadowbox{\begin{minipage}{0.8\columnwidth}\sffamily
%  \raggedright\parindent0pt\parskip=.5\baselineskip
% \subsubsection*{\sffamily Citation and Reference formats}
% In the current version, not all Schools and
%       Departments have provided information on their preferred
%       format. These have been set to a default by guesswork,
%       usually the Kluwer variant of Harvard.\par
% If you have concrete information about the preferred
%       format for your discipline, please let me know.\par
% \par\raggedleft Peter Flynn\index{!}\\\url{pflynn@ucc.ie}\par
% \end{minipage}}\par\endgroup
% The pre-loaded formats were specified by staff in your
%     College, Faculty, School, or Department, and are presumed
%     to be correct. If you have been asked to use a different
%     format (for example, by your Extern, or because you are
%     doing multidisciplinary research), you should add the
%     special command {\ttfamily{}\textbackslash{}resetbibstyle}\marg{stylename} to your
%     Preamble, followed by the name of the alternate \BibTeX{}
%     style name \emph{without} the
%     {\ttfamily{}.bst} on the end.\footnote{%
% One reason for varying the style is that the
% popular American Psychological Association
% (\textsf{apacite}) style affixes an author's
% initials to citations where there is more than one
% author by the same name; and some Externs may require
% this to be elided. There is a web page describing the
% problem, and providing a solution at
% \url{http://tex.stackexchange.com/questions/18954/apacite-suppress-initials-intext}, 
% but it involves hand-editing a \BibTeX{} style file. To
% avoid this, a copy of the suggested file
% {\ttfamily{}bpacite.bst} is available for
% download at \url{http://epu.ucc.ie/latex/} (put
% it your Personal \TeX{} directory at
% \url{~/texmf/bibtex/bst/}) and then use
% the command
% \url{\resetbibstyle{bpacite}} in
% your Preamble.} If your replacement \BibTeX{} style file also
%     requires an accompanying \LaTeX{} style, you must provide
%     this in an optional first argument. For example, to use
%     {\small MLA} formatting, you would use:\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX}]
\resetbibstyle[mla]{mla}
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% because the {\small MLA} \BibTeX{} style
%     ({\ttfamily{}mla.bst}) requires their companion
%     \LaTeX{} package ({\ttfamily{}mla.sty}).\footnote{%
% If you \emph{do} use the
% {\small MLA} style this way, you may also
% need to add the command
% \url{\PassOptionsToPackage{pdftex}{graphicx}} 
% at the top of your {\ttfamily{}.tex} file,
% \emph{above} (yes, really above) the
% first line ({\ttfamily{}\textbackslash{}documentclass...}). This
% prevents the {\small MLA} style prejudging
% the options for the \textsf{graphicx}
% package.}\par
% \subsubsection{Indexes and Glossaries}
% If you need to produce an Index or Glossary, you can
%     use the normal \LaTeX{} commands and procedures.\par
% For Glossaries, note that you
%     {\small MUST} use the
%     \textsf{glossaries} package (the old
%     \textsf{glossary} package has been
%     superseded).\par
% \clearpage
% \section{Options for college, department, and school affiliation}\label{affoptions}
% \begin{table}[ht]\small\sffamily
% \caption{Class options for the College of Science, Engineering
%     and Food Science}\label{sefsopts}\medskip
% \begingroup\fontsize{10}{11}\selectfont
% \centering
% \begin{tabular}{@{}%
% 	>{\ttfamily\vstrut\prestrut\arraybackslash}l<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}p{9cm}<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}p{2.3cm}<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}>{\ttfamily\vstrut\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\sffamily\bfseries Option}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}p{9cm}<{\poststrut\arraybackslash}}{\sffamily\bfseries School / Department / Institute}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}p{2.3cm}<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Reference Format}\\[2pt]\hline
% 
% appmaths&%
%	Department of Applied Mathematics&%
%	Default\\\hline[.1pt]%
% bees&%
%	School of Biological,
% Earth and Environmental Sciences&%
%	Oxford\\\hline[.1pt]%
% chem&%
%	Faculty of
% Science; %	Department of Chemistry&%
%	ACS\\\hline[.1pt]%
% chemeng&%
%	Department of Process and Chemical Engineering&%
%	Harvard\\\hline[.1pt]%
% civil&%
%	School of Engineering; %	Department of Civil
% and Environmental Engineering&%
%	Harvard\\\hline[.1pt]%
% cs&%
%	Faculty of
% Science; %	Department of Computer Science&%
%	Default\\\hline[.1pt]%
% elec&%
%	School of Engineering; %	Department of Electrical and Electronic Engineering&%
%	Harvard\\\hline[.1pt]%
% engineering&%
%	School of Engineering&%
%	Harvard\\\hline[.1pt]%
% food&%
%	School of Food and
% Nutritional Sciences&%
%	Default\\\hline[.1pt]%
% foodbus&%
%	School of Food and
% Nutritional Sciences; %	Department of Food
% Business and Development&%
%	Harvard\\\hline[.1pt]%
% geol&%
%	Faculty of
% Science; %	Department of Geology&%
%	Default\\\hline[.1pt]%
% maths&%
%	School of Mathematical
% Sciences; %	Department of Mathematics&%
%	Default\\\hline[.1pt]%
% microbio&%
%	Department of Microbiology&%
%	Default\\\hline[.1pt]%
% microelec&%
%	School of Engineering; %	Department of Microelectronic Engineering&%
%	Harvard\\\hline[.1pt]%
% physics&%
%	Faculty of Science; %	Department of Physics&%
%	Transactions of the IEEE\\\hline[.1pt]%
% physio&%
%	Department of Physiology&%
%	Vancouver\\\hline[.1pt]%
% scifac&%
%	Faculty of
% Science&%
%	Default\\\hline[.1pt]%
% stats&%
%	Department of Statistics&%
%	Harvard\\\hline[.1pt]%
% zeps&%
%	School of Zoology,
% Ecology and Plant Science&%
%	Oxford\\\hline[.1pt]%
% \end{tabular}
% \par\endgroup
% \end{table}
% \begin{table}[p]\small\sffamily
% \caption{Class options for the College of Arts, Celtic Studies
%     and Social Sciences}\label{acsssopts}\medskip
% \begingroup\fontsize{10}{11}\selectfont
% \centering
% \begin{tabular}{@{}%
% 	>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}p{9cm}<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}b{2cm}<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\sffamily\bfseries Option}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}p{9cm}<{\poststrut\arraybackslash}}{\sffamily\bfseries School / Department / Institute}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}b{2cm}<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Reference Format}\\[2pt]\hline
% 
% apsoc&%
%	School of Applied
% Social Studies&%
%	Harvard\\\hline[.1pt]%
% apsych&%
%	School of Applied
% Psychology&%
%	APA\\\hline[.1pt]%
% arch&%
%	Department of Archaeology&%
%	Harvard\\\hline[.1pt]%
% arthist&%
%	School of History; %	Department of History of Art&%
%	Oxford\\\hline[.1pt]%
% \fnote{}asian&%
%	School of Asian
% Studies&%
%	Harvard\\\hline[.1pt]%
% bealoideas&%
%	Béaloideas~/
% Folklore&%
%	Harvard\\\hline[.1pt]%
% classics&%
%	Department of Classics&%
%	Oxford\\\hline[.1pt]%
% dah&%
%	School of Digital Arts and Humanities&%
%	Harvard\\\hline[.1pt]%
% educ&%
%	School of Education&%
%	Harvard\\\hline[.1pt]%
% emi&%
%	Department of Early
% and Medieval Irish&%
%	Harvard\\\hline[.1pt]%
% eng&%
%	School of English&%
%	Harvard\\\hline[.1pt]%
% folketh&%
%	Department of Folklore and Ethnology&%
%	Harvard\\\hline[.1pt]%
% french&%
%	School of Languages,
% Literatures and Cultures; %	Department of French&%
%	Harvard\\\hline[.1pt]%
% geog&%
%	Department of Geography&%
%	Harvard\\\hline[.1pt]%
% german&%
%	School of Languages,
% Literatures and Cultures; %	Department of German&%
%	MLA\\\hline[.1pt]%
% hisp&%
%	School of Languages, Literatures and Cultures; %	Department of Hispanic Studies&%
%	Harvard\\\hline[.1pt]%
% hist&%
%	School of History&%
%	Harvard\\\hline[.1pt]%
% italian&%
%	School of Languages,
% Literatures and Cultures; %	Department of Italian&%
%	Harvard\\\hline[.1pt]%
% llc&%
%	School of Languages,
% Literatures and Cultures&%
%	Harvard\\\hline[.1pt]%
% \fnote{}lnag&%
%	School of Scoil Léann
% na Gaeilge~/ School of Irish Learning&%
%	Harvard\\\hline[.1pt]%
% modirish&%
%	Department of Modern Irish&%
%	Harvard\\\hline[.1pt]%
% music&%
%	School of Music and
% Theatre; %	Department of Music&%
%	Harvard\\\hline[.1pt]%
% nuag&%
%	Department of Nua-Ghaeilge&%
%	Harvard\\\hline[.1pt]%
% phil&%
%	Department of Philosophy&%
%	Harvard\\\hline[.1pt]%
% planning&%
%	School of Geography and
% Archaeology: The Human Environment&%
%	Harvard\\\hline[.1pt]%
% politics&%
%	Department of Politics&%
%	Harvard\\\hline[.1pt]%
% relig&%
%	Department of Study
% of Religions&%
%	Harvard\\\hline[.1pt]%
% smg&%
%	Department of Sean-
% agus Meán-Ghaeilge&%
%	Harvard\\\hline[.1pt]%
% socio&%
%	Department of Sociology&%
%	Harvard\\\hline[.1pt]%
% sociophil&%
%	School of Sociology and
% Philosophy&%
%	Harvard\\\hline[.1pt]%
% theatre&%
%	School of Music and
% Theatre; %	Department of Drama
% and Theatre Studies&%
%	Harvard\\\hline[.1pt]%
% \end{tabular}
% \scriptsize
% \renewcommand{\labelenumi}{\itshape\alph{enumi}\upshape)}
% \begin{enumerate}[noitemsep]
%   \item The \texttt{asian} option preloads the \textsf{CJK} package
%       (Chinese/Japanese/Korean)
%   \item The \texttt{lnag} option may require the \texttt{\bfseries gaeilge}
%       option
% \end{enumerate}
% \setcounter{fnote}{0}
% \par\endgroup
% \end{table}
% \begin{table}[p]\small\sffamily
% \caption{Class options for the College of Medicine and
%     Health}\label{medopts}\medskip
% \begingroup\fontsize{10}{11}\selectfont
% \centering
% \begin{tabular}{@{}%
% 	>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}p{9cm}<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}b{2cm}<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\sffamily\bfseries Option}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}p{9cm}<{\poststrut\arraybackslash}}{\sffamily\bfseries School / Department / Institute}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}b{2cm}<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Reference Format}\\[2pt]\hline
% 
% anat&%
%	Department of Anatomy&%
%	Vancouver\\\hline[.1pt]%
% biochem&%
%	Department of Biochemistry&%
%	Vancouver\\\hline[.1pt]%
% clinther&%
%	School of Clinical
% Therapies&%
%	Harvard\\\hline[.1pt]%
% cuh&%
%	Hospital Cork
% University&%
%	Vancouver\\\hline[.1pt]%
% denthosp&%
%	University Dental
% School and Hospital&%
%	Vancouver\\\hline[.1pt]%
% dentrest&%
%	University Dental
% School and Hospital; %	School of Dental
% Hygiene; %	Department of Restorative Dentistry&%
%	Vancouver\\\hline[.1pt]%
% dentsurg&%
%	University Dental
% School and Hospital; %	Department of Dental Surgery&%
%	Vancouver\\\hline[.1pt]%
% epipub&%
%	School of Medicine; %	Department of Epidemiology and Public Health&%
%	Vancouver\\\hline[.1pt]%
% gp&%
%	School of Medicine; %	Department of General Practice&%
%	Vancouver\\\hline[.1pt]%
% hearing&%
%	School of Clinical
% Therapies; %	Department of Speech and Hearing Sciences&%
%	APA\\\hline[.1pt]%
% life&%
%	School of Life
% Sciences&%
%	Harvard\\\hline[.1pt]%
% medicine&%
%	School of Medicine; %	Department of Medicine&%
%	Vancouver\\\hline[.1pt]%
% medsch&%
%	School of Medicine&%
%	Vancouver\\\hline[.1pt]%
% mercy&%
%	Hospital Mercy
% University&%
%	Vancouver\\\hline[.1pt]%
% midwifery&%
%	School of Nursing and
% Midwifery&%
%	Harvard\\\hline[.1pt]%
% nursing&%
%	School of Nursing and
% Midwifery&%
%	Harvard\\\hline[.1pt]%
% obsgyn&%
%	School of Medicine; %	Department of Obstetrics and Gynaecology&%
%	Vancouver\\\hline[.1pt]%
% occther&%
%	School of Clinical
% Therapies; %	Department of Occupational Therapy&%
%	Harvard\\\hline[.1pt]%
% oralhealth&%
%	University Dental
% School and Hospital; %	Department of Oral
% Health and Development&%
%	Vancouver\\\hline[.1pt]%
% path&%
%	School of Medicine; %	Department of Pathology&%
%	Vancouver\\\hline[.1pt]%
% pch&%
%	School of Medicine; %	Department of Paediatrics and Child Health&%
%	Vancouver\\\hline[.1pt]%
% pharm&%
%	School of Pharmacy&%
%	Harvard\\\hline[.1pt]%
% pharmthera&%
%	School of Medicine; %	Department of Pharmacology and Therapeutics&%
%	Vancouver\\\hline[.1pt]%
% physio&%
%	Department of Physiology&%
%	Vancouver\\\hline[.1pt]%
% psychiatry&%
%	School of Medicine; %	Department of Psychiatry&%
%	Vancouver\\\hline[.1pt]%
% radio&%
%	School of Medicine; %	Department of Radiology&%
%	Harvard\\\hline[.1pt]%
% speech&%
%	School of Clinical
% Therapies; %	Department of Speech and Hearing Sciences&%
%	APA\\\hline[.1pt]%
% surg&%
%	School of Medicine; %	Department of Surgery&%
%	Vancouver\\\hline[.1pt]%
% \end{tabular}
% \par\endgroup
% \end{table}
% \begin{table}\small\sffamily
% \caption{Class options for the College of Business and
%     Law}\label{buslawopts}\medskip
% \begingroup\fontsize{10}{11}\selectfont
% \centering
% \begin{tabular}{@{}%
% 	>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}p{8cm}<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}b{2cm}<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\sffamily\bfseries Option}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}p{8cm}<{\poststrut\arraybackslash}}{\sffamily\bfseries School / Department / Institute}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}b{2cm}<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Reference Format}\\[2pt]\hline
% 
% afis&%
%	Faculty of
% Commerce; %	Department of Accounting and Finance&%
%	Harvard\\\hline[.1pt]%
% bis&%
%	Faculty of
% Commerce; %	Department of Business Information Systems&%
%	Harvard\\\hline[.1pt]%
% commerce&%
%	Faculty of
% Commerce&%
%	Harvard\\\hline[.1pt]%
% coop&%
%	Faculty of
% Commerce; %	Centre for
% Co-operative Studies&%
%	Harvard\\\hline[.1pt]%
% cps&%
%	Faculty of
% Commerce; %	Centre for Policy
% Studies&%
%	Harvard\\\hline[.1pt]%
% econ&%
%	Faculty of
% Commerce; %	Department of Economics&%
%	Harvard\\\hline[.1pt]%
% foodbus&%
%	School of Food and
% Nutritional Sciences; %	Department of Food
% Business and Development&%
%	Harvard\\\hline[.1pt]%
% govt&%
%	Faculty of
% Commerce; %	Department of Government&%
%	Harvard\\\hline[.1pt]%
% law&%
%	Faculty of
% Law&%
%	Legal\\\hline[.1pt]%
% mgt&%
%	Faculty of
% Commerce; %	Department of Management and Marketing&%
%	Harvard\\\hline[.1pt]%
% \fnote{}mktg&%
%	Faculty of
% Commerce; %	Department of Management and Marketing&%
%	Harvard\\\hline[.1pt]%
% stats&%
%	Department of Statistics&%
%	Harvard\\\hline[.1pt]%
% \end{tabular}
% \scriptsize
% \renewcommand{\labelenumi}{\itshape\alph{enumi}\upshape)}
% \begin{enumerate}[noitemsep]
%   \item The \texttt{mktg} option is an alternative for \texttt{mgt}
% \end{enumerate}
% \setcounter{fnote}{0}
% \par\endgroup
% \end{table}
% \begin{table}\small\sffamily
% \caption{Class options for selecting Institutes}\label{instopts}\medskip
% \begingroup\fontsize{10}{11}\selectfont
% \centering
% \begin{tabular}{@{}%
% 	>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}p{9cm}<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}b{2cm}<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\sffamily\bfseries Option}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}p{9cm}<{\poststrut\arraybackslash}}{\sffamily\bfseries School / Department / Institute}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}b{2cm}<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Reference Format}\\[2pt]\hline
% 
% imi&%
%	Irish
% Management Institute&%
%	Harvard\\\hline[.1pt]%
% tyndall&%
%	Tyndall
% National Institute&%
%	Alpha\\\hline[.1pt]%
% \end{tabular}
% \par\endgroup
% \end{table}
% \clearpage
% \section{Options for class of degree}\label{degreeoptions}
% \begin{table}[ht]\small\sffamily
% \caption{Degree options for the College of Arts, Celtic
%     Studies and Social Sciences}\label{acsssdegs}\medskip
% \begingroup\fontsize{10}{11}\selectfont
% \centering
% \begin{tabular}{@{}%
% 	>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}p{11cm}<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\sffamily\bfseries Option}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}p{11cm}<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Degree}\\[2pt]\hline
% 
% dlitt&%
%	 Doctor of
% Literature\\\hline[.1pt]%
% dlittcelt&%
%	 Doctor of Celtic
% Literature\\\hline[.1pt]%
% dmus&%
%	 Doctor of Music\\\hline[.1pt]%
% dsocsci&%
%	 Doctor of Social
% Science\\\hline[.1pt]%
% ma&%
%	 Master of Arts\\\hline[.1pt]%
% mbsasian&%
%	 Master of Business Systems
% (Asian Business)\\\hline[.1pt]%
% med&%
%	 Master of Education\\\hline[.1pt]%
% mphil&%
%	 Master of
% Philosophy\\\hline[.1pt]%
% mplan&%
%	 Master of Planning and
% Sustainable Development\\\hline[.1pt]%
% msocsc&%
%	 Master of Social
% Science\\\hline[.1pt]%
% msw&%
%	 Master of Social
% Work\\\hline[.1pt]%
% phd&%
%	 Doctor of
% Philosophy\\\hline[.1pt]%
% phded&%
%	 Doctor of Philosophy in
% Education~--- Structured\\\hline[.1pt]%
% phdss&%
%	 Doctor of Philosophy in Social
% Sciences\\\hline[.1pt]%
% phdtcc&%
%	 Doctor of Philosophy in Texts,
% Contexts and Cultures\\\hline[.1pt]%
% \end{tabular}
% \par\endgroup
% \end{table}
% \begin{table}\small\sffamily
% \caption{Degree options for the College of Medicine and
%     Health}\label{meddegs}\medskip
% \begingroup\fontsize{10}{11}\selectfont
% \centering
% \begin{tabular}{@{}%
% 	>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}p{11cm}<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\sffamily\bfseries Option}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}p{11cm}<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Degree}\\[2pt]\hline
% 
% dclindent&%
%	 Doctor of Clinical
% Dentistry\\\hline[.1pt]%
% dmed&%
%	 Doctor of Medicine\\\hline[.1pt]%
% dnp&%
%	 Doctor of Nursing
% Practice\\\hline[.1pt]%
% docct&%
%	 Doctor of Occupational
% Therapy\\\hline[.1pt]%
% mao&%
%	 Master of
% Obstetrics\\\hline[.1pt]%
% mch&%
%	 Master of Surgery\\\hline[.1pt]%
% md&%
%	 Doctor of Medicine\\\hline[.1pt]%
% mdph&%
%	 Master in Dental Public
% Health\\\hline[.1pt]%
% mds&%
%	 Master of Dental
% Science\\\hline[.1pt]%
% mmedsc&%
%	 Master in Sport and Exercise
% Medicine\\\hline[.1pt]%
% mph&%
%	 Master in Public
% Health\\\hline[.1pt]%
% msccp&%
%	 Master of Science (Clinical
% Pharmacy)\\\hline[.1pt]%
% mscebtp&%
%	 Master of Science
% (Evidence-Based Therapy Practice)\\\hline[.1pt]%
% mscm&%
%	 Master of Science
% (Midwifery)\\\hline[.1pt]%
% mscog&%
%	 Master of Science (Obstetrics
% and Gynaecology)\\\hline[.1pt]%
% mscoh&%
%	 Master of Science (Occupational
% Health)\\\hline[.1pt]%
% mscptqs&%
%	 Master of Science
% (Pharmaceutical Technology and Quality
% Systems)\\\hline[.1pt]%
% phd&%
%	 Doctor of
% Philosophy\\\hline[.1pt]%
% phdcb&%
%	 Doctor of Philosophy in Cancer
% Biology\\\hline[.1pt]%
% phdhsr&%
%	 Doctor of Philosophy in Health
% Services Research\\\hline[.1pt]%
% \end{tabular}
% \par\endgroup
% \end{table}
% \begin{table}[p]\small\sffamily
% \caption{Degree options for the College of Business and
%     Law}\label{buslawdegs}\medskip
% \begingroup\fontsize{10}{11}\selectfont
% \centering
% \begin{tabular}{@{}%
% 	>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}p{11cm}<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\sffamily\bfseries Option}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}p{11cm}<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Degree}\\[2pt]\hline
% 
% dbe&%
%	 Doctor of Business
% Economics\\\hline[.1pt]%
% deconsc&%
%	 Doctor of Economic
% Science\\\hline[.1pt]%
% lld&%
%	 Doctor of Law\\\hline[.1pt]%
% llm&%
%	 Master of Law\\\hline[.1pt]%
% llmcj&%
%	 Master of Law (Criminal
% Justice)\\\hline[.1pt]%
% llme&%
%	 Master of Law
% (e-Law)\\\hline[.1pt]%
% llmp&%
%	 Master of Law
% (Practitioner)\\\hline[.1pt]%
% mba&%
%	 Master of Business
% Administration\\\hline[.1pt]%
% mbs&%
%	 Master of Business
% Systems\\\hline[.1pt]%
% mbsasian&%
%	 Master of Business Systems
% (Asian Business)\\\hline[.1pt]%
% mbsbe&%
%	 Master of Business Systems
% (Business Economics)\\\hline[.1pt]%
% mbsbis&%
%	 Master of Business Systems
% (Business Information Systems)\\\hline[.1pt]%
% mbsbp&%
%	 Master of Business Systems
% (Economics of Business Practice)\\\hline[.1pt]%
% mbscse&%
%	 Master of Business Systems
% (Co-operative and Social Enterprise)\\\hline[.1pt]%
% mbseb&%
%	 Master of Business Systems
% (Electronic Business)\\\hline[.1pt]%
% mbsfm&%
%	 Master of Business Systems
% (Food Marketing)\\\hline[.1pt]%
% mbsg&%
%	 Master of Business Systems
% (Government)\\\hline[.1pt]%
% mbshsm&%
%	 Master of Business Systems
% (Health Services Management)\\\hline[.1pt]%
% mbsieb&%
%	 Master of Business Systems
% (Innovation in European Business)\\\hline[.1pt]%
% mbsippd&%
%	 Master of Business Systems
% (International Public Policy and
% Diplomacy)\\\hline[.1pt]%
% mbsisbp&%
%	 Master of Business Systems
% (Information Systems for Business
% Performance)\\\hline[.1pt]%
% mbsmimas&%
%	 Master of Business Systems
% (Management Information and Managerial Accounting
% Systems)\\\hline[.1pt]%
% mbsmm&%
%	 Master of Business Systems
% (Management and Marketing)\\\hline[.1pt]%
% mcomm&%
%	 Master of Commerce\\\hline[.1pt]%
% mcommbb&%
%	 Master of Commerce (Supply
% Chain Management~--- Lean SCM Black Belt)\\\hline[.1pt]%
% mcommbe&%
%	 Master of Commerce (Business
% Economics)\\\hline[.1pt]%
% mcommgpp&%
%	 Master of Commerce (Government
% and Public Policy)\\\hline[.1pt]%
% mcommscm&%
%	 Master of Commerce (Supply
% Chain Management)\\\hline[.1pt]%
% meconsc&%
%	 Master of Economic
% Science\\\hline[.1pt]%
% msccf&%
%	 Master of Science (Corporate
% Finance)\\\hline[.1pt]%
% mscfe&%
%	 Master of Science (Financial
% Economics)\\\hline[.1pt]%
% msche&%
%	 Master of Science (Health
% Economics)\\\hline[.1pt]%
% phd&%
%	 Doctor of
% Philosophy\\\hline[.1pt]%
% phdbis&%
%	 Doctor of Philosophy in
% Business Information Systems\\\hline[.1pt]%
% \end{tabular}
% \par\endgroup
% \end{table}
% \begin{table}[p]\small\sffamily
% \caption{Degree options for the College of Science,
%     Engineering and Food Science}\label{sefsdegs}\medskip
% \begingroup\fontsize{10}{11}\selectfont
% \centering
% \begin{tabular}{@{}%
% 	>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\prestrut\arraybackslash}p{11cm}<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}>{\ttfamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\sffamily\bfseries Option}&\multicolumn{1}{>{\raggedright{}\prestrut\arraybackslash}p{11cm}<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Degree}\\[2pt]\hline
% 
% dsc&%
%	 Doctor of Science\\\hline[.1pt]%
% me&%
%	 Master of
% Engineering\\\hline[.1pt]%
% mengsc&%
%	 Master of Engineering
% Science\\\hline[.1pt]%
% mengscit&%
%	 Master of Engineering Science
% (Information Technology in Architecture, Engineering
% and Construction)\\\hline[.1pt]%
% mengscm&%
%	 Master of Engineering Science
% (Microelectronics)\\\hline[.1pt]%
% mengscmd&%
%	 Master of Engineering Science
% (Microelectronic Design)\\\hline[.1pt]%
% mengscme&%
%	 Master of Engineering Science
% in Mechanical Engineering (Manufacturing, Process and
% Automation Systems)\\\hline[.1pt]%
% mengscpbe&%
%	 Master of Engineering Science
% (Pharmaceutical and Biopharmaceutical
% Engineering)\\\hline[.1pt]%
% mengscse&%
%	 Master of Engineering Science
% (Sustainable Energy)\\\hline[.1pt]%
% mplan&%
%	 Master of Planning and
% Sustainable Development\\\hline[.1pt]%
% msc&%
%	 Master of Science\\\hline[.1pt]%
% mscac&%
%	 Master of Applied Science
% (Analytical Chemistry)\\\hline[.1pt]%
% mscapc&%
%	 Master of Applied Science
% (Analysis of Pharmaceutical Compounds)\\\hline[.1pt]%
% mscb&%
%	 Master of Applied Science
% (Biotechnology)\\\hline[.1pt]%
% mscbsb&%
%	 Master of Applied Science
% (Bioinformatics with Systems Biology)\\\hline[.1pt]%
% msccoop&%
%	 Master of Science (Co-operative
% Organisation/Food Marketing/Rural
% Development)\\\hline[.1pt]%
% mscea&%
%	 Master of Applied Science
% (Ecological Assessment)\\\hline[.1pt]%
% msceac&%
%	 Master of Applied Science
% (Environmental Analytical Chemistry)\\\hline[.1pt]%
% mscfb&%
%	 Master of Science (Food
% Business)\\\hline[.1pt]%
% mscfm&%
%	 Master of Applied Science (Food
% Microbiology)\\\hline[.1pt]%
% mscfs&%
%	 Master of Applied Science (Food
% Science)\\\hline[.1pt]%
% mscgis&%
%	 Master of Applied Science
% (Geographical Information Systems and Remote
% Sensing)\\\hline[.1pt]%
% mscmb&%
%	 Master of Applied Science
% (Marine Biology)\\\hline[.1pt]%
% mscmmsc&%
%	 Master of Applied Science
% (Mathematical Modelling and Scientific
% Computing)\\\hline[.1pt]%
% mscns&%
%	 Master of Applied Science
% (Nutritional Sciences)\\\hline[.1pt]%
% mscrd&%
%	 Master of Science (Rural
% Development)\\\hline[.1pt]%
% mscssmn&%
%	 Master of Applied Science
% (Software and Systems for Mobile Networks)\\\hline[.1pt]%
% msctm&%
%	 Master of Science (Technology
% Management)\\\hline[.1pt]%
% phd&%
%	 Doctor of
% Philosophy\\\hline[.1pt]%
% \end{tabular}
% \par\endgroup
% \end{table}
% \clearpage
% \section{Packages preloaded}
% To make this document class work, several packages are
% preloaded. If your own work needs one of these, you 
% {\small MUST NOT} use the {\ttfamily{}\textbackslash{}usepackage} command for it, as it is
% already defined. These preloaded packages are listed in \vref{preloaded}.\par
% Be aware that some packages may influence others. In
% particular, if you use the \textsf{hyperref} package
% that implements hyperlinks in PDF output, it
% {\small MUST} be loaded last, after all
% other packages.\par
% \iffalse
%% v1.17 2014/01/27 Documented the fix for apacite
% \fi
% \changes{v1.17}{2014/01/27}{Documented the fix for apacite}
% \begin{table}[p]\small\sffamily
% \caption{Standard packages preloaded}\label{preloaded}\medskip
% \begingroup\fontsize99\selectfont
% \centering
% \begin{tabular}{@{}%
% 	>{\sffamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}%
% 	>{\raggedright{}\ttfamily\prestrut\arraybackslash}m{2.6cm}<{\poststrut\arraybackslash}%
% 	l<{\poststrut\arraybackslash}%
% 	@{}}
% \multicolumn{1}{@{}>{\sffamily\prestrut\arraybackslash}l<{\poststrut\arraybackslash}}{\sffamily\bfseries Package}&\multicolumn{1}{>{\raggedright{}\ttfamily\prestrut\arraybackslash}m{2.6cm}<{\poststrut\arraybackslash}}{\sffamily\bfseries Options used}&\multicolumn{1}{l<{\poststrut\arraybackslash}@{}}{\sffamily\bfseries Usage}\\[2pt]\hline
% 
% \multicolumn{3}{@{}c<{\poststrut\arraybackslash}@{}}{\vstrut\bfseries Packages active in
% all cases}\\[2pt]\hline\vstrut
% \llap{\normalfont * }CJK&&enables Chinese, Japanese, and Korean
% texts\\
% array&&allows paragraph formatting within table
% cells\\
% calc&&dimension arguments accepted in infix
% notation\\
% ccaption&&restyle captions (used to get {\ttfamily{}\textbackslash{}raggedright})\\
% fancyhdr&&adds running headers and footers\\
% float&&allows \textbf{\texttt{H}} (`here') position for
% non-floating floats\\
% fontenc&T1&use the T1 font encoding for Unicode\\
% footmisc&&ensure footnotes stay at the bottom of short
% pages\\
% geometry&&set the margins (see \vref{clspackages})\\
% graphicx&&enable graphics\\
% ifthen&&used for if\dots then\dots else
% internally\\
% inputenc&utf8x&specify UTF-8 (Unicode) to allow all
% languages\\
% lmodern&&extended Computer Modern (default)
% typeface\\
% parskip&&no indentation, paragraph gap is one
% line-space\\
% setspace&&set 1\nicefrac12 line-spacing\\
% soul&&enable letterspacing for title page\\
% \llap{\normalfont † }textcomp&&support for special characters including
% {\ttfamily{}\textbackslash{}texteuro} ({\fontencoding{OT1}\fontfamily{cmr}\selectfont\texteuro})\\
% \llap{\normalfont ‡ }ucccrest&&UCC crest\\
% ulem&&Support for underlining\\
% url&&Improved line-breaking of long web
% addresses\\
% xcolor&&Colour\\
% [2pt]\hline
% \multicolumn{3}{@{}c<{\poststrut\arraybackslash}@{}}{\vstrut\bfseries Packages active only
% with the \textbf{\texttt{gaeilge}} class option}\\[2pt]\hline\vstrut
% babel&english, irish&Irish-language typesetting options\\
% eiad&&{\fontencoding{OT1}\fontfamily{eiad}\selectfont{}sean-chló} typeface\\
% [2pt]\hline
% \multicolumn{3}{@{}c<{\poststrut\arraybackslash}@{}}{\vstrut\bfseries Packages active only
% with the \textbf{\texttt{wp}} class option}\\[2pt]\hline\vstrut
% pslatex&&Times, Helvetica, and Courier only\\
% ragged2e&&hyphenation even in ragged right setting\\
% [2pt]\hline
% \multicolumn{3}{@{}c<{\poststrut\arraybackslash}@{}}{\vstrut\bfseries Packages and \BibTeX{}
% {\ttfamily{}.bst} files loaded for
% bibliographic support}\\[2pt]\hline\vstrut
% apacite&apacite&\llap{\rdelim\}8{10pt}}%
% 	\multirow{8}{3in}{Loaded according to your School or
% Department settings.}\\
% natbib&&\\
% har2nat&dcu, agsm, kluwer&\\
% jurabib&jurabib&\\
% mla&chicago&\\
% oxford&\url{oxford_en}&\\
% --&vancouver&\\[2pt]\hline
% \end{tabular}
% \par\endgroup
% \par\bigskip\footnotesize
% \begin{itemize}[noitemsep]
% \item[*]only with the \textbf{\texttt{cjk}}
% class option
% \item[†]support for the official {\fontencoding{U}\fontfamily{mvs}\fontseries{m}\fontshape{n}\selectfont\char164}
%   symbol requires the \textsf{marvosym}
% package ({\ttfamily{}\textbackslash{}EUR})
% \item[‡]you must ensure that the
% \textsf{ucccrest} package is installed
% if you work in UCC.
% \end{itemize}
% \end{table}
% \clearpage
% \section{Thesis Regulations}\label{regs}
% These rules were taken from the Graduate Studies web site
% at
% \url{http://www.ucc.ie/en/graduatestudies/thesis/} 
% on 29 June 2014.\par
% \subsection{Layout of Thesis}
% \subsubsection{Title Page}
% There must be a title page which shall give the
%     following information:\par
% \begin{enumerate}
% \item The full title\footnote{%
% The title should describe the content of the
%     thesis accurately and concisely.} of the thesis and the subtitle, if
% any.
% \item The total number of volumes if more than one, and
% the number of the particular volume.
% \item The full name of the author, followed, if desired,
% by any qualifications and distinctions.
% \item The qualification for which the thesis is
% submitted.
% \item The name of the institution to which the thesis is
% submitted~--- National University of Ireland,
% Cork.
% \item The department, Faculty or organisation in which
% research was conducted.
% \item The Month and Year of submission.
% \item Name of the head of the department
% concerned.
% \item Name of the supervisor of the research.
% \end{enumerate}
% \subsubsection{Table of Contents}
% The table of contents shall immediately follow the
%     title page.\par
% \subsection{Style}
% The text must be either, printed, typewritten or
%   otherwise reproduced on good quality size A4 paper, with a
%   left-hand margin 4 cm. Double or one and a half spacing is
%   recommended. Copies must be bound or otherwise securely
%   fastened and numbered consecutively, page numbers to be
%   located centrally at the bottom of the page.\par
% \renewcommand{\bibname}{References}
% \clearpage
% \raggedright
% \bibliography{uccthesis}
% \bibliographystyle{apacite}
% \begin{VerbatimOut}{uccthesis.bib}
%<*ignore>
@techreport{rfc2119,
author 	 = {Scott Bradner},
shortauthor 	 = {Bradner},
title 	 = {{Key words for use in RFCs to Indicate Requirement Levels}},
institution 	 = {Internet Engineering Task Force},
address 	 = {Fremont, CA},
number 	 = {RFC 2119},
year 	 = {1997},
month 	 = {Mar},
url 	 = {http://www.ietf.org/rfc/rfc2119.txt},
lastchecked 	 = {21 August 2011}
}
@article{shaw,
author 	 = {George Bernard Shaw},
shortauthor 	 = {Shaw},
title 	 = {{On Modern Typography (In article `The Author Looks at his Book')}},
journal 	 = {{The Dolphin: A Journal of the Making of Books}},
editor 	 = {Lawrence C Wroth},
shorteditor 	 = {Wroth},
publisher 	 = {Limited Editions Club},
address 	 = {New York},
year 	 = {1940},
volume 	 = {4},
number 	 = {1},
pages 	 = {80--81}
}
@article{einstein,
author 	 = {Albert Einstein},
shortauthor 	 = {Einstein},
title 	 = {{Grundgedanken der allgemeinen Relativitätstheorie und Anwendung dieser Theorie in der Astronomie}},
journal 	 = {{Preussische Akademie der Wissenschaften}},
issn 	 = {Schilpp 82},
year 	 = {1915},
volume 	 = {1},
pages 	 = {315}
}
@book{heaney,
author 	 = {Seamus Heaney},
shortauthor 	 = {Heaney},
title 	 = {{Beowulf: A New Verse Translation}},
publisher 	 = {WW Norton},
address 	 = {New York},
isbn 	 = {978-0393320978},
year 	 = {2001},
month 	 = {Feb},
pages 	 = {215}
}
@book{fi,
author 	 = {Peter Flynn},
shortauthor 	 = {Flynn},
title 	 = {{Formatting Information}},
publisher 	 = {Silmaril Consultants},
address 	 = {Cork},
edition 	 = {5th},
year 	 = {2011},
month 	 = {Mar},
url 	 = {http://latex.silmaril.ie/formattinginformation},
lastchecked 	 = {21 August 2011}
}
%</ignore>
% \end{VerbatimOut}
% \StopEventually{\label{endcode}
%   \clearpage
%   \newgeometry{left=3cm}
%   \addcontentsline{toc}{section}{Change History}
%   \label{changehistory}
%   \PrintChanges
%   \clearpage
%   \label{codeindex}
%   \addcontentsline{toc}{section}{Index}
%   \PrintIndex}
% \addtolength{\revmarg}{\widthof{\LabelFont{@departmenthandle}}}
% \newgeometry{left=\revmarg}
% \iffalse
%<*class>
% \fi
% \section{Auto-initialisation}
% This section is added automatically by \textit{ClassPack} 
% as a preamble to all classes and packages. See the documentation
% to the \textsf{fixltx2e} package for details of why these have to
% be loaded \emph{before} anything else.\par
% \begin{CPK@package}{fixltx2e}
% Additional \LaTeX\ features omitted from the kernel for backward
% compatibility.\par
%    \begin{macrocode}
\RequirePackage{fixltx2e}
%    \end{macrocode}
% \end{CPK@package}
% \begin{CPK@package}{fix-cm}
% Preloaded functions to overcome the default \LaTeX\ step-size font
% sizes (which can still be used, but are no longer restrictions).\par
%    \begin{macrocode}
\RequirePackage{fix-cm}
%    \end{macrocode}
% \end{CPK@package}
% \begin{CPK@option}{svgnames}
% Pass the option \textbf{\texttt{svgnames}} to the \textsf{hyperref}
% package if that gets loaded later. This avoids a conflict with 
% whatever \textsf{hyperref}'s own default is.\par
%    \begin{macrocode}
\PassOptionsToPackage{hyperref}{svgnames}
%    \end{macrocode}
% \end{CPK@option}
% \clearpage
% \section{Implementation}\label{implementation}
% The \textsf{uccthesis} document class is based
% on the standard \LaTeX{} \textsf{report} class, with
% additions to handle the title page and some extra formatting
% options, in particular the automation of selecting discipline
% (affiliation) and class of degree with the relevant \BibTeX{}
% style.\par
% \subsection{Preliminary declarations}
% The \textsf{ifthen} package is required to
%   make the options work.\par
%    \begin{macrocode}
\RequirePackage{ifthen}
%    \end{macrocode}
% \subsection{Option management for affiliations and classes of
%   degrees}
% The current design provides an option for every
%   degree-granting discipline (aka College, Faculty, School, or
%   Department); for identifying Institutes, Hospitals, Centres,
%   and Units where relevant; and for every class of
%   degree.\footnote{%
% It would probably be better for a future version to
%       use the \textsf{keyval} package
%       to minimise the number of options declared.}\par
% The data for the affiliations, disciplines, and degrees
%   is held in a structure in the master XML document for this
%   class, where it can be updated annually with changes as
%   determined by UCC. All related options are then generated
%   directly from this data.\par
% \subsubsection{Preliminary setup for affiliations and disciplines}
% To manage the specification of the options, for each
%     division, we create three control sequences:\par
% \begin{enumerate}
% \item a `handle' which acts as a
% way to standardise the prefix or suffix applied to
% each division;
% \item a default value of {\ttfamily{}\textbackslash{}relax} to enable recognition
% of the specified value of each division's name;
% \item a command to allow the assignment of each
% name.
% \end{enumerate}
% Each command that identifies a division takes one
%     optional argument and one compulsory argument: the
%     compulsory argument is the value to assign, subject to the
%     three rules:\par
% \begin{enumerate}
% \item if there is no optional argument, then the value
% is assigned with the declared handle prefixed or
% suffixed: \verb|\centre{Computer}| produces
% `Computer Centre';
% \item if the optional argument brackets are present but
% with no value supplied, the compulsory value is
% assigned \emph{without} the handle:
% \verb|\centre[]{Centre for Excellence in Design}| produces `Centre for
%   Excellence in Design';
% \item if an optional argument is supplied, then its
% value is assigned as-is (no handle), and the
% compulsory argument is taken to be an acronym:
% \verb|\centre[Alimentary Pharmabiotic Centre]{APC}| produces `Alimentary
%   Pharmabiotic Centre (APC)'.
% \end{enumerate}
% The last rule applies only to Institutes, Hospitals,
%     Centres, and Units, where acronyms are common. For Schools
%     and Departments, the third format currently ignores any
%     specified optional argument.\par
% \par\begingroup\fboxsep1em\centering
%   \fbox{\begin{minipage}{0.8\columnwidth}\sffamily
%  \raggedright\parindent0pt\parskip=.5\baselineskip
% \subsubsection*{\sffamily UCC organisation}
% The UCC organisational model is currently
%       non-functional. Colleges have not yet fully replaced
%       Faculties, as was planned, but added to them; and
%       Schools have likewise not replaced Departments. There is
%       no longer a strict hierarchy, as some Schools and
%       Departments belong to more than one College or Faculty,
%       so there is no clear identity. Arguably some of the
%       present Departments are really Disciplines, where the
%       oversight role has been taken over by their School or
%       Department.\par
% \end{minipage}}\par\endgroup
% \begin{CPK@macro}{\@schoolhandle}
% The handles (prefixes/suffixes) all follow this
%       pattern.\par
%    \begin{macrocode}
\def\@schoolhandle{School of}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@unittype}
% Define a value for school or department\par
%    \begin{macrocode}
\def\@unittype{\relax}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@school}
% Define the default-value macro for Schools. The others
%       follow the same pattern.\par
%    \begin{macrocode}
\def\@school{\relax}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\school}
% Define the user-level command to handle Schools.\par
%    \begin{macrocode}
\newcommand{\school}[2][\relax]{%
%    \end{macrocode}
% If the optional argument is present but null, use
%       the main argument as given.\par
%    \begin{macrocode}
  \ifthenelse{\equal{#1}{}}%
    {\gdef\@school{#2}}%
%    \end{macrocode}
% If the optional argument absent, prepend the handle to
%       the main argument. In the case of Institutes, Hospitals,
%       Centres, and Units below, the handle is appended
%       instead.\par
%    \begin{macrocode}
    {\if#1\relax\gdef\@school{\@schoolhandle\ #2}%
%    \end{macrocode}
% Otherwise (optional argument supplied) treat the
%       optional argument as a replacement handle.\par
%    \begin{macrocode}
     \else\gdef\@school{#1 #2}%
     \fi
  }%
  \gdef\@unittype{School}%
}%
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@departmenthandle}
% Departments\dots{}\par
%    \begin{macrocode}
\def\@departmenthandle{Department of}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@department}
%    \begin{macrocode}
\def\@department{\relax}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\department}
%    \begin{macrocode}
\newcommand{\department}[2][\relax]{%
  \ifthenelse{\equal{#1}{}}{\gdef\@department{#2}}{%
    \if#1\relax
      \gdef\@department{\@departmenthandle\ #2}%
    \else\gdef\@department{#1 #2}\fi
  }%
  \def\@unittype{Department}%
}%
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@institutehandle}
% Institutes\dots{}\par
%    \begin{macrocode}
\def\@institutehandle{Institute}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@institute}
%    \begin{macrocode}
\def\@institute{\relax}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\institute}
% In this case the handle is appended, not prepended,
%       and an optional argument is taken to be an acronym in
%       parentheses.\par
%    \begin{macrocode}
\newcommand{\institute}[2][\relax]{%
  \ifthenelse{\equal{#1}{}}{\gdef\@institute{#2}}{%
    \if#1\relax
      \gdef\@institute{#2 \@institutehandle}%
    \else\gdef\@institute{#2 (#1)}\fi}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@hospitalhandle}
% Hospitals\dots{}\par
%    \begin{macrocode}
\def\@hospitalhandle{Hospital}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@hospital}
%    \begin{macrocode}
\def\@hospital{\relax}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\hospital}
% In this case the handle is appended, not prepended,
%       and an optional argument is taken to be an acronym in
%       parentheses.\par
%    \begin{macrocode}
\newcommand{\hospital}[2][\relax]{%
  \ifthenelse{\equal{#1}{}}{\gdef\@hospital{#2}}{%
    \if#1\relax
      \gdef\@hospital{#2 \@hospitalhandle}%
    \else\gdef\@hospital{#2 (#1)}\fi}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@centrehandle}
% Centres\dots{}\par
%    \begin{macrocode}
\def\@centrehandle{Centre}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@centre}
%    \begin{macrocode}
\def\@centre{\relax}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\centre}
% In this case the handle is appended, not prepended,
%       and an optional argument is taken to be an acronym in
%       parentheses.\par
%    \begin{macrocode}
\newcommand{\centre}[2][\relax]{%
  \ifthenelse{\equal{#1}{}}{\gdef\@centre{#2}}{%
    \if#1\relax
      \gdef\@centre{#2 \@centrehandle}%
    \else\gdef\@centre{#2 (#1)}\fi}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@unithandle}
% Units\dots{}\par
%    \begin{macrocode}
\def\@unithandle{Unit}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@unit}
%    \begin{macrocode}
\def\@unit{\relax}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\unit}
% In this case the handle is appended, not prepended,
%       and an optional argument is taken to be an acronym in
%       parentheses.\par
%    \begin{macrocode}
\newcommand{\unit}[2][\relax]{%
  \ifthenelse{\equal{#1}{}}{\gdef\@unit{#2}}{%
    \if#1\relax
      \gdef\@unit{#2 \@unithandle}%
    \else\gdef\@unit{#2 (#1)}\fi}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@usebib}
% Before doing the actual divisional options, we
%       create a command to record the bibliographic reference
%       format that will be required for each
%       College/Faculty/School/Department option. This holds the
%       name of the {\ttfamily{}.bst} file appropriate
%       for each discipline and [optional argument] the package
%       name[s] needed to implement it. The bibliographic style
%       is not issued directly, but uses the value of the
%       {\ttfamily{}\textbackslash{}@userbibstyle} command set by
%       {\ttfamily{}\textbackslash{}@usebib}. This allows the use of the
%       {\ttfamily{}\textbackslash{}resetbibstyle} user command to vary
%       the bibliographic style from the default.\par
% The fourth argument, which was unused, is now taken
%       over by a flag which indicates if the related style
%       packages need to be deferred until after the use of
%       \textsf{hyperref}. This is currently the case
%       for only one style \textsf{apacite}.\par
%    \begin{macrocode}
\def\@userbibstyle{plain}
\newcommand{\@usebib}[4][\relax]{%
  \if#1\relax\else
%    \end{macrocode}
% The {\ttfamily{}\textbackslash{}ifthenelse} command should
%       detect a fourth argument and use it to defer the package
%       loading until the beginning of the document environment.
%       Otherwise it can load at the end of the package.\par
% \iffalse
%% v1.17 2014/01/27 Added code for apacite exception
% \fi
% \changes{v1.17}{2014/01/27}{Added code for apacite exception}
%    \begin{macrocode}
    \ifthenelse{\equal{#4}{}}{%null#4
      \AtEndOfClass{% ie maybe before user customisations
        \message{Loading #1 package for #2 citations}%
        \RequirePackage{#1}}}{%live#4
      \AtBeginDocument{% ie after *everything*
        \message{Loading #1 package for #2 citations}%
        \RequirePackage{#1}}}%
    \fi
  \gdef\@userbibstyle{#2}%
  \AtEndDocument{%
    \message{Setting bibliography style to \@userbibstyle}%
    \bibliographystyle{\@userbibstyle}}%
}
\newcommand{\resetbibstyle}[2][\relax]{%
  \gdef\@userbibstyle{#2}%
  \ifx\relax#1\else
    \message{Loading #1 package for #2 citations}%
    \usepackage{#1}\fi
}
\newcommand{\@usebabel}[2][\relax]{%
  \if\relax#1
    \RequirePackage{#2}
  \else
    \RequirePackage[#1]{#2}
  \fi
}
%    \end{macrocode}
% The third argument holds the human-readable name of
%       the bibliographic style, and the fourth argument is
%       reserved to hold the command required for a full citation
%       in a block quotation. These arguments are currently
%       unused.\par
% \iffalse
%% v0.99 2012/04/20 Added institutions to the list of options to generate (previously omitted)
% \fi
% \changes{v0.99}{2012/04/20}{Added institutions to the list of options to generate (previously omitted)}
% \end{CPK@macro}
% \subsection{Divisional options}
% These are the class options for the various academic
%       divisions within UCC. They are sorted alphabetically.\par
% \subsubsection{ACSSS}
% \paragraph{Applied Social Studies}
% \begin{CPK@option}{apsoc}
% Applied Social Studies (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{apsoc}{%
  \school{Applied Social Studies}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Applied Psychology}
% \begin{CPK@option}{apsych}
% Applied Psychology (school); 
% using the APA citation format
% from the \verb`apacite.bst` \BibTeX\ style with the \textsf{apacite} package (confirmed by \url{pflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{apsych}{%
  \school{Applied Psychology}
  \@usebib[apacite]{apacite}{APA}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Archaeology}
% \begin{CPK@option}{arch}
% Archaeology (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{arch}{%
  \department{Archaeology}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{History of Art}
% \begin{CPK@option}{arthist}
% History of Art (department) in History (school); 
% using the Oxford citation format
% from the \verb`oxford_en.bst` \BibTeX\ style with the \textsf{oxford} package (confirmed by \url{F.Boggi@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{arthist}{%
  \school{History}
  \department{History of Art}
  \@usebib[oxford]{oxford_en}{Oxford}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Digital Arts and Humanities}
% \begin{CPK@option}{dah}
% Digital Arts and Humanities (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (confirmed by \url{113143743@umail.ucc.ie}).
%    \begin{macrocode}
\DeclareOption{dah}{%
  \school{Digital Arts and Humanities}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Asian Studies}
% \begin{CPK@option}{asian}
% Asian Studies (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{asian}{%
  \school{Asian Studies}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Béaloideas~/ Folklore}
% \begin{CPK@option}{bealoideas}
% Béaloideas~/ Folklore (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{bealoideas}{%
  \department[]{Béaloideas~/ Folklore}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Classics}
% \begin{CPK@option}{classics}
% Classics (department); 
% using the Oxford citation format
% from the \verb`oxford_en.bst` \BibTeX\ style with the \textsf{oxford} package (confirmed by \url{D.Woods@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{classics}{%
  \department{Classics}
  \@usebib[oxford]{oxford_en}{Oxford}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Education}
% \begin{CPK@option}{educ}
% Education (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{educ}{%
  \school{Education}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Early and Medieval Irish}
% \begin{CPK@option}{emi}
% Early and Medieval Irish (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{emi}{%
  \department{Early and Medieval Irish}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{English}
% \begin{CPK@option}{eng}
% English (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{eng}{%
  \school{English}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Folklore and Ethnology}
% \begin{CPK@option}{folketh}
% Folklore and Ethnology (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{folketh}{%
  \department{Folklore and Ethnology}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{French}
% \begin{CPK@option}{french}
% French (department) in Languages, Literatures and Cultures (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{french}{%
  \school{Languages, Literatures and Cultures}
  \department{French}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Geography}
% \begin{CPK@option}{geog}
% Geography (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{geog}{%
  \department{Geography}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{German}
% \begin{CPK@option}{german}
% German (department) in Languages, Literatures and Cultures (school); 
% using the MLA citation format
% from the \verb`mlaa.bst` \BibTeX\ style with the \textsf{chicago} package (confirmed by \url{G.Hofmann@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{german}{%
  \school{Languages, Literatures and Cultures}
  \department{German}
  \@usebib[chicago]{mlaa}{MLA}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Hispanic Studies}
% \begin{CPK@option}{hisp}
% Hispanic Studies (department) in Languages, Literatures and Cultures (school); 
% using the Harvard citation format
% from the \verb`agsm-mod.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{hisp}{%
  \school{Languages, Literatures and Cultures}
  \department{Hispanic Studies}
  \@usebib[natbib,har2nat]{agsm-mod}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{History}
% \begin{CPK@option}{hist}
% History (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{hist}{%
  \school{History}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Italian}
% \begin{CPK@option}{italian}
% Italian (department) in Languages, Literatures and Cultures (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{italian}{%
  \school{Languages, Literatures and Cultures}
  \department{Italian}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Languages, Literatures and Cultures}
% \begin{CPK@option}{llc}
% Languages, Literatures and Cultures (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{llc}{%
  \school{Languages, Literatures and Cultures}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Scoil Léann na Gaeilge~/ School of Irish Learning}
% \begin{CPK@option}{lnag}
% Scoil Léann na Gaeilge~/ School of Irish Learning (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{lnag}{%
  \school{Scoil Léann na Gaeilge~/ School of Irish Learning}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Modern Irish}
% \begin{CPK@option}{modirish}
% Modern Irish (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{modirish}{%
  \department{Modern Irish}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Music}
% \begin{CPK@option}{music}
% Music (department) in Music and Theatre (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{music}{%
  \school{Music and Theatre}
  \department{Music}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Nua-Ghaeilge}
% \begin{CPK@option}{nuag}
% Nua-Ghaeilge (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{nuag}{%
  \department{Nua-Ghaeilge}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Philosophy}
% \begin{CPK@option}{phil}
% Philosophy (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{phil}{%
  \department{Philosophy}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Geography and Archaeology: The Human Environment}
% \begin{CPK@option}{planning}
% Geography and Archaeology: The Human Environment (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{planning}{%
  \school{Geography and Archaeology: The Human Environment}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Politics}
% \begin{CPK@option}{politics}
% Politics (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{politics}{%
  \department{Politics}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Study of Religions}
% \begin{CPK@option}{relig}
% Study of Religions (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{relig}{%
  \department{Study of Religions}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Sean- agus Meán-Ghaeilge}
% \begin{CPK@option}{smg}
% Sean- agus Meán-Ghaeilge (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{smg}{%
  \department{Sean- agus Meán-Ghaeilge}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Sociology}
% \begin{CPK@option}{socio}
% Sociology (department); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{socio}{%
  \department{Sociology}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Sociology and Philosophy}
% \begin{CPK@option}{sociophil}
% Sociology and Philosophy (school); 
% using the Harvard citation format
% from the \verb`dcu.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (confirmed by \url{a.szakolczai@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{sociophil}{%
  \school{Sociology and Philosophy}
  \@usebib[natbib,har2nat]{dcu}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Drama and Theatre Studies}
% \begin{CPK@option}{theatre}
% Drama and Theatre Studies (department) in Music and Theatre (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{theatre}{%
  \school{Music and Theatre}
  \department{Drama and Theatre Studies}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \subsubsection{BUSLAW}
% \paragraph{Accounting and Finance}
% \begin{CPK@option}{afis}
% Accounting and Finance (department) in Faculty of Commerce (school); 
% using the Harvard citation format
% from the \verb`apsr.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{afis}{%
  \school[]{Faculty of Commerce}
  \department{Accounting and Finance}
  \@usebib[natbib,har2nat]{apsr}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Business Information Systems}
% \begin{CPK@option}{bis}
% Business Information Systems (department) in Faculty of Commerce (school); 
% using the Harvard citation format
% from the \verb`apsr.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{bis}{%
  \school[]{Faculty of Commerce}
  \department{Business Information Systems}
  \@usebib[natbib,har2nat]{apsr}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Faculty of Commerce}
% \begin{CPK@option}{commerce}
% Faculty of Commerce (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{commerce}{%
  \school[]{Faculty of Commerce}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Centre for Co-operative Studies}
% \begin{CPK@option}{coop}
% Centre for Co-operative Studies (centre) in Faculty of Commerce (school); 
% using the Harvard citation format
% from the \verb`apsr.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{coop}{%
  \school[]{Faculty of Commerce}
  \centre[]{Centre for Co-operative Studies}
  \@usebib[natbib,har2nat]{apsr}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Centre for Policy Studies}
% \begin{CPK@option}{cps}
% Centre for Policy Studies (centre) in Faculty of Commerce (school); 
% using the Harvard citation format
% from the \verb`apsr.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{cps}{%
  \school[]{Faculty of Commerce}
  \centre[]{Centre for Policy Studies}
  \@usebib[natbib,har2nat]{apsr}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Economics}
% \begin{CPK@option}{econ}
% Economics (department) in Faculty of Commerce (school); 
% using the Harvard citation format
% from the \verb`apsr.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (confirmed by \url{niall.osullivan@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{econ}{%
  \school[]{Faculty of Commerce}
  \department{Economics}
  \@usebib[natbib,har2nat]{apsr}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Food Business and Development}
% \begin{CPK@option}{foodbus}
% Food Business and Development (department) in Food and Nutritional Sciences (school); 
% using the Harvard citation format
% from the \verb`agsm.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{foodbus}{%
  \school{Food and Nutritional Sciences}
  \department{Food Business and Development}
  \@usebib[natbib,har2nat]{agsm}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Government}
% \begin{CPK@option}{govt}
% Government (department) in Faculty of Commerce (school); 
% using the Harvard citation format
% from the \verb`apsr.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{govt}{%
  \school[]{Faculty of Commerce}
  \department{Government}
  \@usebib[natbib,har2nat]{apsr}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Faculty of Law}
% \begin{CPK@option}{law}
% Faculty of Law (school); 
% using the Legal citation format
% from the \verb`jurabib.bst` \BibTeX\ style with the \textsf{jurabib} package (confirmed by \url{pflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{law}{%
  \school[]{Faculty of Law}
  \@usebib[jurabib]{jurabib}{Legal}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Management and Marketing}
% \begin{CPK@option}{mgt}
% Management and Marketing (department) in Faculty of Commerce (school); 
% using the Harvard citation format
% from the \verb`apsr.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{mgt}{%
  \school[]{Faculty of Commerce}
  \department{Management and Marketing}
  \@usebib[natbib,har2nat]{apsr}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Management and Marketing}
% \begin{CPK@option}{mktg}
% Management and Marketing (department) in Faculty of Commerce (school); 
% using the Harvard citation format
% from the \verb`apsr.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{mktg}{%
  \school[]{Faculty of Commerce}
  \department{Management and Marketing}
  \@usebib[natbib,har2nat]{apsr}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Statistics}
% \begin{CPK@option}{stats}
% Statistics (department); 
% using the Harvard citation format
% from the \verb`apsr.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{stats}{%
  \department{Statistics}
  \@usebib[natbib,har2nat]{apsr}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \subsubsection{MED}
% \paragraph{Anatomy}
% \begin{CPK@option}{anat}
% Anatomy (department); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{anat}{%
  \department{Anatomy}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Biochemistry}
% \begin{CPK@option}{biochem}
% Biochemistry (department); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{biochem}{%
  \department{Biochemistry}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Clinical Therapies}
% \begin{CPK@option}{clinther}
% Clinical Therapies (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{clinther}{%
  \school{Clinical Therapies}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Cork University}
% \begin{CPK@option}{cuh}
% Cork University (hospital); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (unconfirmed).
%    \begin{macrocode}
\DeclareOption{cuh}{%
  \hospital{Cork University}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{University Dental School and Hospital}
% \begin{CPK@option}{denthosp}
% University Dental School and Hospital (hospital); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{f.allen@ucc.ie }).
%    \begin{macrocode}
\DeclareOption{denthosp}{%
  \hospital[]{University Dental School and Hospital}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Restorative Dentistry}
% \begin{CPK@option}{dentrest}
% Restorative Dentistry (department) in Dental Hygiene (school) in University Dental School and Hospital (hospital); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{f.allen@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{dentrest}{%
  \hospital[]{University Dental School and Hospital}
  \school{Dental Hygiene}
  \department{Restorative Dentistry}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Dental Surgery}
% \begin{CPK@option}{dentsurg}
% Dental Surgery (department) in University Dental School and Hospital (hospital); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{f.allen@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{dentsurg}{%
  \hospital[]{University Dental School and Hospital}
  \department{Dental Surgery}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Epidemiology and Public Health}
% \begin{CPK@option}{epipub}
% Epidemiology and Public Health (department) in Medicine (school); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{i.perry@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{epipub}{%
  \school{Medicine}
  \department{Epidemiology and Public Health}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{General Practice}
% \begin{CPK@option}{gp}
% General Practice (department) in Medicine (school); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{gp}{%
  \school{Medicine}
  \department{General Practice}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Speech and Hearing Sciences}
% \begin{CPK@option}{hearing}
% Speech and Hearing Sciences (department) in Clinical Therapies (school); 
% using the APA citation format
% from the \verb`apacite.bst` \BibTeX\ style with the \textsf{apacite} package (confirmed by \url{F.Gibbon@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{hearing}{%
  \school{Clinical Therapies}
  \department{Speech and Hearing Sciences}
  \@usebib[apacite]{apacite}{APA}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Life Sciences}
% \begin{CPK@option}{life}
% Life Sciences (school); 
% using the Harvard citation format
% from the \verb`agsm.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{life}{%
  \school{Life Sciences}
  \@usebib[natbib,har2nat]{agsm}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Medicine}
% \begin{CPK@option}{medsch}
% Medicine (school); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{medsch}{%
  \school{Medicine}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Medicine}
% \begin{CPK@option}{medicine}
% Medicine (department) in Medicine (school); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{medicine}{%
  \school{Medicine}
  \department{Medicine}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Mercy University}
% \begin{CPK@option}{mercy}
% Mercy University (hospital); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (unconfirmed).
%    \begin{macrocode}
\DeclareOption{mercy}{%
  \hospital{Mercy University}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Nursing and Midwifery}
% \begin{CPK@option}{midwifery}
% Nursing and Midwifery (school); 
% using the Harvard citation format
% from the \verb`dcu.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (confirmed by \url{J.Hegarty@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{midwifery}{%
  \school{Nursing and Midwifery}
  \@usebib[natbib,har2nat]{dcu}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Nursing and Midwifery}
% \begin{CPK@option}{nursing}
% Nursing and Midwifery (school); 
% using the Harvard citation format
% from the \verb`dcu.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (confirmed by \url{J.Hegarty@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{nursing}{%
  \school{Nursing and Midwifery}
  \@usebib[natbib,har2nat]{dcu}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Obstetrics and Gynaecology}
% \begin{CPK@option}{obsgyn}
% Obstetrics and Gynaecology (department) in Medicine (school); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{obsgyn}{%
  \school{Medicine}
  \department{Obstetrics and Gynaecology}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Occupational Therapy}
% \begin{CPK@option}{occther}
% Occupational Therapy (department) in Clinical Therapies (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{occther}{%
  \school{Clinical Therapies}
  \department{Occupational Therapy}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Oral Health and Development}
% \begin{CPK@option}{oralhealth}
% Oral Health and Development (department) in University Dental School and Hospital (hospital); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{f.allen@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{oralhealth}{%
  \hospital[]{University Dental School and Hospital}
  \department{Oral Health and Development}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Pathology}
% \begin{CPK@option}{path}
% Pathology (department) in Medicine (school); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{path}{%
  \school{Medicine}
  \department{Pathology}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Paediatrics and Child Health}
% \begin{CPK@option}{pch}
% Paediatrics and Child Health (department) in Medicine (school); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{pch}{%
  \school{Medicine}
  \department{Paediatrics and Child Health}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Pharmacy}
% \begin{CPK@option}{pharm}
% Pharmacy (school); 
% using the Harvard citation format
% from the \verb`kluwer.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{pharm}{%
  \school{Pharmacy}
  \@usebib[natbib,har2nat]{kluwer}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Pharmacology and Therapeutics}
% \begin{CPK@option}{pharmthera}
% Pharmacology and Therapeutics (department) in Medicine (school); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{pharmthera}{%
  \school{Medicine}
  \department{Pharmacology and Therapeutics}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Physiology}
% \begin{CPK@option}{physio}
% Physiology (department); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{physio}{%
  \department{Physiology}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Psychiatry}
% \begin{CPK@option}{psychiatry}
% Psychiatry (department) in Medicine (school); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{T.Dinan@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{psychiatry}{%
  \school{Medicine}
  \department{Psychiatry}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Radiology}
% \begin{CPK@option}{radio}
% Radiology (department) in Medicine (school); 
% using the Harvard citation format
% from the \verb`agsm.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{radio}{%
  \school{Medicine}
  \department{Radiology}
  \@usebib[natbib,har2nat]{agsm}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Speech and Hearing Sciences}
% \begin{CPK@option}{speech}
% Speech and Hearing Sciences (department) in Clinical Therapies (school); 
% using the APA citation format
% from the \verb`apacite.bst` \BibTeX\ style with the \textsf{apacite} package (confirmed by \url{F.Gibbon@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{speech}{%
  \school{Clinical Therapies}
  \department{Speech and Hearing Sciences}
  \@usebib[apacite]{apacite}{APA}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Surgery}
% \begin{CPK@option}{surg}
% Surgery (department) in Medicine (school); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{surg}{%
  \school{Medicine}
  \department{Surgery}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \subsubsection{SEFS}
% \paragraph{Food Business and Development}
% \begin{CPK@option}{foodbus}
% Food Business and Development (department) in Food and Nutritional Sciences (school); 
% using the Harvard citation format
% from the \verb`agsm.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{foodbus}{%
  \school{Food and Nutritional Sciences}
  \department{Food Business and Development}
  \@usebib[natbib,har2nat]{agsm}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Statistics}
% \begin{CPK@option}{stats}
% Statistics (department); 
% using the Harvard citation format
% from the \verb`apsr.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{stats}{%
  \department{Statistics}
  \@usebib[natbib,har2nat]{apsr}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Physiology}
% \begin{CPK@option}{physio}
% Physiology (department); 
% using the Vancouver citation format
% from the \verb`vancouver.bst` \BibTeX\ style (confirmed by \url{siun.oflynn@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{physio}{%
  \department{Physiology}
  \@usebib{vancouver}{Vancouver}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Applied Mathematics}
% \begin{CPK@option}{appmaths}
% Applied Mathematics (department); 
% using the Default citation format
% from the \verb`alpha.bst` \BibTeX\ style (unconfirmed).
%    \begin{macrocode}
\DeclareOption{appmaths}{%
  \department{Applied Mathematics}
  \@usebib{alpha}{Default}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Biological, Earth and Environmental Sciences}
% \begin{CPK@option}{bees}
% Biological, Earth and Environmental Sciences (school); 
% using the Oxford citation format
% from the \verb`apsr.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (confirmed by \url{108117781@umail.ucc.ie}).
%    \begin{macrocode}
\DeclareOption{bees}{%
  \school{Biological, Earth and Environmental Sciences}
  \@usebib[natbib,har2nat]{apsr}{Oxford}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Chemistry}
% \begin{CPK@option}{chem}
% Chemistry (department) in Faculty of Science (school); 
% using the ACS citation format
% from the \verb`achemso.bst` \BibTeX\ style with the \textsf{natbib} package (confirmed by \url{j.sodeau@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{chem}{%
  \school[]{Faculty of Science}
  \department{Chemistry}
  \@usebib[natbib]{achemso}{ACS}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Process and Chemical Engineering}
% \begin{CPK@option}{chemeng}
% Process and Chemical Engineering (department); 
% using the Harvard citation format
% from the \verb`agsm.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{chemeng}{%
  \department{Process and Chemical Engineering}
  \@usebib[natbib,har2nat]{agsm}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Civil and Environmental Engineering}
% \begin{CPK@option}{civil}
% Civil and Environmental Engineering (department) in Engineering (school); 
% using the Harvard citation format
% from the \verb`agsm.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{civil}{%
  \school{Engineering}
  \department{Civil and Environmental Engineering}
  \@usebib[natbib,har2nat]{agsm}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Computer Science}
% \begin{CPK@option}{cs}
% Computer Science (department) in Faculty of Science (school); 
% using the Default citation format
% from the \verb`alpha.bst` \BibTeX\ style (unconfirmed).
%    \begin{macrocode}
\DeclareOption{cs}{%
  \school[]{Faculty of Science}
  \department{Computer Science}
  \@usebib{alpha}{Default}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Electrical and Electronic Engineering}
% \begin{CPK@option}{elec}
% Electrical and Electronic Engineering (department) in Engineering (school); 
% using the Harvard citation format
% from the \verb`agsm.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{elec}{%
  \school{Engineering}
  \department{Electrical and Electronic Engineering}
  \@usebib[natbib,har2nat]{agsm}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Engineering}
% \begin{CPK@option}{engineering}
% Engineering (school); 
% using the Harvard citation format
% from the \verb`agsm.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{engineering}{%
  \school{Engineering}
  \@usebib[natbib,har2nat]{agsm}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Food and Nutritional Sciences}
% \begin{CPK@option}{food}
% Food and Nutritional Sciences (school); 
% using the Default citation format
% from the \verb`alpha.bst` \BibTeX\ style (unconfirmed).
%    \begin{macrocode}
\DeclareOption{food}{%
  \school{Food and Nutritional Sciences}
  \@usebib{alpha}{Default}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Geology}
% \begin{CPK@option}{geol}
% Geology (department) in Faculty of Science (school); 
% using the Default citation format
% from the \verb`alpha.bst` \BibTeX\ style (unconfirmed).
%    \begin{macrocode}
\DeclareOption{geol}{%
  \school[]{Faculty of Science}
  \department{Geology}
  \@usebib{alpha}{Default}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Mathematics}
% \begin{CPK@option}{maths}
% Mathematics (department) in Mathematical Sciences (school); 
% using the Default citation format
% from the \verb`alpha.bst` \BibTeX\ style (unconfirmed).
%    \begin{macrocode}
\DeclareOption{maths}{%
  \school{Mathematical Sciences}
  \department{Mathematics}
  \@usebib{alpha}{Default}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Microbiology}
% \begin{CPK@option}{microbio}
% Microbiology (department); 
% using the Default citation format
% from the \verb`alpha.bst` \BibTeX\ style (unconfirmed).
%    \begin{macrocode}
\DeclareOption{microbio}{%
  \department{Microbiology}
  \@usebib{alpha}{Default}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Microelectronic Engineering}
% \begin{CPK@option}{microelec}
% Microelectronic Engineering (department) in Engineering (school); 
% using the Harvard citation format
% from the \verb`agsm.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{microelec}{%
  \school{Engineering}
  \department{Microelectronic Engineering}
  \@usebib[natbib,har2nat]{agsm}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Physics}
% \begin{CPK@option}{physics}
% Physics (department) in Science (school); 
% using the Transactions of the IEEE citation format
% from the \verb`ieeetr.bst` \BibTeX\ style (confirmed by \url{pjm @ucc.ie}).
%    \begin{macrocode}
\DeclareOption{physics}{%
  \school{Science}
  \department{Physics}
  \@usebib{ieeetr}{Transactions of the IEEE}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Faculty of Science}
% \begin{CPK@option}{scifac}
% Faculty of Science (school); 
% using the Default citation format
% from the \verb`alpha.bst` \BibTeX\ style (unconfirmed).
%    \begin{macrocode}
\DeclareOption{scifac}{%
  \school[]{Faculty of Science}
  \@usebib{alpha}{Default}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Zoology, Ecology and Plant Science}
% \begin{CPK@option}{zeps}
% Zoology, Ecology and Plant Science (school); 
% using the Oxford citation format
% from the \verb`oxford_en.bst` \BibTeX\ style with the \textsf{oxford} package (confirmed by \url{j.ohalloran@ucc.ie}).
%    \begin{macrocode}
\DeclareOption{zeps}{%
  \school{Zoology, Ecology and Plant Science}
  \@usebib[oxford]{oxford_en}{Oxford}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \subsubsection{INST}
% \paragraph{Irish Management}
% \begin{CPK@option}{imi}
% Irish Management (institute); 
% using the Harvard citation format
% from the \verb`dcu.bst` \BibTeX\ style with the \textsf{natbib} and \textsf{har2nat} packages (unconfirmed).
%    \begin{macrocode}
\DeclareOption{imi}{%
  \institute{Irish Management}
  \@usebib[natbib,har2nat]{dcu}{Harvard}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Tyndall National}
% \begin{CPK@option}{tyndall}
% Tyndall National (institute); 
% using the Alpha citation format
% from the \verb`alpha.bst` \BibTeX\ style (unconfirmed).
%    \begin{macrocode}
\DeclareOption{tyndall}{%
  \institute{Tyndall National}
  \@usebib{alpha}{Alpha}{}
}
%    \end{macrocode}
% \end{CPK@option}
% \subsection{Degree options}
% These are the degree options: these are static and
%       require three ancillary commands to define them in a
%       similar manner to those for the divisions. These
%       declarations are generated from an XML structure in the
%       master document.\par
% \begin{CPK@macro}{\@degreehandle}
% A handle for the degree title.\par
%    \begin{macrocode}
\def\@degreehandle{Degree of \@degree}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@degree}
% A default value.\par
%    \begin{macrocode}
\def\@degree{[Unspecified]}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\degree}
% The switch {\ttfamily{}\textbackslash{}ifthesis} is used to detect
% non-thesis use (for example when the document class is
% used for its own documentation, or for a term paper or
% essay).\par
%    \begin{macrocode}
\newif\ifthesis
\newcommand{\degree}[1]{\gdef\@degree{#1}\thesistrue}
%    \end{macrocode}
% \end{CPK@macro}
% \subsubsection{ACSSS}
% \paragraph{Doctor of Literature}
% \begin{CPK@option}{dlitt}
% Doctor of Literature; .
%    \begin{macrocode}
\DeclareOption{dlitt}{%
  \degree{Doctor of Literature}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Celtic Literature}
% \begin{CPK@option}{dlittcelt}
% Doctor of Celtic Literature; .
%    \begin{macrocode}
\DeclareOption{dlittcelt}{%
  \degree{Doctor of Celtic Literature}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Music}
% \begin{CPK@option}{dmus}
% Doctor of Music; .
%    \begin{macrocode}
\DeclareOption{dmus}{%
  \degree{Doctor of Music}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Social Science}
% \begin{CPK@option}{dsocsci}
% Doctor of Social Science; .
%    \begin{macrocode}
\DeclareOption{dsocsci}{%
  \degree{Doctor of Social Science}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Philosophy}
% \begin{CPK@option}{phd}
% Doctor of Philosophy; .
%    \begin{macrocode}
\DeclareOption{phd}{%
  \degree{Doctor of Philosophy}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Philosophy in Education~--- Structured}
% \begin{CPK@option}{phded}
% Doctor of Philosophy in Education~--- Structured; .
%    \begin{macrocode}
\DeclareOption{phded}{%
  \degree{Doctor of Philosophy in Education~--- Structured}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Philosophy in Social Sciences}
% \begin{CPK@option}{phdss}
% Doctor of Philosophy in Social Sciences; .
%    \begin{macrocode}
\DeclareOption{phdss}{%
  \degree{Doctor of Philosophy in Social Sciences}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Philosophy in Texts, Contexts and Cultures}
% \begin{CPK@option}{phdtcc}
% Doctor of Philosophy in Texts, Contexts and Cultures; .
%    \begin{macrocode}
\DeclareOption{phdtcc}{%
  \degree{Doctor of Philosophy in Texts, Contexts and Cultures}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Arts}
% \begin{CPK@option}{ma}
% Master of Arts; .
%    \begin{macrocode}
\DeclareOption{ma}{%
  \degree{Master of Arts}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Asian Business)}
% \begin{CPK@option}{mbsasian}
% Master of Business Systems (Asian Business); .
%    \begin{macrocode}
\DeclareOption{mbsasian}{%
  \degree{Master of Business Systems
          (Asian Business)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Education}
% \begin{CPK@option}{med}
% Master of Education; .
%    \begin{macrocode}
\DeclareOption{med}{%
  \degree{Master of Education}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Philosophy}
% \begin{CPK@option}{mphil}
% Master of Philosophy; .
%    \begin{macrocode}
\DeclareOption{mphil}{%
  \degree{Master of Philosophy}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Planning and Sustainable Development}
% \begin{CPK@option}{mplan}
% Master of Planning and Sustainable Development; .
%    \begin{macrocode}
\DeclareOption{mplan}{%
  \degree{Master of Planning and Sustainable Development}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Social Science}
% \begin{CPK@option}{msocsc}
% Master of Social Science; .
%    \begin{macrocode}
\DeclareOption{msocsc}{%
  \degree{Master of Social Science}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Social Work}
% \begin{CPK@option}{msw}
% Master of Social Work; .
%    \begin{macrocode}
\DeclareOption{msw}{%
  \degree{Master of Social Work}
}
%    \end{macrocode}
% \end{CPK@option}
% \subsubsection{BUSLAW}
% \paragraph{Doctor of Philosophy}
% \begin{CPK@option}{phd}
% Doctor of Philosophy; .
%    \begin{macrocode}
\DeclareOption{phd}{%
  \degree{Doctor of Philosophy}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Asian Business)}
% \begin{CPK@option}{mbsasian}
% Master of Business Systems (Asian Business); .
%    \begin{macrocode}
\DeclareOption{mbsasian}{%
  \degree{Master of Business Systems
          (Asian Business)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Business Economics}
% \begin{CPK@option}{dbe}
% Doctor of Business Economics; .
%    \begin{macrocode}
\DeclareOption{dbe}{%
  \degree{Doctor of Business Economics}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Economic Science}
% \begin{CPK@option}{deconsc}
% Doctor of Economic Science; .
%    \begin{macrocode}
\DeclareOption{deconsc}{%
  \degree{Doctor of Economic Science}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Law}
% \begin{CPK@option}{lld}
% Doctor of Law; .
%    \begin{macrocode}
\DeclareOption{lld}{%
  \degree{Doctor of Law}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Philosophy in Business Information Systems}
% \begin{CPK@option}{phdbis}
% Doctor of Philosophy in Business Information Systems; .
%    \begin{macrocode}
\DeclareOption{phdbis}{%
  \degree{Doctor of Philosophy in Business Information Systems}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Law}
% \begin{CPK@option}{llm}
% Master of Law; .
%    \begin{macrocode}
\DeclareOption{llm}{%
  \degree{Master of Law}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Law (Criminal Justice)}
% \begin{CPK@option}{llmcj}
% Master of Law (Criminal Justice); .
%    \begin{macrocode}
\DeclareOption{llmcj}{%
  \degree{Master of Law
          (Criminal Justice)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Law (e-Law)}
% \begin{CPK@option}{llme}
% Master of Law (e-Law); .
%    \begin{macrocode}
\DeclareOption{llme}{%
  \degree{Master of Law
          (e-Law)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Law (Practitioner)}
% \begin{CPK@option}{llmp}
% Master of Law (Practitioner); .
%    \begin{macrocode}
\DeclareOption{llmp}{%
  \degree{Master of Law
          (Practitioner)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Administration}
% \begin{CPK@option}{mba}
% Master of Business Administration; .
%    \begin{macrocode}
\DeclareOption{mba}{%
  \degree{Master of Business Administration}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems}
% \begin{CPK@option}{mbs}
% Master of Business Systems; .
%    \begin{macrocode}
\DeclareOption{mbs}{%
  \degree{Master of Business Systems}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Business Economics)}
% \begin{CPK@option}{mbsbe}
% Master of Business Systems (Business Economics); .
%    \begin{macrocode}
\DeclareOption{mbsbe}{%
  \degree{Master of Business Systems
          (Business Economics)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Business Information Systems)}
% \begin{CPK@option}{mbsbis}
% Master of Business Systems (Business Information Systems); .
%    \begin{macrocode}
\DeclareOption{mbsbis}{%
  \degree{Master of Business Systems
          (Business Information Systems)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Economics of Business Practice)}
% \begin{CPK@option}{mbsbp}
% Master of Business Systems (Economics of Business Practice); .
%    \begin{macrocode}
\DeclareOption{mbsbp}{%
  \degree{Master of Business Systems
          (Economics of Business Practice)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Co-operative and Social Enterprise)}
% \begin{CPK@option}{mbscse}
% Master of Business Systems (Co-operative and Social Enterprise); .
%    \begin{macrocode}
\DeclareOption{mbscse}{%
  \degree{Master of Business Systems
          (Co-operative and Social Enterprise)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Electronic Business)}
% \begin{CPK@option}{mbseb}
% Master of Business Systems (Electronic Business); .
%    \begin{macrocode}
\DeclareOption{mbseb}{%
  \degree{Master of Business Systems
          (Electronic Business)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Food Marketing)}
% \begin{CPK@option}{mbsfm}
% Master of Business Systems (Food Marketing); .
%    \begin{macrocode}
\DeclareOption{mbsfm}{%
  \degree{Master of Business Systems
          (Food Marketing)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Government)}
% \begin{CPK@option}{mbsg}
% Master of Business Systems (Government); .
%    \begin{macrocode}
\DeclareOption{mbsg}{%
  \degree{Master of Business Systems
          (Government)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Health Services Management)}
% \begin{CPK@option}{mbshsm}
% Master of Business Systems (Health Services Management); .
%    \begin{macrocode}
\DeclareOption{mbshsm}{%
  \degree{Master of Business Systems
          (Health Services Management)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Innovation in European Business)}
% \begin{CPK@option}{mbsieb}
% Master of Business Systems (Innovation in European Business); .
%    \begin{macrocode}
\DeclareOption{mbsieb}{%
  \degree{Master of Business Systems
          (Innovation in European Business)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (International Public Policy and Diplomacy)}
% \begin{CPK@option}{mbsippd}
% Master of Business Systems (International Public Policy and Diplomacy); .
%    \begin{macrocode}
\DeclareOption{mbsippd}{%
  \degree{Master of Business Systems
          (International Public Policy and Diplomacy)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Information Systems for Business Performance)}
% \begin{CPK@option}{mbsisbp}
% Master of Business Systems (Information Systems for Business Performance); .
%    \begin{macrocode}
\DeclareOption{mbsisbp}{%
  \degree{Master of Business Systems
          (Information Systems for Business Performance)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Management Information and Managerial Accounting Systems)}
% \begin{CPK@option}{mbsmimas}
% Master of Business Systems (Management Information and Managerial Accounting Systems); .
%    \begin{macrocode}
\DeclareOption{mbsmimas}{%
  \degree{Master of Business Systems
          (Management Information and Managerial Accounting Systems)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Business Systems (Management and Marketing)}
% \begin{CPK@option}{mbsmm}
% Master of Business Systems (Management and Marketing); .
%    \begin{macrocode}
\DeclareOption{mbsmm}{%
  \degree{Master of Business Systems
          (Management and Marketing)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Commerce}
% \begin{CPK@option}{mcomm}
% Master of Commerce; .
%    \begin{macrocode}
\DeclareOption{mcomm}{%
  \degree{Master of Commerce}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Commerce (Supply Chain Management~--- Lean SCM Black Belt)}
% \begin{CPK@option}{mcommbb}
% Master of Commerce (Supply Chain Management~--- Lean SCM Black Belt); .
%    \begin{macrocode}
\DeclareOption{mcommbb}{%
  \degree{Master of Commerce
          (Supply Chain Management~--- Lean SCM Black Belt)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Commerce (Business Economics)}
% \begin{CPK@option}{mcommbe}
% Master of Commerce (Business Economics); .
%    \begin{macrocode}
\DeclareOption{mcommbe}{%
  \degree{Master of Commerce
          (Business Economics)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Commerce (Government and Public Policy)}
% \begin{CPK@option}{mcommgpp}
% Master of Commerce (Government and Public Policy); .
%    \begin{macrocode}
\DeclareOption{mcommgpp}{%
  \degree{Master of Commerce
          (Government and Public Policy)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Commerce (Supply Chain Management)}
% \begin{CPK@option}{mcommscm}
% Master of Commerce (Supply Chain Management); .
%    \begin{macrocode}
\DeclareOption{mcommscm}{%
  \degree{Master of Commerce
          (Supply Chain Management)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Economic Science}
% \begin{CPK@option}{meconsc}
% Master of Economic Science; .
%    \begin{macrocode}
\DeclareOption{meconsc}{%
  \degree{Master of Economic Science}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Corporate Finance)}
% \begin{CPK@option}{msccf}
% Master of Science (Corporate Finance); .
%    \begin{macrocode}
\DeclareOption{msccf}{%
  \degree{Master of Science
          (Corporate Finance)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Financial Economics)}
% \begin{CPK@option}{mscfe}
% Master of Science (Financial Economics); .
%    \begin{macrocode}
\DeclareOption{mscfe}{%
  \degree{Master of Science
          (Financial Economics)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Health Economics)}
% \begin{CPK@option}{msche}
% Master of Science (Health Economics); .
%    \begin{macrocode}
\DeclareOption{msche}{%
  \degree{Master of Science
          (Health Economics)}
}
%    \end{macrocode}
% \end{CPK@option}
% \subsubsection{MED}
% \paragraph{Doctor of Philosophy}
% \begin{CPK@option}{phd}
% Doctor of Philosophy; .
%    \begin{macrocode}
\DeclareOption{phd}{%
  \degree{Doctor of Philosophy}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Clinical Dentistry}
% \begin{CPK@option}{dclindent}
% Doctor of Clinical Dentistry; .
%    \begin{macrocode}
\DeclareOption{dclindent}{%
  \degree{Doctor of Clinical Dentistry}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Medicine}
% \begin{CPK@option}{dmed}
% Doctor of Medicine; .
%    \begin{macrocode}
\DeclareOption{dmed}{%
  \degree{Doctor of Medicine}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Nursing Practice}
% \begin{CPK@option}{dnp}
% Doctor of Nursing Practice; .
%    \begin{macrocode}
\DeclareOption{dnp}{%
  \degree{Doctor of Nursing Practice}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Occupational Therapy}
% \begin{CPK@option}{docct}
% Doctor of Occupational Therapy; .
%    \begin{macrocode}
\DeclareOption{docct}{%
  \degree{Doctor of Occupational Therapy}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Medicine}
% \begin{CPK@option}{md}
% Doctor of Medicine; .
%    \begin{macrocode}
\DeclareOption{md}{%
  \degree{Doctor of Medicine}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Philosophy in Cancer Biology}
% \begin{CPK@option}{phdcb}
% Doctor of Philosophy in Cancer Biology; .
%    \begin{macrocode}
\DeclareOption{phdcb}{%
  \degree{Doctor of Philosophy in Cancer Biology}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Philosophy in Health Services Research}
% \begin{CPK@option}{phdhsr}
% Doctor of Philosophy in Health Services Research; .
%    \begin{macrocode}
\DeclareOption{phdhsr}{%
  \degree{Doctor of Philosophy in Health Services Research}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Obstetrics}
% \begin{CPK@option}{mao}
% Master of Obstetrics; .
%    \begin{macrocode}
\DeclareOption{mao}{%
  \degree{Master of Obstetrics}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Surgery}
% \begin{CPK@option}{mch}
% Master of Surgery; .
%    \begin{macrocode}
\DeclareOption{mch}{%
  \degree{Master of Surgery}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master in Dental Public Health}
% \begin{CPK@option}{mdph}
% Master in Dental Public Health; .
%    \begin{macrocode}
\DeclareOption{mdph}{%
  \degree{Master in Dental Public Health}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Dental Science}
% \begin{CPK@option}{mds}
% Master of Dental Science; .
%    \begin{macrocode}
\DeclareOption{mds}{%
  \degree{Master of Dental Science}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master in Sport and Exercise Medicine}
% \begin{CPK@option}{mmedsc}
% Master in Sport and Exercise Medicine; .
%    \begin{macrocode}
\DeclareOption{mmedsc}{%
  \degree{Master in Sport and Exercise Medicine}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master in Public Health}
% \begin{CPK@option}{mph}
% Master in Public Health; .
%    \begin{macrocode}
\DeclareOption{mph}{%
  \degree{Master in Public Health}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Clinical Pharmacy)}
% \begin{CPK@option}{msccp}
% Master of Science (Clinical Pharmacy); .
%    \begin{macrocode}
\DeclareOption{msccp}{%
  \degree{Master of Science
          (Clinical Pharmacy)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Evidence-Based Therapy Practice)}
% \begin{CPK@option}{mscebtp}
% Master of Science (Evidence-Based Therapy Practice); .
%    \begin{macrocode}
\DeclareOption{mscebtp}{%
  \degree{Master of Science
          (Evidence-Based Therapy Practice)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Midwifery)}
% \begin{CPK@option}{mscm}
% Master of Science (Midwifery); .
%    \begin{macrocode}
\DeclareOption{mscm}{%
  \degree{Master of Science
          (Midwifery)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Obstetrics and Gynaecology)}
% \begin{CPK@option}{mscog}
% Master of Science (Obstetrics and Gynaecology); .
%    \begin{macrocode}
\DeclareOption{mscog}{%
  \degree{Master of Science
          (Obstetrics and Gynaecology)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Occupational Health)}
% \begin{CPK@option}{mscoh}
% Master of Science (Occupational Health); .
%    \begin{macrocode}
\DeclareOption{mscoh}{%
  \degree{Master of Science
          (Occupational Health)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Pharmaceutical Technology and Quality Systems)}
% \begin{CPK@option}{mscptqs}
% Master of Science (Pharmaceutical Technology and Quality Systems); .
%    \begin{macrocode}
\DeclareOption{mscptqs}{%
  \degree{Master of Science
          (Pharmaceutical Technology and Quality Systems)}
}
%    \end{macrocode}
% \end{CPK@option}
% \subsubsection{SEFS}
% \paragraph{Doctor of Philosophy}
% \begin{CPK@option}{phd}
% Doctor of Philosophy; .
%    \begin{macrocode}
\DeclareOption{phd}{%
  \degree{Doctor of Philosophy}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Planning and Sustainable Development}
% \begin{CPK@option}{mplan}
% Master of Planning and Sustainable Development; .
%    \begin{macrocode}
\DeclareOption{mplan}{%
  \degree{Master of Planning and Sustainable Development}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Doctor of Science}
% \begin{CPK@option}{dsc}
% Doctor of Science; .
%    \begin{macrocode}
\DeclareOption{dsc}{%
  \degree{Doctor of Science}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Engineering}
% \begin{CPK@option}{me}
% Master of Engineering; .
%    \begin{macrocode}
\DeclareOption{me}{%
  \degree{Master of Engineering}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Engineering Science}
% \begin{CPK@option}{mengsc}
% Master of Engineering Science; .
%    \begin{macrocode}
\DeclareOption{mengsc}{%
  \degree{Master of Engineering Science}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Engineering Science (Information Technology in Architecture, Engineering and Construction)}
% \begin{CPK@option}{mengscit}
% Master of Engineering Science (Information Technology in Architecture, Engineering and Construction); .
%    \begin{macrocode}
\DeclareOption{mengscit}{%
  \degree{Master of Engineering Science
          (Information Technology in Architecture, Engineering and Construction)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Engineering Science (Microelectronics)}
% \begin{CPK@option}{mengscm}
% Master of Engineering Science (Microelectronics); .
%    \begin{macrocode}
\DeclareOption{mengscm}{%
  \degree{Master of Engineering Science
          (Microelectronics)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Engineering Science (Microelectronic Design)}
% \begin{CPK@option}{mengscmd}
% Master of Engineering Science (Microelectronic Design); .
%    \begin{macrocode}
\DeclareOption{mengscmd}{%
  \degree{Master of Engineering Science
          (Microelectronic Design)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Engineering Science in Mechanical Engineering (Manufacturing, Process and Automation Systems)}
% \begin{CPK@option}{mengscme}
% Master of Engineering Science in Mechanical Engineering (Manufacturing, Process and Automation Systems); .
%    \begin{macrocode}
\DeclareOption{mengscme}{%
  \degree{Master of Engineering Science in Mechanical Engineering
          (Manufacturing, Process and Automation Systems)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Engineering Science (Pharmaceutical and Biopharmaceutical Engineering)}
% \begin{CPK@option}{mengscpbe}
% Master of Engineering Science (Pharmaceutical and Biopharmaceutical Engineering); .
%    \begin{macrocode}
\DeclareOption{mengscpbe}{%
  \degree{Master of Engineering Science
          (Pharmaceutical and Biopharmaceutical Engineering)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Engineering Science (Sustainable Energy)}
% \begin{CPK@option}{mengscse}
% Master of Engineering Science (Sustainable Energy); .
%    \begin{macrocode}
\DeclareOption{mengscse}{%
  \degree{Master of Engineering Science
          (Sustainable Energy)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science}
% \begin{CPK@option}{msc}
% Master of Science; .
%    \begin{macrocode}
\DeclareOption{msc}{%
  \degree{Master of Science}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Analytical Chemistry)}
% \begin{CPK@option}{mscac}
% Master of Applied Science (Analytical Chemistry); .
%    \begin{macrocode}
\DeclareOption{mscac}{%
  \degree{Master of Applied Science
          (Analytical Chemistry)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Analysis of Pharmaceutical Compounds)}
% \begin{CPK@option}{mscapc}
% Master of Applied Science (Analysis of Pharmaceutical Compounds); .
%    \begin{macrocode}
\DeclareOption{mscapc}{%
  \degree{Master of Applied Science
          (Analysis of Pharmaceutical Compounds)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Biotechnology)}
% \begin{CPK@option}{mscb}
% Master of Applied Science (Biotechnology); .
%    \begin{macrocode}
\DeclareOption{mscb}{%
  \degree{Master of Applied Science
          (Biotechnology)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Bioinformatics with Systems Biology)}
% \begin{CPK@option}{mscbsb}
% Master of Applied Science (Bioinformatics with Systems Biology); .
%    \begin{macrocode}
\DeclareOption{mscbsb}{%
  \degree{Master of Applied Science
          (Bioinformatics with Systems Biology)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Co-operative Organisation/Food Marketing/Rural Development)}
% \begin{CPK@option}{msccoop}
% Master of Science (Co-operative Organisation/Food Marketing/Rural Development); .
%    \begin{macrocode}
\DeclareOption{msccoop}{%
  \degree{Master of Science
          (Co-operative Organisation/Food Marketing/Rural Development)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Ecological Assessment)}
% \begin{CPK@option}{mscea}
% Master of Applied Science (Ecological Assessment); .
%    \begin{macrocode}
\DeclareOption{mscea}{%
  \degree{Master of Applied Science
          (Ecological Assessment)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Environmental Analytical Chemistry)}
% \begin{CPK@option}{msceac}
% Master of Applied Science (Environmental Analytical Chemistry); .
%    \begin{macrocode}
\DeclareOption{msceac}{%
  \degree{Master of Applied Science
          (Environmental Analytical Chemistry)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Food Business)}
% \begin{CPK@option}{mscfb}
% Master of Science (Food Business); .
%    \begin{macrocode}
\DeclareOption{mscfb}{%
  \degree{Master of Science
          (Food Business)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Food Microbiology)}
% \begin{CPK@option}{mscfm}
% Master of Applied Science (Food Microbiology); .
%    \begin{macrocode}
\DeclareOption{mscfm}{%
  \degree{Master of Applied Science
          (Food Microbiology)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Food Science)}
% \begin{CPK@option}{mscfs}
% Master of Applied Science (Food Science); .
%    \begin{macrocode}
\DeclareOption{mscfs}{%
  \degree{Master of Applied Science
          (Food Science)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Geographical Information Systems and Remote Sensing)}
% \begin{CPK@option}{mscgis}
% Master of Applied Science (Geographical Information Systems and Remote Sensing); .
%    \begin{macrocode}
\DeclareOption{mscgis}{%
  \degree{Master of Applied Science
          (Geographical Information Systems and Remote Sensing)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Marine Biology)}
% \begin{CPK@option}{mscmb}
% Master of Applied Science (Marine Biology); .
%    \begin{macrocode}
\DeclareOption{mscmb}{%
  \degree{Master of Applied Science
          (Marine Biology)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Mathematical Modelling and Scientific Computing)}
% \begin{CPK@option}{mscmmsc}
% Master of Applied Science (Mathematical Modelling and Scientific Computing); .
%    \begin{macrocode}
\DeclareOption{mscmmsc}{%
  \degree{Master of Applied Science
          (Mathematical Modelling and Scientific Computing)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Nutritional Sciences)}
% \begin{CPK@option}{mscns}
% Master of Applied Science (Nutritional Sciences); .
%    \begin{macrocode}
\DeclareOption{mscns}{%
  \degree{Master of Applied Science
          (Nutritional Sciences)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Rural Development)}
% \begin{CPK@option}{mscrd}
% Master of Science (Rural Development); .
%    \begin{macrocode}
\DeclareOption{mscrd}{%
  \degree{Master of Science
          (Rural Development)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Applied Science (Software and Systems for Mobile Networks)}
% \begin{CPK@option}{mscssmn}
% Master of Applied Science (Software and Systems for Mobile Networks); .
%    \begin{macrocode}
\DeclareOption{mscssmn}{%
  \degree{Master of Applied Science
          (Software and Systems for Mobile Networks)}
}
%    \end{macrocode}
% \end{CPK@option}
% \paragraph{Master of Science (Technology Management)}
% \begin{CPK@option}{msctm}
% Master of Science (Technology Management); .
%    \begin{macrocode}
\DeclareOption{msctm}{%
  \degree{Master of Science
          (Technology Management)}
}
%    \end{macrocode}
% \end{CPK@option}
% \subsection{Other options}\label{options}
% The remaining options mainly affect formatting.\par
% \subsubsection{Draft and final modes}
% \begin{CPK@macro}{\class@mode}
% Draft mode is the default, but we define a macro to
%       allow it to be passed through to the \textsf{report}
%       class as a default.\par
%    \begin{macrocode}
\def\class@mode{draft}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@environment}{draft}
% We set the overfull rule as normal for draft mode,
%       and set the running footer to indicate draft mode for
%       activation at the end of processing, once the
%       \textsf{fancyhdr} package has been loaded. It
%       also sets {\ttfamily{}\textbackslash{}sloppy} and
%       {\ttfamily{}\textbackslash{}raggedbottom}, as these are likely to
%       prove useful in complex texts with substantial amounts
%       of mixed formatting (mathematics, figures, tables, long
%       words, etc).\par
%    \begin{macrocode}
\def\@revdate{\relax}
\DeclareOption{draft}{\setlength\overfullrule{5pt}%
  \def\class@mode{draft}%
  \sloppy\raggedbottom
  \AtEndOfClass{%
    \lfoot{\scriptsize\ttfamily Draft: \jobname}%
    \rfoot{\scriptsize\ttfamily 
           \if\relax\@revdate
             \TODAY T\now:00\else\@revdate\fi}}%
  \typeout{DRAFT MODE}}
\newcommand{\revdate}[1]{\gdef\@revdate{#1}}
%    \end{macrocode}
% \end{CPK@environment}
% \begin{CPK@environment}{final}
% The final-mode setting sets the overfull rule to
%       nothing, records the status in
%       {\ttfamily{}\textbackslash{}class@mode}, and sets the same
%       tolerances as for draft mode.\par
%    \begin{macrocode}
\DeclareOption{final}{\setlength\overfullrule{0pt}%
  \def\class@mode{final}%
  \sloppy\raggedbottom
  \typeout{Final mode}}
%    \end{macrocode}
% \end{CPK@environment}
% \subsubsection{Type size and paper size}
% \begin{CPK@macro}{\class@size}
% Provide a similar recording feature to pass the size
%       option through to the \textsf{report} class. The
%       default is 12pt.\par
%    \begin{macrocode}
\def\class@size{12pt}
\DeclareOption{10pt}{\def\class@size{10pt}}
\DeclareOption{11pt}{\def\class@size{11pt}}
\DeclareOption{12pt}{\def\class@size{12pt}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\class@paper}
% The same applies to passing the paper size. Only A4
%       and Letter are relevant here.\par
%    \begin{macrocode}
\def\class@paper{a4paper}
\DeclareOption{a4paper}{\def\class@paper{a4paper}}
\DeclareOption{letterpaper}{\def\class@paper{letterpaper}}
%    \end{macrocode}
% \end{CPK@macro}
% \subsubsection{Turning off the Lists of Tables and Figures}
% Production of a List of Tables and a List of Figures is
%     automated: if no figure or table is used, then no list is
%     produced.\par
% \begin{CPK@option}{nolot}
% Allow thesis not to have any List of Tables with the
%       \textbf{\texttt{nolot}} option and the {\ttfamily{}\textbackslash{}iflot} switch.\par
%    \begin{macrocode}
\newif\iflot\lottrue
\DeclareOption{nolot}{\lotfalse}
%    \end{macrocode}
% \end{CPK@option}
% \begin{CPK@option}{nolof}
% Allow thesis not to have any List of Figures with
%       the \textbf{\texttt{nolof}} option and the {\ttfamily{}\textbackslash{}iflof} switch.\par
%    \begin{macrocode}
\newif\iflof\loftrue
\DeclareOption{nolof}{\loffalse}
%    \end{macrocode}
% \end{CPK@option}
% At the end of the document, the counters for figures and
%     tables are tested, and the false value written to the
%     auxiliary file, where it will be detected on the next
%     pass.\par
% \iffalse
%% v1.19 2014/05/30 These are now separate counters to reflect total figs and tables, because the normal counters get reset at the start of each chapter
% \fi
% \changes{v1.19}{2014/05/30}{These are now separate counters to reflect total figs and tables, because the normal counters get reset at the start of each chapter}
%    \begin{macrocode}
\newcounter{UCC@totfig}
\newcounter{UCC@tottab}
\AtBeginDocument{%
  \let\UCC@end@figure\endfigure
  \newcommand{\UCC@endfigure}{\UCC@end@figure\global\advance\c@UCC@totfig by1}
  \let\endfigure\UCC@endfigure
  \let\UCC@end@table\endtable
  \newcommand{\UCC@endtable}{\UCC@end@table\global\advance\c@UCC@tottab by1}
  \let\endtable\UCC@endtable
}
\AtEndDocument{%
  \ifnum\c@UCC@totfig=0 \write\@mainaux{%
    \string\global\string\loffalse}\fi
  \ifnum\c@UCC@tottab=0 \write\@mainaux{%
    \string\global\string\lotfalse}\fi
}
%    \end{macrocode}
% \begin{CPK@option}{shorttoc}
% Allow the Table of Contents to be limited to
%       subsections\par
%    \begin{macrocode}
\newif\ifshorttoc\shorttocfalse
\DeclareOption{shorttoc}{\shorttoctrue}
%    \end{macrocode}
% \end{CPK@option}
% \subsubsection{Irish-language theses}
% \begin{CPK@environment}{gaeilge}
% Provide for theses in Irish. This option loads the
%       \textsf{babel} package with the
%       \textbf{\texttt{english}} and \textbf{\texttt{irish}}
%       options, with \textbf{\texttt{irish}} in the last place
%       as the default language for the document. It also loads
%       the \textsf{eiad} font package for sean-chló
%       type.\par
%    \begin{macrocode}
\DeclareOption{gaeilge}{%
%    \end{macrocode}
% At the end of the package processing, it makes some
%       changes to tokens which are not handled by the
%       \textsf{babel} package
%       ({\ttfamily{}\textbackslash{}institution} [defined in this
%       package], {\ttfamily{}\textbackslash{}ackname} [defined in the
%       package], and {\ttfamily{}\textbackslash{}today} [defined by
%       \LaTeX{}]).\par
%    \begin{macrocode}
  \AtEndOfClass{%
    \RequirePackage[english,irish]{babel}%
    \RequirePackage{eiad}%
    \institution{\textsc{\large 
      Col\'aiste Naisi\'unta na h\'Eireann, Corcaigh}}
    \renewcommand\ackname{Bu\'\i ochas}
    \def\today{\number\day\space\ifcase\month\or
      Ean\'a\i r\or Feabhra\or M\'arta\or A\i bre\'an\or 
      Bealta\i ne\or Me\i theamh\or U\'u\i l\or L\'unasa\or 
      Me\'an F\'omha\i r\or De\i readh F\'omha\i r\or 
      Samha\i n\or M\'\i\ na Nollag\fi\space
      \number\year}%
%    \end{macrocode}
% Finally, we change the tokens for the handles
%       previously defined for the division and degree options
%       above; and we preset {\ttfamily{}\textbackslash{}raggedright} because the
%       hyphenation of Irish is widely regarded as
%       problematic.\par
%    \begin{macrocode}
  \def\@schoolhandle{Scoil an}
    \def\@departmenthandle{Roinn an}
    \def\@institutehandle{Institúid }
    \def\@hospitalhandle{Spidéal }
    \def\@centrehandle{Lárionad}
    \def\@unithandle{???}
    \def\@degreehandle{???}
    \raggedright
}}
%    \end{macrocode}
% \end{CPK@environment}
% \subsubsection{Chinese, Japanese, and Korean}
% \begin{CPK@option}{cjk}
% CJK setting needs the \textsf{CJK} package preloaded, so we
%       flag it with an option in order to activate it later via
%       the {\ttfamily{}\textbackslash{}ifcjk}
%       switch.\par
%    \begin{macrocode}
\newif\ifcjk\cjkfalse
\DeclareOption{cjk}{\cjktrue}
%    \end{macrocode}
% \end{CPK@option}
% \subsubsection{Wordprocessor emulation}
% \begin{CPK@environment}{wp}
% This enables the formatting to resemble the
%       \emph{Word} defaults. This too is
%       experimental.\par
%    \begin{macrocode}
\DeclareOption{wp}{%
  \AtBeginDocument{%
    \everypar{\vrule depth.2ex width0pt}%
    \RequirePackage{pslatex,ragged2e}%
    \RaggedRight
    \hyphenpenalty=99999 \exhyphenpenalty=99999
    \def\@makechapterhead#1{%
      \begin{center}\normalfont
	\ifnum \c@secnumdepth >\m@ne
	\if@mainmatter
	\LARGE{\sffamily{\@chapapp}\space 
	  \LARGE\thechapter}%
	\par\nobreak
	\vspace*{2\baselineskip}%
	\fi
	\fi
	\interlinepenalty\@M
	\Huge\sffamily #1\par\nobreak
	\vspace*{3\baselineskip}%
    \end{center}}%
    \renewcommand\section{%
      \@startsection{section}{1}{\z@}%
        {-2\baselineskip}%
        {\baselineskip}%
        {\normalfont\sffamily\LARGE\bfseries}}%
    \renewcommand\subsection{%
      \@startsection{subsection}{2}{\z@}%
        {-2\baselineskip}%
        {\baselineskip}%
        {\normalfont\sffamily\Large\bfseries}}%
    \renewcommand\subsubsection{%
      \@startsection{subsubsection}{3}{\z@}%
        {-\baselineskip}%
        {\baselineskip}%
        {\normalfont\sffamily\large\bfseries}}%
    \renewcommand\paragraph{%
      \@startsection{paragraph}{4}{\z@}%
        {\baselineskip}%
        {-.5\baselineskip}%
        {\normalfont\sffamily\normalsize}}%
    \let\subsubsubsection\paragraph
    \renewcommand\subparagraph{%
      \@startsection{subparagraph}{5}{\parindent}%
        {\baselineskip}%
        {-.1pt}%
        {\normalfont\sffamily\normalsize\itshape}}%
    \let\subsubsubsubsection\subparagraph
    \setcounter{secnumdepth}{-1}
    \let\@makefntext\oldfntext
    \renewcommand{\footnoterule}{\par\vspace*{1pc}}%
    \pagestyle{fancy}%
    \lhead{}\rhead{}\chead{}%
    \lfoot{}\cfoot{\thepage}\rfoot{}%
    \renewcommand{\headrulewidth}{0pt}%
    \def\TeX{TeX}\def\LaTeX{LaTeX}\def\BIBTeX{BibTeX}
    \doublespacing\raggedbottom
    \typeout{Wordprocessor-style formatting}}}%
%    \end{macrocode}
% \end{CPK@environment}
% \subsubsection{Justification, indentation, and paragraph-spacing}
% This is a much-argued area.\par
% \begin{CPK@macro}{\ifjustified}
% Documents printed on office-size paper do not read
%       easily when justified with long line-lengths such as those
%       effective when the Registrar's Rules are applied to A4
%       or Letter paper. The default is therefore for
%       justification to be turned off, but the
%       \textbf{\texttt{justified}} option is provided to allow
%       it to be turned back on by setting the {\ttfamily{}\textbackslash{}ifjustified} switch.\par
% \iffalse
%% v0.93 2011/05/01 Added justified in response to user queries
% \fi
% \changes{v0.93}{2011/05/01}{Added justified in response to user queries}
%    \begin{macrocode}
\newif\ifjustified
\DeclareOption{justified}{\justifiedtrue}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\ifindented}
% However, it is also easier to read long structured
%       documents when the paragraphs are
%       \emph{not} set snug with indentation, like
%       a book, but spaced out (and therefore unindented, as you
%       never use indentation when using paragraph-space in
%       Anglo-American printing). We therefore flag indentation
%       in an option which sets the {\ttfamily{}\textbackslash{}ifindented} switch, so that it
%       can be set or unset later, along with paragraph-spacing
%       using the \textsf{parskip} package.\par
%    \begin{macrocode}
\newif\ifindented\indentedfalse
\DeclareOption{indented}{\indentedtrue}
%    \end{macrocode}
% \end{CPK@macro}
% \subsubsection{Running headers and footers}
% \begin{CPK@macro}{\iffancy}
% Because theses are long documents, and because parts
%       or all of them are likely to be reprinted or even
%       photocopied at some stage, it is important that every
%       page should be identifiable in isolation. The
%       \textsf{fancyhdr} package is used to do this,
%       but some users were insistent that they did not want
%       running headers and footers, so the
%       \textbf{\texttt{plainheaders}} allows it to be turned off
%       via the {\ttfamily{}\textbackslash{}iffancy}
%       switch.\par
%    \begin{macrocode}
\newif\iffancy
\fancytrue
\DeclareOption{plainheaders}{\fancyfalse}
%    \end{macrocode}
% \end{CPK@macro}
% \subsubsection{Dissertations, term papers, and essays}
% WARNING: EXPERIMENTAL\par
% \iffalse
%% v0.97 2012/03/31 Added mdiss option
% \fi
% \changes{v0.97}{2012/03/31}{Added mdiss option}
% \begin{CPK@option}{mdiss}
% This is for minor dissertations.\par
%    \begin{macrocode}
\newif\ifdiss
\DeclareOption{mdiss}{%
  \disstrue
  \fancyfalse
}
%    \end{macrocode}
% \end{CPK@option}
% \begin{CPK@option}{termpaper}
% This is for term papers.\par
%    \begin{macrocode}
\newif\iftermpaper
\DeclareOption{termpaper}{%
  \AtEndOfClass{%
    \degree{}%
    \def\@degree{\relax}%
    \degreefalse}%
  \typeout{Term paper}}
%    \end{macrocode}
% \end{CPK@option}
% \begin{CPK@option}{essay}
% This is for undegraduate essays.\par
%    \begin{macrocode}
\newif\ifessay
\DeclareOption{essay}{%
  \AtEndOfClass{%
    \degree{}%
    \def\@degree{\relax}%
    \degreefalse}%
  \typeout{Essay}}
%    \end{macrocode}
% \end{CPK@option}
% \subsubsection{Two-sided output}
% These are normally printed on one side of the paper
%     for submission, especially for externs to read.\par
% The \textbf{\texttt{twoside}} is available for when a
%     very long thesis needs to economise on paper, or when the
%     thesis is being bound as a book.\par
%    \begin{macrocode}
\newif\ifUCC@oneside
\UCC@onesidetrue
\def\UCC@sided{oneside}
\DeclareOption{oneside}{
  \UCC@onesidetrue
  \gdef\UCC@sided{oneside}
}
\DeclareOption{twoside}{
  \UCC@onesidefalse
  \gdef\UCC@sided{twoside,openright}
}
%% added openright for Ethan Soudi (untested)
%    \end{macrocode}
% \subsubsection{Applying the options}
% At last, issue an error message for any bogus or
%   unsupported options:\par
%    \begin{macrocode}
\DeclareOption*{%
   \PackageWarning{uccthesis}{Unknown option ‘\CurrentOption’; 
     please Read The Fine Manual}%
}
%    \end{macrocode}
% and process those we support, and then load the
%     \textsf{report} document class with the values
%     we have gathered above.\par
%    \begin{macrocode}
\ProcessOptions\relax
\LoadClass[\class@mode,titlepage,\UCC@sided,\class@size,
           \class@paper]{report}
%    \end{macrocode}
%\iffalse
%%
%% Packages required
%% 
% \fi
% \subsection{Packages required for the class}\label{clspackages}
% \begin{CPK@package}{inputenc}
% UTF-8 is the default character set, to allow for use of
% any character in any writing system. Some characters are not
% specified for all fonts, so may have to be specified
% manually.
% \iffalse
%% 
%% UTF-8 is the default character set, to allow for use of any character
%% in any writing system. Some characters are not specified for all
%% fonts, so may have to be specified manually.
% \fi
%    \begin{macrocode}
\RequirePackage[utf8x]{inputenc}[2008/03/30]
\PrerenderUnicode{–}
\PrerenderUnicode{š}
\PrerenderUnicode{ć}
\PrerenderUnicode{Å}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{fontenc}
% Extended font encoding to handle UTF-8.
% \iffalse
%% 
%% Extended font encoding to handle UTF-8.
% \fi
%    \begin{macrocode}
\RequirePackage[T1]{fontenc}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{geometry}
% Package for establishing margins and text area.
% Sets the page size to values within the Registrar's specification. This has the effect of making the textwidth 6¼″ (16cm) and the textheight 9″ (23cm) on an A4 page. The headheight is set to accommodate the default running headers.
% \iffalse
%% 
%% Package for establishing margins and text area.
% \fi
%    \begin{macrocode}
\RequirePackage[right=2.5cm,top=3cm,bottom=3cm,
  left=4cm,headheight=22pt]{geometry}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{lmodern}
% The updated Computer Modern typeface as the default.
% \iffalse
%% 
%% The updated Computer Modern typeface as the default.
% \fi
%    \begin{macrocode}
\RequirePackage{lmodern}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{url}
% Handling of URI formatting.
% This is required in some bibliographic formats.
% \iffalse
%% 
%% Handling of URI formatting.
% \fi
%    \begin{macrocode}
\RequirePackage[obeyspaces,hyphens,spaces,
  lowtilde]{url}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{graphicx}
% Provide for graphics (PNG, JPG, or PDF format (only) for
% pdflatex; EPS format (only) for standard \LaTeX{}).
% \iffalse
%% 
%% Provide for graphics (PNG, JPG, or PDF format (only) for pdflatex;
%% EPS format (only) for standard LaTeX).
% \fi
%    \begin{macrocode}
\RequirePackage{graphicx}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{array}
% Additional column formatting for tables.
% \iffalse
%% 
%% Additional column formatting for tables.
% \fi
%    \begin{macrocode}
\RequirePackage{array}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{calc}
% Required for the calculation of extra widths for margin
% adjustment.
% \iffalse
%% 
%% Required for the calculation of extra widths for margin adjustment.
% \fi
%    \begin{macrocode}
\RequirePackage{calc}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{soul}
% Provides letter-spacing, strikeout, and underlining.
% Used for letter-spacing in the title page.
% \iffalse
%% 
%% Provides letter-spacing, strikeout, and underlining.
% \fi
%    \begin{macrocode}
\RequirePackage{soul}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{textcomp}
% Additional commands for common symbols and punctuation.
% \iffalse
%% 
%% Additional commands for common symbols and punctuation.
% \fi
%    \begin{macrocode}
\RequirePackage{textcomp}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{ucccrest}
% University College Cork crest (restricted).
% Required for the title page.
% \iffalse
%% 
%% University College Cork crest (restricted).
% \fi
%    \begin{macrocode}
\RequirePackage{ucccrest}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{setspace}
% Provide 1½ or double line spacing.
% \iffalse
%% 
%% Provide 1½ or double line spacing.
% \fi
%    \begin{macrocode}
\RequirePackage{setspace}
%    \end{macrocode}
%  \end{CPK@package}
% \begin{CPK@package}{float}
% Allows redesigning of floats and creation of new float
%       types.
% \iffalse
%% 
%% Allows redesigning of floats and creation of new float types.
% \fi
%    \begin{macrocode}
\RequirePackage{float}
%    \end{macrocode}
%  \end{CPK@package}
% 
% \subsection{Modifications to the \textsf{report} class
% and packages}\label{packagemods}
% Now that the \textsf{report} class and the
%   packages are loaded, we can start making the necessary
%   changes.\par
% \begin{CPK@macro}{\geometry}
% Fix the geometry for two-sided work.\par
%    \begin{macrocode}
\ifUCC@oneside
  \newgeometry{left=4cm,right=2.5cm,top=3cm,bottom=3cm,
	      headheight=22pt}
\else
  \newgeometry{inner=4cm,outer=2.5cm,top=3cm,bottom=3cm,
               headheight=22pt,twoside}
\fi
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\cjktext}
% Here we use the flagged setting specified earlier to
%       ensure UTF-8 character encoding is used to invoke the
%       \textsf{CJK} package and the
%       \textbf{\texttt{cjk}} option with the {\ttfamily{}\textbackslash{}ifcjk} switch.\par
%    \begin{macrocode}
\ifcjk
  \RequirePackage[encapsulated]{CJK}
  \newcommand{\cjktext}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}
\fi
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\bibname}
% Call the references References, not Bibliography.\par
%    \begin{macrocode}
\renewcommand{\bibname}{References}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@package}{natbib}
% Test dissertations with natbib.\par
%    \begin{macrocode}
\ifdiss
    \RequirePackage{natbib}
    \renewcommand{\thesection}{\arabic{section}}
    \bibpunct[: ]{(}{)}{;}{a}{,}{,}
    \setlength{\parskip}{.666\baselineskip plus1ex minus1ex}
    \renewenvironment{thebibliography}[1]
     {\ifUCC@oneside\clearpage\else\cleardoublepage\fi
      \section*{References}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\fi
%    \end{macrocode}
% \end{CPK@package}
% \begin{CPK@macro}{\ifjustified}
% The flags implementing [re-]justification and
%       [re-]indentation explained above are used here to
%       control loading of the \textsf{parskip},
%       \textsf{ccaption}, and
%       \textsf{footmisc} packages.\par
% Justified text, signalled with {\ttfamily{}\textbackslash{}ifjustified} requires only
%       \textsf{footmisc}, and only with the
%       \textbf{\texttt{bottom,stable}} options, because
%       \LaTeX{}'s default is to justify everything.\par
% \iffalse
%% v0.94 2012/03/19 updated (manual comment)
% \fi
% \changes{v0.94}{2012/03/19}{updated (manual comment)}
%    \begin{macrocode}
\ifjustified
  \RequirePackage[bottom,stable]{footmisc}
%    \end{macrocode}
% On the other hand, unjustified text (the default)
%       requires the \textsf{ccaption} package and its
%       re-setting of the captioning to be unjustified; and the
%       \textbf{\texttt{ragged}} option to the
%       \textsf{footmisc} package.\par
%    \begin{macrocode}
\else
  \RequirePackage{ccaption}
  \captionstyle{\raggedright}%
  \RequirePackage[bottom,ragged,stable]{footmisc}
  \raggedright
\fi
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\ifindented}
% Unindented text is the default, so it gets turned on
%       here, along with paragraph-spacing, unless the
%       \textbf{\texttt{indented}} option has been specified,
%       which sets the {\ttfamily{}\textbackslash{}ifindented}.\par
%    \begin{macrocode}
\ifindented
  \parindent1.5em
\else
  \RequirePackage{parskip}
\fi
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@length}{\UCC@textbodywidth}
% The default running headers and footers can be
%       defeated by using the \textbf{\texttt{plainheaders}}
%       option, so the loading of the
%       \textsf{fancyhdr} package is controlled by the
%       {\ttfamily{}\textbackslash{}iffancy} switch.\par
% \iffalse
%% v1.11 2013/07/23 Added replication of columnwidth for use in headers to avoid conflict with longtable and lscape.
% \fi
% \changes{v1.11}{2013/07/23}{Added replication of columnwidth for use in headers to avoid conflict with longtable and lscape.}
%    \begin{macrocode}
\newlength{\UCC@textbodywidth}
\setlength{\UCC@textbodywidth}{\textwidth}
\iffancy
  \message{Fancy mode }%
  \RequirePackage{fancyhdr}
  \pagestyle{fancy}
%    \end{macrocode}
% We set the default page style to fancy. Bear in mind
%       here that although we are using the
%       \textsf{report} class as our basis, it is
%       single-sided bt default, but we need to accommodate
%       twosided usage.\par
% \iffalse
%% v1.00 2012/06/15 Made plain style for chapter starts retain the page number
% \fi
% \changes{v1.00}{2012/06/15}{Made plain style for chapter starts retain the page number}
% \iffalse
%% v1.10 2013/07/09 Added specs for twosided fancy headers
% \fi
% \changes{v1.10}{2013/07/09}{Added specs for twosided fancy headers}
%    \begin{macrocode}
  \ifUCC@oneside
    \message{One-sided plain}%
    \fancypagestyle{plain}{%
      \fancyhf{}
      \cfoot{\thepage}%
      \renewcommand{\headrulewidth}{0pt}
      \renewcommand{\footrulewidth}{0pt}}
  \else
    \message{Two-sided plain}%
    \fancypagestyle{plain}{%
      \fancyhf{}
      \fancyfoot[CO,CE]{\thepage}%
      \renewcommand{\headrulewidth}{0pt}
      \renewcommand{\footrulewidth}{0pt}}
  \fi
%    \end{macrocode}
% The left-hand running header checks to see if the
%       right and left marks are the same: if so, do nothing
%       (ie, leave the header as it is); otherwise, use the left
%       mark (the chapter title). As chapter titles can be quite
%       long, we set them in a {\ttfamily{}\textbackslash{}parbox} just under half a
%       page-width wide, so they will wrap and not interfere
%       with the right-hand running header\dots{}\par
%    \begin{macrocode}
  \fancyhf{}
  \newlength{\rheadhang}
  \settowidth{\rheadhang}{\footnotesize\thechapter.\space}
  \ifUCC@oneside
    \message{One-sided fancy headers}%
    \lhead{\ifthenelse{\equal{\leftmark}{\rightmark}}{}{%
      \footnotesize\scshape\parbox[b]{.475\UCC@textbodywidth}{%
        \hangindent\rheadhang\hangafter1\raggedright
          {\let\\\space\leftmark}}}}
%    \end{macrocode}
% \dots{}which contains the section title in the
%     right mark, which we typeset exactly the same way, except
%     that it is made flush right for symmetry. There is no
%     centre running header.\par
%    \begin{macrocode}
    \rhead{\footnotesize\itshape\parbox[b]{.475\UCC@textbodywidth}{%
      \flushright{\let\\\space\rightmark}}}
    \chead{}
  \else
    \message{Two-sided fancy headers}%
    \fancyhead[LE]{\ifthenelse{\equal{\leftmark}{\rightmark}}{}{%
      \footnotesize\scshape\parbox[b]{\UCC@textbodywidth}{%
        \hangindent\rheadhang\hangafter1\raggedright
          {\let\\\space\leftmark}}}}
    \fancyhead[RO]{\footnotesize\itshape
      \parbox[b]{\UCC@textbodywidth}{%
      \flushright{\let\\\space\rightmark}}}
  \fi
%    \end{macrocode}
% The running footers are different on fancy and plain
%       pages: on the left goes the title; on the right goes the
%       author; but on plain pages they are left empty. The
%       centre running footer always contains the page number,
%       as required by the Registrar's Rules.\par
% \iffalse
%% v0.91 2011/04/28 Zapped the intrusive double backslash in titles affecting the running footers
% \fi
% \changes{v0.91}{2011/04/28}{Zapped the intrusive double backslash in titles affecting the running footers}
% \iffalse
%% v0.99 2012/04/15 Italicised the thesis title in the footer
% \fi
% \changes{v0.99}{2012/04/15}{Italicised the thesis title in the footer}
%    \begin{macrocode}
  \ifUCC@oneside
    \message{One-sided fancy footers}%
    \lfoot{\fancyplain{}{\footnotesize
      \parbox[t]{.475\UCC@textbodywidth}{%
        \itshape\raggedright{\@@title}}}}% 
    \rfoot{\fancyplain{}{\footnotesize\@author}}
    \cfoot{\fancyplain{\small\thepage}{\small\thepage}}
  \else
    \message{Two-sided fancy footers}%
    \fancyfoot[LE]{\fancyplain{}{\footnotesize
       \parbox[t]{.475\UCC@textbodywidth}{%
         \itshape\raggedright{\@@title}}}}
    \fancyfoot[RO]{\fancyplain{}{\footnotesize\@author}}
    \fancyfoot[CE,CO]{\fancyplain{\small\thepage}{\small\thepage}}
  \fi
%    \end{macrocode}
% Finally, we set the header and footer rules to null,
%       and we implement the chapter and section marking to
%       gather the current titling in
%       {\ttfamily{}\textbackslash{}chaptermark} and
%       {\ttfamily{}\textbackslash{}sectionmark}, and ensure that the
%       default headers do not perform any uppercasing by
%       setting the {\ttfamily{}\textbackslash{}ps@headings} command to
%       null.\par
% \iffalse
%% v0.99 2012/04/15 Fixed uppercased headings at last
% \fi
% \changes{v0.99}{2012/04/15}{Fixed uppercased headings at last}
%    \begin{macrocode}
  \addtolength{\headheight}{10pt}
  \renewcommand{\headrulewidth}{0pt}
\else
  \message{^MPlain (non-fancy) mode }%
\fi
\renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}{}}
\def\ps@headings{}
%    \end{macrocode}
% \end{CPK@length}
% \begin{CPK@macro}{\now}
% Calculate the time of day and provide for a
%       timestamp to identify draft versions.\par
% \iffalse
%% v0.70 2010/05/29 Added timestamp
% \fi
% \changes{v0.70}{2010/05/29}{Added timestamp}
% \iffalse
%% v0.96 2012/03/23 Simplified now, added adobedate
% \fi
% \changes{v0.96}{2012/03/23}{Simplified now, added adobedate}
%    \begin{macrocode}
\newcounter{hours}
\newcounter{minutes}
\newcounter{temp}
\setcounter{hours}{\time}%
\setcounter{minutes}{\value{hours}}%
\divide\c@hours by60 % hours is now right
\setcounter{temp}{\value{hours}}%
\multiply\c@temp by60 % integer part to deduct
\addtocounter{minutes}{-\value{temp}}% make deduction
\newcommand{\now}{% \time is in minutes since midnight
  \ifnum\c@hours>9\else0\fi\thehours:%
  \ifnum\c@minutes>9\else0\fi\theminutes}
\def\adobedate{D:\number\year
  \ifnum\month>9\else0\fi\number\month
  \ifnum\day>9\else0\fi\number\day\now00}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\TODAY}
% Redefine today the European way round, and provide
%     an ISO-format version for the footers.\par
%    \begin{macrocode}
\def\today{\number\day\space\ifcase\month\or
  January\or February\or March\or 
  April\or May\or June\or
  July\or August\or September\or 
  October\or November\or December\fi
  \space\number\year}
\def\TODAY{\number\year{-}%
  \ifnum\month<10 0\fi\number\month{-}%
  \ifnum\day<10 0\fi\number\day}
%    \end{macrocode}
% \end{CPK@macro}
% \subsection{Metadata}
% Define the metadata (title, author, and date
%   are already given by \LaTeX{} in the
%   \textsf{report} class). These are all done the
%   same way, with a default value that gets overridden when an
%   authorial value is given.\par
% \begin{CPK@macro}{\institution}
% Institution (nominally still the NUI?).\par
%    \begin{macrocode}
\def\@institution{\so{NATIONAL UNIVERSITY OF IRELAND, CORK}}
\newcommand{\institution}[1]{\gdef\@institution{\so{#1}}}
%    \end{macrocode}
% \end{CPK@macro}
% \iffalse
%% v0.97 2012/03/31 Added author so we can have optional student number
% \fi
% \changes{v0.97}{2012/03/31}{Added author so we can have optional student number}
% \begin{CPK@macro}{\author}
% Provide an optional first argument on the
%       {\ttfamily{}\textbackslash{}author} command for giving the student
%       number.\par
%    \begin{macrocode}
\def\@studno{\relax}
\renewcommand{\author}[2][\relax]{%
   \gdef\@author{#2}
   \if\relax#1 \else\gdef\@studno{#1}\fi}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\subtitle}
% Optional subtitle.\par
%    \begin{macrocode}
\def\@subtitle{\relax}
\newcommand{\subtitle}[1]{\gdef\@subtitle{#1}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\sponsor}
% Sponsor or funding agency.\par
%    \begin{macrocode}
\def\@sponsor{\relax}
\newcommand{\sponsor}[1]{\gdef\@sponsor{#1}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\supervisor}
% Supervisor, but syntactically this needed a plural
%       value for the string label used in formatting, so we
%       define {\ttfamily{}\textbackslash{}supervisors} as well.\par
%    \begin{macrocode}
\def\@supervisor{[Name not supplied]}
\def\@supervisorname{Supervisor}
\newcommand{\supervisor}[1]{\gdef\@supervisor{#1}}
\newcommand{\supervisors}[1]{\gdef\@supervisor{#1}%
  \def\@supervisorname{Supervisors}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\module}
% Only for dissertations and essays.\par
%    \begin{macrocode}
\def\@module{\relax}
\newcommand{\module}[1]{\gdef\@module{#1}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\professor}
% Professor. There is some debate about identifying
%       the Discipline instead\dots{}\par
%    \begin{macrocode}
\def\@prof{\relax}
\newcommand{\professor}[1]{\gdef\@prof{#1}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\quals}
% Prior qualifications.\par
%    \begin{macrocode}
\def\@quals{\relax}
\newcommand{\qualifications}[1]{\gdef\@quals{#1}}%
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\volume}
% Optional volume number.\par
%    \begin{macrocode}
\def\@volume{\relax}
\def\@maxvolumes{\relax}
\def\volume #1 of #2 {\gdef\@volume{#1}%
                      \gdef\@maxvolumes{#2}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\@submission}
% This is the formal prioritising of the order in
%     which the various divisional identifiers are given, if
%     used: each one is enclosed in a test to ensure it is only
%     used if it has been specified.\par
%    \begin{macrocode}
\def\@submission{%
  \if\@hospital\relax
  \else\par\textsc{\@hospital}%
  \fi
  \if\@school\relax
  \else\par\textsc{\@school}%
  \fi
  \if\@department\relax
  \else\par\textsc{\@department}%
  \fi
  \if\@institute\relax
  \else\par\textsc{\@institute}%
  \fi
  \if\@centre\relax
  \else\par\textsc{\@centre}%
  \fi
  \if\@unit\relax
  \else\par\textsc{\@unit}%
  \fi
}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\availability}
% If the document is available online the
%   {\ttfamily{}\textbackslash{}availability} command can be used to
%   provide a short paragraph with links.\par
%    \begin{macrocode}
\def\@annot{\relax}
\newcommand{\annotation}[1]{\gdef\@annot{#1}}
%    \end{macrocode}
% \end{CPK@macro}
% Two final commands record the metadata needed to
%   complete the PDF Properties, which is needed for electronic
%   submission.\par
% \iffalse
%% v0.96 2012/03/23 Added subject and keywords
% \fi
% \changes{v0.96}{2012/03/23}{Added subject and keywords}
% \begin{CPK@macro}{\subject}
% This specifies the subject of the thesis.\par
%    \begin{macrocode}
\def\@subject{Unspecified}
\newcommand{\subject}[1]{\gdef\@subject{#1}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\keywords}
% This specifies a comma-separated list of keywords
%     for use when indexing your thesis.\par
%    \begin{macrocode}
\def\@keywords{Unspecified}
\newcommand{\keywords}[1]{\gdef\@keywords{#1}}
%    \end{macrocode}
% \end{CPK@macro}
% \subsection{Title page}
% Create the title page as per Registrar's Rules. This
%   includes the Table of Contents, List of Figures, List of
%   Tables, and the Declaration.\par
% \begin{CPK@macro}{\ifmadetitle}
% First, define a switch that can be used if
%     {\ttfamily{}\textbackslash{}maketitle} is forgotten.\par
%    \begin{macrocode}
\newif\ifmadetitle
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\title}
% Allow for an optional short (or unformatted) title\par
% \iffalse
%% v1.08 2011/04/07 Added the @title and @@title commands
% \fi
% \changes{v1.08}{2011/04/07}{Added the @title and @@title commands}
%    \begin{macrocode}
\def\@@title{\relax}
\renewcommand{\title}[2][\relax]{%
  \gdef\@title{#2}%
  \ifthenelse{\equal{#1}{\relax}}{%
    \gdef\@@title{#2}%
    \message{No short title}%
  }{%
    \gdef\@@title{#1}%
    \message{Short title: #1}%
  }%
}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\maketitle}
% The order is: title, subtitle, volume, author,
% qualifications, institution, college, faculty,
% department, degree, date, professor, supervisor,
% sponsor.\par
%    \begin{macrocode}
\renewcommand\maketitle{%
%    \end{macrocode}
% We want this on a page by itself, centered both
% vertically and horizontally.\par
%    \begin{macrocode}
  \begin{titlepage}%
    \null
    \ifthesis\vfill\fi
    \begin{center}%
%    \end{macrocode}
% Title is compulsory: subtitle is optional.\par
%    \begin{macrocode}
      {\ifthesis\fontsize{28}{32}\selectfont
       \else\LARGE\bfseries\fi\@title \par}%
      \if\@subtitle\relax\else\bigskip
        {\ifthesis\fontsize{24}{28}\selectfont
         \else\Large\bfseries\fi\@subtitle\par}%
      \fi
%    \end{macrocode}
% Volume number is compulsory if the thesis is
% multi-volume.\par
%    \begin{macrocode}
      \ifthesis
        \if\@volume\relax\else
          \vspace{2pc}{\large Volume \@volume\ of 
                       \@maxvolumes\par}%
        \fi
      \fi
      \vspace*{2pc}%
%    \end{macrocode}
% Author is compulsory; qualifications are optional.\par
% \iffalse
%% v0.90 2011/04/07 Changed author to LARGE size.
% \fi
% \changes{v0.90}{2011/04/07}{Changed author to LARGE size.}
%    \begin{macrocode}
      {\LARGE\@author%
	\if\relax\@quals\else
          \\\large\scshape\@quals
        \fi
	\if\relax\@studno\else
          \\\Large\upshape\@studno
        \fi
	\par}%
%    \end{macrocode}
% Grade of degree is compulsory. Phrasing for some
% degrees `in part fulfilment' needs
% investigating.\par
%    \begin{macrocode}
      \ifthesis
        \medskip
        {\large\bfseries Thesis submitted for the degree of
                \\\@degree\par}%
      \else
        {\large\@module~--- Minor Dissertation\par}%
      \fi
      \vspace*{1.5pc}%
%    \end{macrocode}
% Any free space can also go here, above the UCC
% crest and below the date.\par
%    \begin{macrocode}
      \vfill
      \ifthesis{\Large\UCCcrest}\fi
      \par\smallskip
%    \end{macrocode}
% The name of the institution is required.\par
%    \begin{macrocode}
      \ifthesis
        \@institution\par
        \vspace*{1pc}%
      \fi
%    \end{macrocode}
% Use the preformed {\ttfamily{}\textbackslash{}@submission}
% which reproduces those divisional elements which have
% been specified.\par
%    \begin{macrocode}
      \ifthesis
        {\large\@submission\par}
        \vspace*{1pc}%
      \fi
%    \end{macrocode}
% Date of submission is required here for theses.\par
%    \begin{macrocode}
      \ifthesis
        {\@date \par}%
        \vfill
      \fi
%    \end{macrocode}
% If this is a thesis, give the Professor and
% Supervisor(s) as a tabular alignment.\par
%    \begin{macrocode}
      \ifthesis
        \begin{tabular}{%
>{\raggedleft\arraybackslash}p{.45\UCC@textbodywidth}%
>{\raggedright\arraybackslash}p{.45\UCC@textbodywidth}}
%    \end{macrocode}
% Professor is actually optional here for some
%     reason.\par
%    \begin{macrocode}
          \if\@prof\relax\else
              Head of \@unittype:&\@prof\\[1pc]
          \fi
	  \@supervisorname:&
%    \end{macrocode}
% Multiple supervisors must have been separated  by
% double backslashes, so we can use a 1-column table to
% make them format vertically.\par
%    \begin{macrocode}
          \begin{tabular}[t]{@{}l@{}}\@supervisor\end{tabular}
        \end{tabular}\par\vfill%
%    \end{macrocode}
% If this was not a thesis, just
% give the supervisor. This should probably be collapsed
% into the above formatting.\par
%    \begin{macrocode}
      \else
          Supervisor:\quad\@supervisor\par
      \fi
      \vspace*{2pc}%
%    \end{macrocode}
% Date of submission is required here for
% dissertations.\par
%    \begin{macrocode}
      \ifthesis\else
        {\@date \par}%
      \fi
%    \end{macrocode}
% Sponsor, if there is one.\par
%    \begin{macrocode}
      \if\@sponsor\relax\else
        \vfill
	Research supported by \@sponsor\par
      \fi
    \end{center}%
%    \end{macrocode}
% Set the title page number to one and make sure it
% has no running header or footer.\par
%    \begin{macrocode}
    \setcounter{page}{1}%
    \pagestyle{empty}%
  \end{titlepage}%
%    \end{macrocode}
% Now reset the commands used to create the title
% page so that they can't accidentally be used
% again. Note that the stored values in the
% \verb|\@| remain unaffected for
% re-use in running headers, etc.\par
%    \begin{macrocode}
  \global\let\@thanks\@empty
  \global\let\and\relax
  \global\let\author\relax
  \global\let\centre\relax
  \global\let\college\relax
  \global\let\date\relax
  \global\let\degree\relax
  \global\let\department\relax
  \global\let\faculty\relax
  \global\let\institute\relax
  \global\let\keywords\relax
  \global\let\maketitle\relax
  \global\let\professor\relax
  \global\let\qualifications\relax
  \global\let\school\relax
  \global\let\sponsor\relax
  \global\let\subject\relax
  \global\let\subtitle\relax
  \global\let\supervisor\relax
  \global\let\thanks\relax
  \global\let\title\relax
  \global\let\unit\relax
  \global\let\volume\relax
%    \end{macrocode}
% Set the footnote counter (back) to zero, establish
% Roman (lowercase) page numbering for the front matter,
% and set the numbering depth down to the subparagraph
% level, and the ToC depth down to the
% subsubsection.\par
%    \begin{macrocode}
  \setcounter{footnote}{0}%
  \pagestyle{empty}
  \ifUCC@oneside\clearpage
    \if\relax{\small\@annot\par}
    \else\null\vfill{\small\@annot\par}\clearpage\fi
  \else
    \if\relax{\small\@annot\par}\cleardoublepage
    \else\clearpage\null\vfill{\small\@annot\par}\clearpage\fi
  \fi
  \ifthesis
    \setcounter{secnumdepth}{5}
    \pagenumbering{roman}%
  \else
    \setcounter{secnumdepth}{0}
    \pagenumbering{arabic}
  \fi
  \ifshorttoc\setcounter{tocdepth}{2}%
  \else\setcounter{tocdepth}{3}\fi
  \iffancy
    \pagestyle{fancy}
  \else
    \pagestyle{plain}
  \fi
%    \end{macrocode}
% As an integral part of the
%     {\ttfamily{}\textbackslash{}maketitle} command, do the Table of
%     Contents immediately after the title page, as required
%     by the Registrar's rules; then do the List of Figures
%     and List of Tables if they are needed.\par
% The built-in internal command
%     {\ttfamily{}\textbackslash{}@ifpackageloaded} is used to detect the
%     use of the \textsf{glossaries} package, and print
%     the Glossary if appropriate.\par
%    \begin{macrocode}
  \ifthesis
    \tableofcontents
    \iflof\listoffigures\fi
    \iflot\listoftables\fi
    %% \@ifpackageloaded{glossaries}{\printglossary}{\relax}
  \fi
%    \end{macrocode}
% Flag the title as having been done.\par
%    \begin{macrocode}
  \madetitletrue
%    \end{macrocode}
% Finally, add the PDF metadata. Temporarily
% redefine the double backslash in case it gets used in
% the title, as {\ttfamily{}\textbackslash{}pdfinfo} will gag on
% it and undefine {\ttfamily{}\textbackslash{}maketitle} in the
% process.\par
% \iffalse
%% v0.96 2012/03/23 Added PDF metadata
% \fi
% \changes{v0.96}{2012/03/23}{Added PDF metadata}
% \iffalse
%% v0.98 2012/04/02 Moved pdfinfo to the end of maketitle, temporarily nullified the double backslash
% \fi
% \changes{v0.98}{2012/04/02}{Moved pdfinfo to the end of maketitle, temporarily nullified the double backslash}
%    \begin{macrocode}
  \renewcommand{\\}{ }
  \pdfinfo{%
   /Title (\@title)
   /Author (\@author)
   /CreationDate (\adobedate)
   /Subject (\@subject)
   /Keywords (\@keywords)
  }}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\madedecl}
% If this is a thesis (ie not
%       a term paper or essay), start a new page, set both marks
%       to null, and output the Declaration.\par
% \iffalse
%% v0.90 2011/04/07 Wording from Michelle Nelson.
% \fi
% \changes{v0.90}{2011/04/07}{Wording from Michelle Nelson.}
% \iffalse
%% v0.90 2011/04/28 Centering removed from Declaration.
% \fi
% \changes{v0.90}{2011/04/28}{Centering removed from Declaration.}
%    \begin{macrocode}
\newif\ifmadedecl
\newcommand{\makedecl}{%
  \ifthesis
    \ifUCC@oneside\clearpage\else\cleardoublepage\fi
    \null\vfill\markboth{}{}%
    \begingroup
    I, \@author, certify that this thesis is my own work 
    and has not been submitted for another degree at University
    College Cork or elsewhere.
    \par\flushright\bigskip\bigskip\bigskip\leavevmode
    \hbox to2in{\hrulefill}\par\medskip\textit{\@author}\par\endgroup
    \vfill
  \fi
  \global\madedecltrue
  \global\UCC@delaydeclfalse}
%    \end{macrocode}
% \end{CPK@macro}
% \subsection{General settings and redefinitions}
% This is a collection of changes (usually small) and
%   additions (for convenience).\par
% \subsubsection{Floats}\label{floating}
% Reset the proportions of the page used for floats.
%     This is taken from
%     \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats}.\par
%    \begin{macrocode}
\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.75}
\renewcommand{\dbltopfraction}{.75}
\renewcommand{\dblfloatpagefraction}{.75}
\setcounter{topnumber}{9}
\setcounter{bottomnumber}{9}
\setcounter{totalnumber}{20}
\setcounter{dbltopnumber}{9}
%    \end{macrocode}
% \subsubsection{New front and back matter macros and
%       environments}
% Firstly, a consistent way to provide a Dedication,
%       Acknowledgements, and other preliminaries.\par
% \begin{CPK@environment}{dedication}
% The \texttt{dedication}
% environment is for dedicating a thesis. It creates a
% page on its own and does not make a ToC entry. If the
% title page has not yet been done, this will trigger it
% first.\par
%    \begin{macrocode}
\newenvironment{dedication}{%
  \ifmadetitle\else\maketitle\fi
  \ifmadedecl\else\makedecl\fi
  \clearpage\null\vfill
  \thispagestyle{empty}%
  \begin{center}}{%
  \end{center}\vfill}
%    \end{macrocode}
% \end{CPK@environment}
% \begin{CPK@macro}{\prelim}
% The {\ttfamily{}\textbackslash{}prelim}
% command creates a minor frontmatter (unnumbered)
% section.\par
%    \begin{macrocode}
\newif\ifUCC@delaydecl
\newcommand{\prelim}{%
  \@ifnextchar *
     {\UCC@delaydecltrue\UCC@prelim}
     {\UCC@delaydeclfalse\UCC@prelim{*}}}
\newcommand{\UCC@prelim}[2]{% dummy first arg
  \ifmadetitle\else\maketitle\fi
  \ifmadedecl\else
    \ifUCC@delaydecl\else\makedecl\fi
  \fi
  \ifUCC@oneside\clearpage\else\cleardoublepage\fi
  \section*{#2}\@mkboth{{#2}}{{#2}}%
  \addcontentsline{toc}{section}{#2}%
  \onehalfspacing}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\refsec}
% A {\ttfamily{}\textbackslash{}refsec} is a special form of
%       {\ttfamily{}\textbackslash{}prelim} that does not trigger the
%       Declaration, and is typeset single-spaced.\par
%    \begin{macrocode}
\newcommand{\refsec}[1]{%
  \ifUCC@oneside\clearpage\else\cleardoublepage\fi
  \section*{#1}\@mkboth{{#1}}{{#1}}%
  \addcontentsline{toc}{section}{#1}%
  \singlespacing}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\ackname}
% Define a string for the titling of the
% Acknowledgements section, so that it can be redefined
% in the \textbf{\texttt{gaeilge}} option.\par
%    \begin{macrocode}
\newcommand{\ackname}{Acknowledgements}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@environment}{acknowledgements}
% The \texttt{acknowledgements}
% environment uses the {\ttfamily{}\textbackslash{}prelim}
% format.\par
% \iffalse
%% v1.11 2013/07/23 Added maketitle test to acknowledgements.
% \fi
% \changes{v1.11}{2013/07/23}{Added maketitle test to acknowledgements.}
%    \begin{macrocode}
\newenvironment{acknowledgements}{%
  \ifmadetitle\else\maketitle\fi
  \ifmadedecl\else\makedecl\fi
  \prelim{\ackname}\singlespacing
}{}%
%    \end{macrocode}
% \end{CPK@environment}
% Redefine the Table of Contents as a section, and the
%       same for the List of Figures and List of Tables.\par
% \begin{CPK@macro}{\tableofcontents}
% The ToC is just a section, otherwise unchanged.\par
%    \begin{macrocode}
\renewcommand\tableofcontents{%
  \section*{\contentsname
    \@mkboth{\contentsname}{\contentsname}}%
  \@starttoc{toc}%
}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\listoffigures}
% LoF works the same as ToC\par
%    \begin{macrocode}
\renewcommand\listoffigures{%
  \ifUCC@oneside\clearpage\else\cleardoublepage\fi
  \section*{\listfigurename
    \@mkboth{\listfigurename}{\listfigurename}}%
  \addcontentsline{toc}{section}{\listfigurename}%
  \@starttoc{lof}%
}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\listoftables}
% And so does LoT\par
%    \begin{macrocode}
\renewcommand\listoftables{%
  \ifUCC@oneside\clearpage\else\cleardoublepage\fi
  \section*{\listtablename
    \@mkboth{\listtablename}{\listtablename}}%
  \addcontentsline{toc}{section}{\listtablename}%
  \@starttoc{lot}%
}
%    \end{macrocode}
% \end{CPK@macro}
% The Abstract is done slightly differently to normal
%       for a page by itself.\par
% \begin{CPK@macro}{\maketitle}
% We can't use the \texttt{titlepage} environment,
% because it resets the page number, so we do it like
% all the other Prelims.\par
%    \begin{macrocode}
\renewenvironment{abstract}{% 
  \ifmadetitle\else\maketitle\fi
  \ifmadedecl\else\makedecl\fi
  \ifUCC@oneside\clearpage\else\cleardoublepage\fi
  \@beginparpenalty\@lowpenalty
  \section*{\abstractname}%
  \addcontentsline{toc}{section}{\abstractname}%
  \markboth{\abstractname}{\abstractname}%
  \onehalfspacing
}{%
  \clearpage
}
%    \end{macrocode}
% \end{CPK@macro}
% Lastly, the Index, if used.\par
% \begin{CPK@environment}{theindex}
% Again, this is a section-level start, otherwise it
% uses the same format as the default. Possibly this
% should use the \textsf{multicol} package if
% people wanted balanced columns; but indexes are
% rare.\par
%    \begin{macrocode}
\renewenvironment{theindex}{%
  \ifUCC@oneside\clearpage\else\cleardoublepage\fi
  \columnseprule \z@
  \columnsep 35\p@
  \twocolumn[\section*{\indexname}]%
  \@mkboth{\indexname}{\indexname}%
  \parindent\z@
  \parskip\z@ \@plus .3\p@\relax
  \let\item\@idxitem}%
 {\clearpage}
%    \end{macrocode}
% We should have a closer look at the
%       \textsf{glossaries} package to see if there is
%       anything there needs redefining.\par
% \end{CPK@environment}
% \subsubsection{Sectioning commands}
% Make sure that {\ttfamily{}\textbackslash{}part}s and
%       {\ttfamily{}\textbackslash{}chapter}s switch to Arabic numbering
%       and the appropriate stretch, because all the prelims are
%       Roman.\par
% \begin{CPK@macro}{\part}
% Same as the default, but with a switch to Arabic
% page numbering and wide spacing if this is the first
% Part (resets the page number to~1).\par
%    \begin{macrocode}
\renewcommand\part{%
  \ifmadetitle\else\maketitle\fi
  \ifmadedecl\else\madedecl\fi
  \if@openright
    \cleardoublepage
  \else
    \clearpage
  \fi
  \thispagestyle{plain}%
  \if@twocolumn
    \onecolumn
    \@tempswatrue
  \else
    \@tempswafalse
  \fi
  \null\vfil
  \ifnum\c@part=0 
    \pagenumbering{arabic}%
    \onehalfspacing
  \fi
  \secdef\@part\@spart}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\maketitle}
% Same switch as in {\ttfamily{}\textbackslash{}part}, checking that this is
% the first chapter and that we have not started an
% Appendix, \emph{but only} if the Part
% number is also zero (ie Parts are not in use).\par
% \iffalse
%% v0.99 2012/04/15 Changed onehalfspacing to setstretch of 1.333 for prelims and moved the main 1.666 one to here.
% \fi
% \changes{v0.99}{2012/04/15}{Changed onehalfspacing to setstretch of 1.333 for prelims and moved the main 1.666 one to here.}
% \iffalse
%% v0.99 2012/04/16 Changed it back.
% \fi
% \changes{v0.99}{2012/04/16}{Changed it back.}
%    \begin{macrocode}
\renewcommand{\chapter}{%
  \ifmadetitle\else\maketitle\fi
  \ifmadedecl\else\makedecl\fi
  \if@openright\cleardoublepage\else\clearpage\fi
  \thispagestyle{plain}%
  \global\@topnum\z@
  \ifnum\c@chapter=0 
    \ifnum\c@part=0 
      \ifthenelse{\equal{\@chapapp}{\chaptername}}%
                 {\pagenumbering{arabic}\onehalfspacing}%
                 {}%
    \fi
  \fi
  \@afterindentfalse
  \secdef\@chapter\@schapter}
%    \end{macrocode}
% \end{CPK@macro}
% \subsubsection{Epigraphs and quotations}
% \begin{CPK@macro}{\@opttest}
% To enable optional argument testing for the null
% string in Epigraphs (and later, in Quotations), we
% define a Plain \TeX{} macro which sets the {\ttfamily{}\textbackslash{}ifoptarg} switch.\par
%    \begin{macrocode}
\newif\ifoptarg
\def\@opttest#1#2\sentinel{\ifx[#1\optargtrue
      \else\optargfalse\fi}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@environment}{epigraph}
% Define an environment for Epigraphs. These would
% normally go immediate after the
% {\ttfamily{}\textbackslash{}chapter} command. This is basically
% the \texttt{quotation} environment modified, but
% it has to allow for \emph{either} manual
% \emph{or} automated citation (because it
% may just be a phrase needing no citation), whereas a
% normal quotation \emph{must} be
% cited. It therefore has \emph{two}
% arguments, described below:\par
% \iffalse
%% v0.92 2011/05/31 Added Epigraphs.
% \fi
% \changes{v0.92}{2011/05/31}{Added Epigraphs.}
%    \begin{macrocode}
\newenvironment{epigraph}[2][\relax]{%
%    \end{macrocode}
% Record the argument values now, because they are
% needed in the end of the environment, so they have to
% pass across the group boundary. The compulsory
% argument is for a \BibTeX{} citation key, so that a
% proper citation can be formatted; the optional
% argument is for when a pre-formed,
% `full' (actually often simpler,
% non-rigorous) citation is wanted.\par
%    \begin{macrocode}
  \gdef\@fullcite{#1}%
  \gdef\@quotcite{#2}%
%    \end{macrocode}
% Like the default Quotation, this is done with a
% dummy \texttt{list} environment,
% but we add small italic type and no indentation.\par
%    \begin{macrocode}
  \list{}{%
    \listparindent 1.5em%
    \itemindent    \listparindent
    \rightmargin   \leftmargin
    \parsep        \z@ \@plus\p@}%
  \item\relax\noindent\small\itshape\ignorespaces
}{%
%    \end{macrocode}
% Unlike the [redefined] \texttt{quotation}
% environment, a citation is compulsory here, even if
% it's the default `Anon.' The
% \BibTeX{} citation can be empty if there was a manual
% one, otherwise it ought to be there.\par
%    \begin{macrocode}
    {\unskip\nobreak\hfil\penalty50
    \hskip2em\hbox{}\nobreak\hfil\upshape\footnotesize
%    \end{macrocode}
% If there is a manual citation (optional argument),
% use it before any \BibTeX{} one:\par
%    \begin{macrocode}
      \if\@fullcite\relax\else\@fullcite\fi
%    \end{macrocode}
% If the compulsory argument (\BibTeX{} key) was
% empty (ie, just a pair of curly braces)
% \emph{and} there was no optional
% argument, print `Anon.'\par
%    \begin{macrocode}
      \ifthenelse{\equal{\@quotcite}{}}{%
        \if\@fullcite\relax(Anon.)\fi}{%
%    \end{macrocode}
% Otherwise (compulsory argument was provided), test
% it to see if it contains an optional argument of its
% own (for example, a page number for a citation key),
% and {\ttfamily{}\textbackslash{}cite} it accordingly.\par
%    \begin{macrocode}
        \expandafter\@opttest\@quotcite\sentinel
        \ifoptarg\expandafter\cite\@quotcite
        \else\cite{\@quotcite}\fi}%
%    \end{macrocode}
% Now terminate the paragraph so that the citation
% is fitted in, using the same code from the
% \textsf{memoir} class as used for the
% \texttt{quotation} environment below.\par
% \iffalse
%% v1.00 2012/06/11 Added new positional code for citations to epigraphs
% \fi
% \changes{v1.00}{2012/06/11}{Added new positional code for citations to epigraphs}
%    \begin{macrocode}
    \parfillskip\z@\finalhyphendemerits=0\par}%
    \medskip
    \endlist\@afterheading}%
%    \end{macrocode}
% \end{CPK@environment}
% See the user-level documentation for examples.\par
% The Quotation environment is redefined similarly.\par
% \begin{CPK@macro}{\quotation}
% Here, however, a citation should be compulsory, so
% there is only one argument: we define it as optional
% so that we can test for it. Any optional component to
% the citation key must, as with Epigraph, rely on the
% entire argument being inside its own set of curly
% braces.\par
%    \begin{macrocode}
\newlength{\mainparskip}
\newlength{\mainparindent}
\renewenvironment{quotation}[1][\relax]{%
  \setlength{\mainparskip}{\parskip}%
  \setlength{\mainparindent}{\parindent}%
  \gdef\@quotcite{#1}%
  \smallskip
  \list{}{%
    \listparindent 1.5em%
    \itemindent    \listparindent
    \rightmargin   \leftmargin
    \parsep        \z@ \@plus\p@}%
  \item\relax\small
  \setlength{\parindent}{\mainparindent}%
  \setlength{\parskip}{\mainparskip}%
  \noindent\ignorespaces
}{%
  \if\@quotcite\relax\else{%
%    \end{macrocode}
% This positional code is taken from the
% {\ttfamily{}\textbackslash{}sourceatright} command of the
% \textsf{memoir} class (thanks to Lee
% Rudolph and Robin Fairbairns for identifying
% this).\par
% \iffalse
%% v1.00 2012/06/11 Added new positional code for citations to block quotations
% \fi
% \changes{v1.00}{2012/06/11}{Added new positional code for citations to block quotations}
% \iffalse
%% v1.04 2013/02/08 Removed footnotesize for citation, changed hfil to hfill, and moved the parfillskip and finalhyphendemerits earlier
% \fi
% \changes{v1.04}{2013/02/08}{Removed footnotesize for citation, changed hfil to hfill, and moved the parfillskip and finalhyphendemerits earlier}
%    \begin{macrocode}
    \unskip\nobreak\hfil\penalty50
    \parfillskip\z@\finalhyphendemerits=0
    \hskip2em\hbox{}\nobreak\hfill
      \expandafter\@opttest\@quotcite\sentinel
      \ifoptarg\expandafter\cite\@quotcite
      \else\cite{\@quotcite}\fi\par}%
  \fi\medskip\endlist
  \@afterheading\noindent\ignorespaces}%
%    \end{macrocode}
% \end{CPK@macro}
% \subsubsection{Odds 'n' sods}
% This is mostly fixes and utilities.\par
% \iffalse
%% v0.99 2012/04/22 Removed code for altering layout of description lists, as the modifications were not working consistently
% \fi
% \changes{v0.99}{2012/04/22}{Removed code for altering layout of description lists, as the modifications were not working consistently}
% \iffalse
%% v1.07 2013/05/06 Added a setlist command via prepost to preset description lists to the unboxed option
% \fi
% \changes{v1.07}{2013/05/06}{Added a setlist command via prepost to preset description lists to the unboxed option}
% \begin{CPK@macro}{\so}
% Specify tighter letter-spacing for the title page.\par
%    \begin{macrocode}
\sodef\so{}{.1em}{.5em plus.5em}{1em plus1em}
%    \end{macrocode}
% \end{CPK@macro}
% Add more space around captions with the
%     {\ttfamily{}\textbackslash{}abovecaptionskip} and
%     {\ttfamily{}\textbackslash{}belowcaptionskip} commands.\par
%    \begin{macrocode}
\setlength{\abovecaptionskip}{.5\baselineskip}
\setlength{\belowcaptionskip}{.5\baselineskip}
%    \end{macrocode}
% \begin{CPK@environment}{table}
% Restyle the Table float to have the caption on top.\par
%    \begin{macrocode}
\floatstyle{plaintop}
\restylefloat{table}
%    \end{macrocode}
% \end{CPK@environment}
% \begin{CPK@environment}{figure}
% Restyle the Figure float to have the caption below.\par
%    \begin{macrocode}
\floatstyle{plain}
\restylefloat{figure}
%    \end{macrocode}
% \end{CPK@environment}
% \begin{CPK@macro}{\@pnumwidth}
% Make more space for the page number in the ToC, LoT,
%     and LoF.\par
% \iffalse
%% v0.90 2011/04/28 Changed pnumwidth.
% \fi
% \changes{v0.90}{2011/04/28}{Changed pnumwidth.}
%    \begin{macrocode}
\renewcommand\@pnumwidth{2em}%
%    \end{macrocode}
% \end{CPK@macro}
% Define a few experimental utilities.\par
%    \begin{macrocode}
\def\inch{\ifmmode{}^{\prime\prime}\else$
                  {}^{\prime\prime}$\fi}
\newcommand{\me}{\@author}
\newcommand{\signature}[1][\relax]{%
  \begin{flushright}\small\me\\
    \if#1\relax\else#1, \fi\@date
  \end{flushright}}
\newcommand{\tm}{\raisebox{2pt}{%
                 \scriptsize\textsf{\texttrademark}}}
\newcommand{\etc}{etc.\ }
\newcommand{\eg}{e.g.\ }
\newcommand{\ie}{i.e.\ }
%    \end{macrocode}
% \begin{CPK@macro}{\hyphenation}
% Add a few bells and whistles to the hyphenation.\par
%    \begin{macrocode}
\hyphenation{%
Regi-strar 
Sebas-tian 
analy-sis
Analy-sis
analy-ses
Analy-ses
bre-vi-ty 
chan-ges 
de-fi-ning 
docu-ment 
epex-e-ge-sis
epex-e-ge-ses
exa-mined
helico-pter
hier-ar-chy 
inter-linea-ted
lexi-cal 
manu-script
re-fe-ren-ces
re-prin-ted 
smal-ler 
spe-ci-fy 
sub-con-sci-ous-ly 
tech-no-logy
typo-gra-phy
no-men-cla-ture
}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\foreign}
% Enable semantic distinction of foreign words and
%       phrases.\par
%    \begin{macrocode}
\let\foreign\emph
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\marginal}
% Define a new command for marginal notes.\par
%    \begin{macrocode}
\newcommand{\marginal}[1]{%
  \marginpar{\sffamily\tiny\raggedright#1\par}}
%    \end{macrocode}
% \end{CPK@macro}
% \begin{CPK@macro}{\bibliography}
% Add a trace to the log file to help in cutting the
%       PDF to separate sections.\par
% \iffalse
%% v0.99 2012/04/07 Added typeout to bibliography
% \fi
% \changes{v0.99}{2012/04/07}{Added typeout to bibliography}
%    \begin{macrocode}
\def\bibliography#1{%
  \if@filesw
    \immediate\write\@auxout{\string\bibdata{#1}}%
  \fi
  \typeout{\bibname\space.}%
  \@input@{\jobname.bbl}}
%    \end{macrocode}
% \end{CPK@macro}
% The new {\ttfamily{}\textbackslash{}vstrut} command which takes
%     account of the surrounding font size has been moved to the
%     documentation.\par
% Last of all, establish 1\nicefrac12 line-spacing and a
%     ragged page-bottom.\par
% \iffalse
%% v0.99 2012/04/15 Changed onehalfspacing to setstretch of 1.333 for prelims and moved the main 1.666 one to the start of the first part or chapter.
% \fi
% \changes{v0.99}{2012/04/15}{Changed onehalfspacing to setstretch of 1.333 for prelims and moved the main 1.666 one to the start of the first part or chapter.}
% \iffalse
%% v0.99 2012/04/16 Changed it back to single spacing for prelims and one and ahalf spacing for the rest.
% \fi
% \changes{v0.99}{2012/04/16}{Changed it back to single spacing for prelims and one and ahalf spacing for the rest.}
%    \begin{macrocode}
\raggedbottom
\message{UCC thesis class loaded}
%    \end{macrocode}
% \iffalse
%</class>
% \fi
% \appendix
% \iffalse
%<*crestfont>
% \fi
% \clearpage
% \section{Revised UCC Crest}\label{crestfont}
% \iffalse
%% 
%% Revised UCC Crest
% \fi
% This is the \MF{} crest written by Jeremy Gibbons for
% UCC in 1989, with the scroll commented out (look for the
% commented line saying
% {\ttfamily{}banner(j)}).\par
%    \begin{macrocode}
%% METAFONT program to draw University College, Cork coat of arms.
%%
%% Jeremy Gibbons, Oxford University, October 1989
%% Modified by JG (now at University of Auckland; jeremy@cs.aukuni.ac.nz)
%%    September 1994, December 1994.
%%
%% There are now two "knobs" to adjust the appearance. One is called 
%% "pen_knob", the other "banner_gap_knob". Search through this file 
%% for the second occurrences of these strings, and play with the 
%% settings as much as you like!

designsize:=10pt#;

def !! = scantokens ("input " & jobname); enddef;

mode_setup;

u# := .2pt#; define_pixels(u);
if unknown sections: sections := 1; fi

banner_gap_knob := 8;
   % Adjusting this affects the width of the gap between the top
   % of the banner and the bottom of the shield. A setting of 0 
   % has them touching; a setting of 8 gives a gap of about 1mm
   % when the whole shield is about 3cm high. You can set it to
   % a floating-point number (eg 7.5).

total_width# := 170u#; total_height# := 210u#; 
total_depth# := (banner_gap_knob+1)*u#;
section_width# := total_width#;

if sections > 1: % round so sections whole no of pixels wide
      % SURPRISE: makes crests at different resolutions have different widths!
   section_width# := (round((total_width#/sections)*hppp))/hppp;
      % should be a whole no of pixels
   total_width# := section_width# * sections;
fi

define_pixels(section_width, total_width, total_height, total_depth);
w := section_width; h := total_height; d := total_depth;

pen_knob := 1.5;
   % Adjusting this affects the width of the "detailpen" (used for the 
   % castles, ship, book, lion and crowns). A setting of 1 was too fine 
   % at high resolutions; it was set at 2 for the 1989 version of the coat 
   % of arms. You can set it to a floating-point number (eg 1.5).

thickpenwidth#:=4u#;
thinpenwidth#:=u#;
detailpenwidth#:=pen_knob * .5u#;
calligraphicpenwidth#:=u#;
calligraphicpenheight#:=0.1u#;
define_whole_blacker_pixels(thickpenwidth, thinpenwidth, detailpenwidth,
              calligraphicpenwidth, calligraphicpenheight);

pickup pencircle scaled thickpenwidth; thickpen := savepen;
pickup pencircle scaled thinpenwidth; thinpen  := savepen;
pickup pencircle scaled detailpenwidth; detailpen := savepen;

pickup pensquare 
   xscaled calligraphicpenwidth yscaled calligraphicpenheight 
   rotated 40; % a `calligraphic' nib
calligraphicpen := savepen;

pickup pencircle; draftpen := savepen; 
%% thickpen := draftpen; thinpen := draftpen; 
%% detailpen := draftpen; calligraphicpen := draftpen;

def drawbothsides (expr p) =
   draw p;
   draw (p reflectedabout axis);
enddef;
      
def fillbothsides (expr p) =
   fill p;
   fill (p reflectedabout axis);
enddef;
      
def crown(suffix $) =
   % (0,0) is centre of bottom edge of crown
   
   def axis = ((0,0),up) enddef;
   
   z0$ = (-12u,0);     % left end of bottom edge
   z1$ = z0$ + 6u*up;  % left end of top of `band' on crown
   z2$ = (-11u,0);     % lower end of left edge of band
   z3$ = z2$ + 6u*up;  % upper end ditto
   z4$ = (-16u, 23u);  % point of lefthand spike
   z5$ = (-9u, 13u);   % trough between left and centreleft spikes
   z6$ = (-7u, 25u);   % point of centreleft spike
   z7$ = (-3u, 15u);   % trough between centreleft and centre spikes
   z8$ = (0, 26u);     % point of centre spike

   pickup detailpen;
   drawbothsides(z3$--z4$--z5$--z6$--z7$--z8$); % spiky bit
   
   draw z0$ -- (z0$ reflectedabout axis); % bottom of band
   draw z1$ -- (z1$ reflectedabout axis); % top of band
   
   drawbothsides(z2$--(z2$+2u*up)); % lower halves of edges of band
   drawbothsides(z3$--(z3$-2u*up)); % ... and upper halves
   
   drawbothsides(unitsquare scaled 2u xscaled 2 shifted (z2$+(-2u,2u)));
   draw unitsquare scaled 2u xscaled 2 shifted (-2u,2u);
      % three rectangular jewels
   drawbothsides(fullcircle scaled 2u shifted ((.5[(0,0),z2$])+3u*up));
      % and two circular jewels
   
enddef;   

def shield(suffix $) =
   z0$ = (.5total_width, 30u);    % centre bottom
   z1$ = (50u, 37.5u);  % ...
   z2$ = (3u, 85u);     % up the left hand side
   z3$ = (13u, 147u);   % ...
   z4$ = (3u, 188u);    % top left (sw of diagonal line)
   z5$ = (22u, 207u);   % top left (ne of diagonal line)
   z6$ = (52u, 200u);   % ... across top ...
   z7$ = (.5total_width, 205u);   % centre top
   
   def axis = (z0$,z0$+total_height*up) enddef; % axis of symmetry of shield
   
   path shieldleft; 
   shieldleft = z0${dir 135}..z1${left}..z2${up}..z3${up}..{dir 135}
                z4$--z5$
                {dir -30}..z6${right};
   
   % y8$ = 138u; z8$ = shieldleft intersectionpoint ((0,y8$)--(total_width,y8$));
   z8$ = shieldleft intersectionpoint ((0,138u)--(total_width,138u));
                          % left edge of horiz dividing line
   y9$ = 134u;  x9$=x0$;  % top of gap for book in vert dividing line
   y10$ = 103u; x10$=x0$; % bottom of gap ...
   
   pickup thickpen;
   draw ( shieldleft .. z7$ .. (reverse shieldleft reflectedabout axis) );
   
   draw z8$ -- (z8$ reflectedabout axis);        % horiz dividing line
   draw (.5[z8$,z8$ reflectedabout axis])--z9$;  % top of vert dividing line
   draw z10$ -- z0$;                             % ... and bottom

enddef;

def book(suffix $) = 
   z0$ = (0,0); % centre of base of spine
   
   def axis = (z0$, z0$ + up) enddef; % up the spine
   
   z1$ = (-2.5u,0);   % left edge of ellipse at base of spine
   z2$ = (-20u,0);    % bottom left hand corner of cover
   z3$ = (-19u,19u);  % top left corner of cover
   y5$ = 18u; z5$ = whatever[z2$,z3$];
                      % top left corner of page 1
   z6$ = z2$ + (4u*(up+right));  % bottom left corner of lefthand open page
   z7$ = z5$ + (z6$-z2$); % ... and top left
   z8$ = (-6u, 4u);   % centre of bottom edge of lh open page
   z9$ = (0, 1.5u);   % bottom right of lh open page
   
   path bottomleftofpages; bottomleftofpages = z2${dir 40}..z6${dir 60};
   y4$=y3$; 
   z4$ = (bottomleftofpages shifted (z5$-z2$)) 
         intersectionpoint (z3$--(z3$ reflectedabout axis));
      % where top of book cover goes behind pages
   
   y10$ = 4u; z10$ = whatever[z2$,z3$]; % lower left flap
   y11$ = y10$; x11$ = -29u;
   y12$ = y11$ + 4u; z12$=z11$+whatever*(z3$-z2$);
   y13$ = y12$; z13$ = whatever[z2$,z3$];
   
   y14$ = 12u; z14$ = whatever[z2$,z3$]; % upper left flap
   y15$ = y14$; z15$ = whatever[z11$,z12$]; % z15--z16 in line with z11--z12
   y16$ = y15$+(y12$-y11$); z16$ = whatever[z11$,z12$];
   y17$ = y16$; z17$ = whatever[z2$,z3$];
   
   z18$ = z11$ + 3u*right; z19$=z18$+(z12$-z11$);
      % vert line on lower flap
   
   z21$ = z20$+(z8$-z9$); % middle of top of left open page
   z20$ = z9$+(0,y7$-y6$); % top of spine
   
   pickup detailpen;

   drawbothsides(z1$--z2$--z3$--z4$); % cover
   drawbothsides(bottomleftofpages);
   drawbothsides((bottomleftofpages shifted (z5$-z2$))); % top of pages
   drawbothsides(z9${dir 135}..z8${left}..z6${dir 150});
   drawbothsides(z20${dir 135}..z21${left}..z7${dir 150}); % top of open page
   drawbothsides(z6$--z7$); % outside edge of open page
   drawbothsides(z10$--z11$--z12$--z13$); % lower flap
   drawbothsides(z14$--z15$--z16$--z17$); % upper flap
   fillbothsides(unitsquare scaled u shifted .5[z18$,z19$] shifted 
      (u*left+.5u*down));
      % catch on lower flap
   fillbothsides(unitsquare scaled u shifted .5[z18$,z19$] 
      shifted (u*left+.5u*down) shifted (z15$-z11$));
      % catch on upper flap
   
   draw fullcircle xscaled 5u yscaled 3u; % ellipse at base of spine
   draw z9$--z20$; % spine
   draw z18$--z19$; % vert line on lower flap
   draw (z18$--z19$) shifted (z15$-z11$); % ... and on upper flap
   
enddef;

def castle (suffix $) =
   z0$ = (0,0);
   
   def axis = (z0$, z0$ + up) enddef; % up the middle
   
   z1$ = (0, 6u); % top of doorway
   z17$ = (-2u,4u); % bottom left of door archway
   z2$ = (-2u,0); % bottom left of doorway
   z3$ = (-9u, 0); % bottom left
   z4$ = z3$ + 7u*up; % left bottom of band round castle
   z5$ = z4$ + 6u*right; % end of band
   z7$ = z4$ + (-2u,2u); % left edge of band
   z8$ = z4$ + 4u*up; % left top of band
   z9$ = (-7u,33u); % top of body
   z10$ = z9$ + (-u,2u); % bottom of battlements
   z11$ = z10$ + u*left; % bottom left of battlements
   z12$ = z11$ + (-2u,6u); % top left
   z13$ = z12$ + 4u*right; % top right of lh battlement
   z14$ = z13$ + (u,-3u); % bottom left of lh gap
   z15$ = z14$ + 3u*right; % bottom right
   z16$ = z15$ + 3u*up; % top left of middle battlement
   
   pickup detailpen;

   drawbothsides(z1${left}..{down}z17$--z2$--z3$--z4$); % lower floor
   drawbothsides(z5$--z4$..z7$..z8${right}); 
   draw z8$--(z8$ reflectedabout axis); % band
   drawbothsides(z8$--z9$--z10$); % upper floor
   draw z9$--(z9$ reflectedabout axis); % top of top floor
   drawbothsides(z11$--z12$--z13$--z14$--z15$--z16$); % battlements
   draw z11$--(z11$ reflectedabout axis); % bottom of battlements
   draw z16$--(z16$ reflectedabout axis); % top of middle battlement
   
   drawbothsides(unitsquare scaled 3u yscaled 2.5 shifted (-5u,14u));
      % lower windows
   draw unitsquare scaled 3u yscaled 2.5 shifted (-1.5u,24u); % upper window
   
enddef;

def ship (suffix $) =
   z0$ = (0,0);
   
   def axis = (z0$, z0$ + up) enddef; % up the middle
   
   z1$ = (-22u,9u); % front of the hull
   z2$ = (-10u, 0); % front of the keel
   z3$ = (10u, 0); % back of the keel
   z4$ = (14u, u); % further back on the keel
   z5$ = (16u, 10u); % back of the hull
   z6$ = z1$ + 2u*right;
   z7$ = (-7u, 2u); % lower deck
   z8$ = (5u, 2u);
   x9$ = x1$; y9$ = y10$;
   z10$ = (-25u, 11u); % bottom of bowsprit
   z11$ = z10$ + 2u*up; % top deck...
   z12$ = z11$ + 15u*right;
   z13$ = z12$ + (4u,-3u);
   z14$ = z13$ + 13u*right;
   z15$ = z14$ + (4u,3u);
   z16$ = z15$ + 10u*right;
   x17$=x16$; y17$=y5$;
   z18$ = z17$ + (-13u,-2u);
   z19$ = z18$ + 15u*left;
   x20$ = x19$ - 9u; y20$=y10$;
   
   z29$ = (-15u,23u); 
   z30$ = z29$ + (28u,14u); % ``crossbar'' for sail
   z25$ = .05[z29$,z30$];
   z26$ = .15[z29$,z30$] + (2u,-2u);
   z27$ = .75[z29$,z30$] + (2u,-2u);
   z28$ = .95[z29$,z30$];
   path lsail, msail, rsail; % three parts of sail
   rsail = z27${dir -45}..{(z30$-z29$) rotated 90}z28$;
   msail = z26${dir -45}..tension 1.4..(point .25 of rsail);
   lsail = z25${(z30$-z29$) rotated -90}..(point .08 of msail);
   
   x21$ = -u; y21$ = y13$; % bottom left of mast
   x23$ = u; y23$ = y21$;  % bottom right
   x22$ = -.5u; z22$ = ((x22$,0)--(x22$,h)) intersectionpoint msail; % top left
   x24$ = .5u; z24$ = ((x24$,0)--(x24$,h)) intersectionpoint msail; % top right
   
   x31$ = 0; z31$ = whatever[z29$,z30$];
   z32$ = z31$ + 10u*up; % flagpole
   z33$ = .7[z31$,z32$] + 10u*left; % tip of flag
   
   pickup detailpen;
   
   draw z1${right}..{right}z2$--z3${right}..z4$; draw z4${up}..z5$; % keel
   draw z9$--z1$--z6${right}..{right}z7$--z8${right}..z5$; % lower deck
   draw z10$--z11$--z12${right}..{right}z13$--z14${right}..z15$--z16$--
        z17$--z5${left}..{left}z18$--z19${left}..{left}z20$-- cycle; % top deck
   
   def oar (expr p) =
      draw (p+1.5u*left){dir 60}..{dir -60}(p+1.5u*right);
      draw p--(p+(5u,-9u));
   enddef;
   
   oar((-8u,5u));
   oar((-3u,5u));
   oar((2u,5u));
   oar((7u,5u));
   
   draw z21$--z22$; draw z23$--z24$; % mast
   
   draw lsail; draw msail; draw rsail;
   draw z29$--z30$; % `crossbar' for mast
   
   draw z31$--z32$; % flagpole
   draw (.2[z31$,z32$]){dir 120}..z33${dir 120};
   draw (.8[z31$,z32$]){dir 135}..z33${dir 135}; % flag
enddef;

def lion (suffix $) =
   path lowermanea, lowermaneb, lowermanec;
   lowermaneb = flex( (5u, 28u), (3u, 26u), (3u, 23u) ) &
                flex( (3u, 23u), (4u, 24u), (5u, 24u), (7u, 26u) ) &
                flex( (7u, 26u), (6u, 24u), (7u, 22u) ) &
                flex( (7u, 22u), (8u, 24u), (9u, 24u) ) &
                flex( (9u, 24u), (7.5u, 21u), (8u, 19u) ) &
                flex( (8u, 19u), (10u, 21u), (12u, 22u) );
   lowermanea = flex( (4u, 33u), (2u, 31u), (2u, 30u), (u, 29u) ) &
                flex( (u, 29u), (2u, 28u), (4u, 29u) ) & 
                flex( (4u, 29u), (3u, 27u), (point .8 of lowermaneb) );
   lowermanec = flex( (14u, 23u), (13u, 20u), (14u, 17u) ) &
                flex( (14u, 17u), (15u, 19u), (18u, 21u), (18u, 23u) ) &
                flex( (18u, 23u), (19u, 21u), (20u, 21u), (21u, 20u) ) &
                flex( (21u, 20u), (20u, 22u), (22u, 24u), (20u, 26u) ) &
                flex( (20u, 26u), (21u, 25.5u), (23u, 26.5u), (25u, 26u) ) &
                flex( (25u, 26u), (24u, 27u), (23u, 29.5u), (22u, 30u) ) &
                flex( (22u, 30u), (23u, 30u), (24u, 31.5u), (25u, 31u) ) &
                flex( (25u, 31u), (24.5u, 31.5u), (24u, 33u), (22u, 33u) ) &
                flex( (22u, 33u), (24u, 34u), (26u, 36u), (27u, 36u) ) &
                flex( (27u, 36u), (24u, 36.5u), (23u, 38u) );
   
   path uppermane, rightear;
   rightear = (20u, 45u) -- (21.5u, 46.5u) --
              flex( (21u, 44u), (23u, 44.5u), (25u, 42.5u), (26u, 42.5u) ) &
              flex( (26u, 42.5u), (24u, 42u), (22u, 40u), (20u, 41u) );
   uppermane = (6u, 45u) -- (4u, 46u) -- 
              flex( (5u, 44u), (4u, 44u), (0, 43u) ) &
              flex( (0, 43u), (2u, 41u), (3u, 39u), (5u, 39u) ) & 
              flex( (5u, 39u), (3u, 37u), (3u, 34u) ) &
              flex( (3u, 34u), (4.5u, 36u), (5u, 35.5u) ) &
              flex( (5u, 35.5u), (4u, 33u), (5u, 30u) ) &
              flex( (5u, 30u), (6u, 31.5u), (7u, 32u) ) &
              flex( (7u, 32u), (7u, 30u), (8u, 26u) ) &
              flex( (8u, 26u), (8.5u, 28u), (10u, 30u) ) &
              flex( (10u, 30u), (10u, 28u), (11u, 27u), (11u, 26u) ) &
              flex( (11u, 26u), (12u, 28u), (14u, 28u), (14u, 30u) ) &
              flex( (14u, 30u), (15u, 28.5u), (14u, 27u) ) &
              flex( (14u, 27u), (16u, 28.5u), (17u, 31u) ) &
              flex( (17u, 31u), (18u, 30u), (18u, 29u) ) &
              flex( (18u, 29u), (19u, 32u), (18u, 34u) ) &
              flex( (18u, 34u), (19.5u, 33u), (20u, 32u) ) &
              flex( (20u, 32u), (20u, 35u), (19u, 36u) ) &
              flex( (19u, 36u), (21u, 36u), (23u, 35u) ) &
              flex( (23u, 35u), (23u, 36u), (21u, 38u), point 7 of rightear );
   
   path leftfrontleg;
   leftfrontleg = 
      flex( point 2.8 of lowermanec, (19u, 12u), (20u, 6u) ) &
      flex( (20u, 6u), (18u, 4.5u), (14u, 4.5u), (16u, 3u) ) &
      flex( (16u, 3u), (16u, u), (19u, 3u) ) &
      flex( (19u, 3u), (20u, .5u), (22u, 2u), (24u, 2u), (24u, 6u), (26u, 7u) ) &
      flex( (26u, 7u), (25u, 7.5u), (24u, 7u) ) &
      flex( (24u, 7u), (24.5u, 8u), (26u, 9u) ) &
      flex( (26u, 9u), (25u, 10u), (23u, 11u) ) &
      flex( (23u, 11u), (25u, 11.5u), (26u, 11u) ) &
      flex( (26u, 11u), (23u, 15u), (25u, 18u) ) &
      flex( (25u, 18u), (23u, 19u), (23u, 21u) );
   
   path rightfrontmidtoe;
   rightfrontmidtoe = flex( (5u, 4u), (3u, 5u), (2u, 2u) ) ... {right}(6u, 3u);
   
   path rightfrontlega, rightfrontlegb;
   rightfrontlega =
      flex( point 12.5 of lowermaneb, (10u, 10u), (6u, 7u) ) &
      flex( (6u, 7u), (2u, 7u), point 1 of rightfrontmidtoe );
   rightfrontlegb =
      flex( (6u, 3u), (6u, 0), (9u, 3u), (11u, 2u), (12u, 6u), (13u, 5u) ) &
      flex( (13u, 5u), (13.5u, 6.5u), (13u, 8u) ) &
      flex( (13u, 8u), (14u, 8.5u), (16u, 7.5u) ) &
      flex( (16u, 7.5u), (16u, 9u), (15u, 11u) ) &
      flex( (15u, 11u), (16u, 11u), (17u, 10u) ) &
      flex( (17u, 10u), (16.5u, 11.5u), point .6 of leftfrontleg );
   
   path riba, ribb, ribc, ribd;
   riba = flex( point 21.7 of leftfrontleg, (26u, 18u), (27u, 21u) );
   ribb = flex( point .7 of riba, (28u, 18u), (30u, 21u) );
   ribc = flex( point .5 of ribb, (31u, 19u), (33u, 22u) );
   ribd = flex( point .7 of ribc, (33u, 18.5u), (36u, 21u), (39u, 22u) );
   
   path leftrearlega, leftrearlegb;
   leftrearlegb =
      flex( (58u, 3u), (58u, u), (59u, 2u), (63u, 2u), (64u, 6u), (66u, 7u) ) &
      flex( (66u, 7u), (64u, 9u), (66u, 11u) ) &
      flex( (66u, 11u), (64u, 12u), (66u, 13u) ) &
      flex( (66u, 13u), (64u, 14u), (62u, 13u) ) &
      flex( (62u, 13u), (61u, 15u), (62u, 17u) ) &
      flex( (62u, 17u), (60.5u, 16u), (60u, 14u) ) &
      flex( (60u, 14u), (56.5u, 17u), (55u, 26u), (52u, 26u) );
   leftrearlega =
      flex( (38u, 24u), (45u, 18u), (43u, 14u) ) 
      --(47.5u, 16u)--(47u, 14u)--
      flex( (49u, 15u), (49u, 13u), (50u, 11u) ) --
      flex( (50u, 15u), (52u, 13u), (55u, 12u) ) ..
      flex( (60u, 8u), (59u, 7u), (55u, 7u), (56u, 5u) ) &
      flex( (56u, 5u), (54.5u, 3.5u), point .45 of leftrearlegb );
   
   path rightrearleg;
   rightrearleg =
      (point 1.6 of ribd) -- 
      flex( (35u, 17u), (33.5u, 15u), (33.5u, 13.5u) ) &
      flex( (33.5u, 13.5u), (35u, 15.5u), (36u, 16u) ) &
      flex( (36u, 16u), (35u, 14u), (36u, 12u) ) &
      flex( (36u, 12u), (36u, 13u), (37u, 15u) ) &
      flex( (37u, 15u), (42u, 10u), (39u, 6u) ) ..
      flex( (36u, 7u), (34u, 6u), (36u, 4.5u) ) &
      flex( (36u, 4.5u), (33u, 4.5u), (35u, 3u) ) &
      flex( (35u, 3u), (35u, -.5u), (38u, 2u), (39u, u), (43u, 3u), (43u, u) )
    & flex( (43u, u), (44u, 2u), (45u, 5u) ) 
      -- (46u, 3u) -- (46u, 6u) --
      flex( (49u, 5u), (47u, 8u), (49u, 11u) ) &
      flex( (49u, 11u), (46u, 12u), point 2.6 of leftrearlega );
   
   def axis = ((13u,0), (13u,1)) enddef;
   
   pickup detailpen;
   
   % Head:
   draw lowermanea; draw lowermaneb; draw lowermanec;
   draw flex( (19u, 25u), (20u, 24.5u), (20.5u, 24u) );
   %
   draw uppermane; draw flex( (4u, 41u), (5u, 42u), (2u, 42u) );
   draw rightear; draw flex( (21u, 42u), (21u, 43u), (23u, 43u) );
   %
   draw flex( (6u, 41u), (6u, 39u), (7u, 38u), (7u, 36u) ); % cheeks
   draw flex( (19u, 40u), (19.5u, 39u), (18u, 37u), (18.5u, 36u) );
   %
   drawbothsides( flex( (6u, 43u), (8u, 42u), (10u, 42.5u), (12u, 41u) )
                & flex( (12u, 41u), (11u, 41u), (8u, 40.5u), (7u, 42u) ) );
   drawbothsides( fullcircle scaled u shifted (9.5u,41.25u) ); % eyes
   %
   draw (13u,42u)--(13u,43u); % line on forehead
   %
   draw (10u, 39u){dir -120}..(13u, 36u){right}..{dir 120}(16u, 39u);
   draw flex( (12u, 39u), (13u, 37.5u), (14u, 39u) ); % nose
   %
   path tongue; tongue = flex( (11.5u,36u), (11.5u, 35u), (13u, 31u) );
   drawbothsides( flex( (10u, 37u), (10.5u, 35u), point 1.5 of tongue ));
   drawbothsides( tongue );
   draw (13u, 36u)--(13u, 35u); % mouth
   %
   % drawbothsides( (11u, 34u)--(8.5u, 35u) );
   % drawbothsides( (11u, 33u)--(9u, 32u) ); % whiskers?
   
   
   % Crown:
   draw (7u,44u)--((7u,44u) reflectedabout axis); % band
   drawbothsides (unitsquare scaled u xscaled 2 shifted (6.5u, 45u));
   drawbothsides (fullcircle scaled u shifted (10u, 45.5u));
   draw unitsquare scaled u xscaled 2 shifted (12u, 45u);
   draw (7u,47u)--((7u,47u) reflectedabout axis);
   %
   drawbothsides((7u,47u)--(4u,50u)--
                 flex( (6u,49u), (5u,50.5u), (6u, 51u) ) &
                 flex( (6u, 51u), (5.5u, 52.5u), (7u, 52u) ) &
                 flex( (7u, 52u), (7.25u, 53.5u), (8.5u, 53u) ) &
                 flex( (8.5u, 53u), (9.75u, 54u), (11u, 53u) ));
   drawbothsides(flex( (7u, 49u), (8u, 52u), (12u, 51u) ));
   %
   draw fullcircle scaled 2u shifted (13u, 52u);
   draw unitsquare scaled 2u yscaled .7 shifted (12u,49u);
   draw unitsquare scaled u xscaled 4 shifted (11u, 48u);
   path partofjewel; 
   partofjewel = flex( (12.5u, 55u), (13u, 53u), (13.5u, 55u) );
   partofjewel := partofjewel--(partofjewel rotatedaround ((13u, 55.5u), 90));
   draw partofjewel--(partofjewel rotatedaround ((13u, 55.5u), 180));
   drawbothsides(unitsquare scaled u rotated 45 yscaled 1.5 shifted (9u,48u));
   
   % draw leftfrontleg;
   draw subpath (0,4+xpart ((subpath(4,5-eps) of leftfrontleg) 
                                intersectiontimes 
                             (subpath(5+eps,6) of leftfrontleg)))
      of leftfrontleg;
   draw subpath (5,6+xpart ((subpath(6,7-eps) of leftfrontleg) 
                                intersectiontimes 
                             (subpath(7+eps,8) of leftfrontleg)))
      of leftfrontleg;
   draw subpath (7,infinity) of leftfrontleg;
   draw flex( point 4.3 of leftfrontleg, (12u, 2u), (12.5u, .5u) ) & 
        flex( (12.5u, .5u), (13u, 2u), point 4.6 of leftfrontleg );
   draw flex( point 5.5 of leftfrontleg, (14u, .5u), (15u, -.5u) ) & 
        flex( (15u, -.5u), (15u, .5u), point 6 of leftfrontleg );
   draw flex( point 7.5 of leftfrontleg, (17u, 0u), (18u, -u) ) & 
        flex( (18u, -u), (18u, -0u), point 7.8 of leftfrontleg );
   
   draw rightfrontlega; 
   draw subpath (0,xpart (rightfrontmidtoe intersectiontimes
                          (subpath (eps,infinity) of rightfrontlegb))) 
      of rightfrontmidtoe; 
   draw rightfrontlegb;
   draw flex( point 3 of rightfrontlega, (.3u, 6u), (0,4u) ) &
        flex( (0,4u), (u, 5u), point 3.5 of rightfrontlega );
   draw flex( point 1.4 of rightfrontmidtoe, (0.3u, 2.2u), (0u, .5u) ) &
        flex( (0u, .5u), (.7u, 1.8u), point 2 of rightfrontmidtoe );
   draw flex( point .5 of rightfrontlegb, (3u, u), (3u, -u) ) &
        flex( (3u, -u), (4u, 0), point .8 of rightfrontlegb );
   
   draw riba; draw ribb; draw ribc; draw ribd;
   
   draw leftrearlega; draw leftrearlegb;
   draw flex( point 13 of leftrearlega, (53.5u, 7.5u), (52u, 6u) ) &
        flex( (52u, 6u), (53u, 6.5u), point 13.7 of leftrearlega );
   draw flex( point 14.7 of leftrearlega, (53u, 4u), (51u, 2u) ) &
        flex( (51u, 2u), (53u, 3u), point 15.3 of leftrearlega );
   draw flex( point .5 of leftrearlegb, (55u, 2u), (54u, -u) ) &
        flex( (54u, -u), (54.5u, 0), point .8 of leftrearlegb );
   
   draw subpath (0,13+xpart ((subpath(13,14-eps) of rightrearleg) 
                                intersectiontimes 
                             (subpath(14+eps,15) of rightrearleg)))
      of rightrearleg;
   draw subpath (14,15+xpart ((subpath(15,16-eps) of rightrearleg) 
                                 intersectiontimes 
                              (subpath(16+eps,17) of rightrearleg)))
      of rightrearleg;
   draw subpath (16,infinity) of rightrearleg;
   
   draw flex( point 12.4 of rightrearleg, (33u, 8u), (32u, 6u) ) &
        flex( (32u, 6u), (33u, 7u), point 13.2 of rightrearleg );
   draw flex( point 14.9 of rightrearleg, (31u, 4u), (30u, 2u) ) &
        flex( (30u, 2u), (31u, 3u), point 15.4 of rightrearleg );
   draw flex( point 16.3 of rightrearleg, (32u, u), (31u, -u) ) &
        flex( (31u, -u), (32u, 0), point 16.6 of rightrearleg );
   
   draw flex( (52u, 26u), (54u, 27u), (56u, 27.5u), (59u, 29u) ) ..
        flex( (59u, 38u), (51u, 39u), (49u, 42u) ) &
        flex( (49u, 42u), (48u, 40u), (49u, 38u) ) &
        flex( (49u, 38u), (46u, 40u), (45u, 43u) ) &
        flex( (45u, 43u), (43.5u, 40.5u), (45u, 39u) ) &
        (45u, 39u){left}..(33u, 43u){up}..{dir -45}(43u, 43u) &
        flex( (43u, 43u), (43u, 44u), (42u, 46u) ) &
        flex( (42u, 46u), (48u, 44u), (53u, 48u) ) &
        flex( (53u, 48u), (50u, 46.5u), (47u, 47.5u), (45u, 47u) ) &
        flex( (45u, 47u), (47u, 48u), (48u, 50u) ) &
        flex( (48u, 50u), (46u, 49u), (41u, 50u), (39u, 49u) ) &
        flex( (39u, 49u), (40u, 51u), (37u, 52u) ) &
        flex( (37u, 52u), (37u, 50u), (31u, 46u), (30u, 43u) )
        {down}..{right}(43u, 37u) &
        flex( (43u, 37u), (42.5u, 35.5u), (43u, 34u) ) &
        flex( (43u, 34u), (44u, 36u), (47u, 37u) ) &
        flex( (47u, 37u), (47u, 35u), (50u, 33u) ) &
        flex( (50u, 33u), (49u, 35u), (51u, 37u) ) &
        flex( (51u, 37u), (51u, 36u), (52u, 34u) ) &
        flex( (52u, 34u), (56u, 37u), (59u, 33u) )
        {down}..{left}(53u, 31u)..{left}(44u,32u)..{left}(34u,31u)..
        point 24.5 of lowermanec; % tail and back
enddef;

def banner(suffix $) =
   def axis = ((.5total_width, 0), (.5total_width,0)+up) enddef;

   path upperedge,loweredge;
   upperedge = 
      ((15u,49u){curl 0}..tension 2..(7u,52u)..tension 4..(43u,32u)
         ..tension 4..(10u,30u)..tension 4 and 1..{right}(.5total_width,15u))
      shifted (banner_gap_knob * u*down);
   loweredge = 
      (( 9u,39u){curl 0}..tension 2.. (u,42u)..tension 4..(39u,21u)
         ..tension 4..( 6u,19u)..tension 4 and 1..{right}(.5total_width,u))
      shifted (banner_gap_knob * u*down);

   pair intersectA, intersectB;
   intersectA = ((subpath (1,2) of loweredge) intersectiontimes
                 (subpath (2,3) of upperedge)) + (1,2);
   intersectB = ((subpath (2,3) of loweredge) intersectiontimes
                 (subpath (3,4) of upperedge)) + (2,3);
   
   pickup thinpen;
   drawbothsides ((((point 0 of loweredge)--(point 0 of upperedge)) 
      intersectionpoint (subpath (1,infinity) of upperedge))
      -- point 0 of upperedge);
   drawbothsides (subpath (0,2) of upperedge);
   drawbothsides (subpath (ypart intersectA,4) of upperedge);
   drawbothsides (subpath (1,xpart intersectB) of loweredge);
   drawbothsides (subpath (3.06,4) of loweredge);

   def dent (expr za,zb,delta) = 
      (.5[za,zb] + delta * (unitvector(zb-za) rotated 90))
   enddef;

   def wiggle (expr p,q,delta) = 
      (subpath (length p,2+length p) of 
         (p...dent(point (length p) of p, point 0 of q,delta)...q))
   enddef;

   drawbothsides 
      (wiggle ((subpath (0,1) of upperedge),(subpath (1,2) of loweredge),.5u));
   drawbothsides 
      (wiggle ((subpath (1,2) of upperedge),(subpath (2,3) of loweredge),-.5u));
   drawbothsides 
      (wiggle ((subpath (2,3.06) of upperedge),(subpath (3.06,4) of loweredge),.5u));

   def diagfoot(expr base, dirn) =
      draw base+u*left -- base+.5u*right;
      draw base+u*left{right}..{dirn}base+u*dir angle dirn;
   enddef;
   
   def foot(expr base) =
      diagfoot(base, up);
   enddef;
   
   def diaghook(expr topofstem, dirn) =
      draw topofstem-u*dir 30 -- topofstem;
      draw topofstem-u*dir 30{dir 30}..{dirn}topofstem+u*dir angle dirn;
   enddef;
   
   def hook(expr topofstem) =
      diaghook(topofstem, down);
   enddef;
   
   def vertstem(expr base) = % for F, I, H, R
      foot(base);
      draw base -- base+lh*up;
      hook(base+lh*up);
   enddef;
   
   def crossbar(expr leftend, straightlength) =
      draw leftend -- leftend+straightlength*right {right}
           ..{dir 30}leftend+(straightlength+u)*right + .5u*dir 45;
   enddef;
   
   def upperbowl(expr bl, midht) = % for B, R
      draw bl+.8lh*up{dir 30} .. bl+lh*up+2u*right .. 
           bl+(midht+u)*up+3u*right..{left}bl+midht*up;
   enddef;
   
   def SEdiagwithtail(expr nw, se) = % eg R
      draw nw{se+.5u*left-nw} .. se .. se+.3u*dir 45;
   enddef;
   
   def SEdiagwithtwotails(expr nw, se) = % eg A, N
      draw nw+u*-dir 30 .. nw 
           ... {se+.5u*left-(nw+.5u*right)}.5[nw,se] ...
           se .. se+u*dir 30;
   enddef;
   
   numeric letterspacing; letterspacing = 2.6u;

   def letter (expr c) =
     % this big case statement is a bit grotty, but a better way doesn't
     % spring to mind...
     if c = ASCII "A":
      SEdiagwithtwotails(lh*up+2u*right, 5u*right);
      draw (0,0)--lh*up+2u*right;
      diagfoot((0,0),lh*up+2u*right);
      crossbar(.4[(0,0),lh*up+2u*right], 2.5u);
      width(letterspacing+5u);

     elseif c = ASCII "B":
      vertstem((0,0));
      upperbowl((0,0), .5lh);
      draw .5lh*up{right} .. .2lh*up+3.5u*right .. {left}(0,0);
      width(letterspacing+3u);
     
     elseif c = ASCII "E":
      crossbar((0,0), 2u);
      vertstem((0,0));   % next four lines same as an "F"
      crossbar(.5lh*up, u);
      draw .8lh*up{dir 30} .. lh*up+2u*right .. .8lh*up+3u*right;
      width(letterspacing+3u);
     
     elseif c = ASCII "F":
      vertstem((0,0));
      crossbar(.5lh*up, u);
      draw .8lh*up{dir 30} .. lh*up+2u*right .. .8lh*up+3u*right;
      width(letterspacing+3u);
      
     elseif c = ASCII "G":
      draw 4u*right+(lh-u)*up .. 3u*right+lh*up ..
           .5lh*up .. 2u*right .. {up}4u*right+.5lh*up;
      draw 4u*right -- 4u*right+.5lh*up -- 3u*right+.5lh*up;
      width(letterspacing+4u);
     
     elseif c = ASCII "H":
      vertstem((0,0));
      vertstem(3.5u*right);
      crossbar(.5lh*up, 3u);
      width(letterspacing+3.5u);
     
     elseif c = ASCII "I":
      vertstem((0,0));
      width(letterspacing+u);
     
     elseif c = ASCII "L":
      vertstem((0,0));
      crossbar((0,0), 2u);
      width(letterspacing+3u);
     
     elseif c = ASCII "M":
      diagfoot((0,0), lh*up+.5u*right);
      draw (0,0) -- lh*up+.5u*right;
      SEdiagwithtwotails(lh*up+.5u*right, 3.5u*right);
      draw 3u*right+.5u*up -- 5u*right+lh*up -- 6u*right+lh*up;
      draw 5u*right+lh*up -- 6u*right;
      diagfoot(6u*right, lh*up-u*right);
      width(letterspacing+6u);
     
     elseif c = ASCII "N":
      foot((0,0));
      draw (0,0)--.85lh*up;
      SEdiagwithtwotails(lh*up+u*left, 4u*right);
      draw 4u*right -- 4u*right+.8lh*up ..
           3u*right+lh*up{left} -- 3u*right+lh*up+u*-dir 60;
      width(letterspacing+4u);
     
     elseif c = ASCII "R":
      vertstem((0,0));
      upperbowl((0,0), .4lh);
      SEdiagwithtail(.4lh*up+u*right, 4u*right);
      width(letterspacing+3.5u);
     
     elseif c = ASCII "S":
      draw 4u*right+(lh-u)*up-.5u*dir 45 --
           4u*right+(lh-u)*up .. {left}2u*right+lh*up .. 
           (lh-2u)*up .. 4u*right+2u*up .. 
           {left}2u*right .. u*up
           -- u*up+.5u*dir 45;
      width(letterspacing+3.5u);
     
     elseif c = ASCII "T":
      foot(2.5u*right);
      draw 2.5u*right -- 2.5u*right+lh*up;
      draw u*right+(lh-2u)*up{dir 135} .. (lh-u)*up ..
           {right}2u*right+lh*up -- 5u*right+lh*up;
      width(letterspacing+4u);
     
     elseif c = ASCII "U":
      hook(lh*up);
      draw lh*up{down} -- .4lh*up{down} ..
           2u*right{right} -- 3.5u*right+u*up;
      hook(3.5u*right+lh*up);
      draw 3.5u*right+lh*up -- 3.5u*right -- 3.5u*right+.5u*dir 20;
      width(letterspacing+4u);
     
     elseif c = ASCII "W":
      draw lh*up -- 2u*right -- .3[3u*right+lh*up,5u*right];
      draw 3u*right+lh*up -- 5u*right;
      draw 5u*right{dir 60} .. {left}5u*right+lh*up 
           -- 5u*right+lh*up + .5u*dir 30;
      diaghook(lh*up, 2u*right-lh*up);
      diaghook(3u*right+lh*up, 2u*right-lh*up);
      width(letterspacing+6u);
     
     elseif c = ASCII " ":
      width(letterspacing+0); % used to be +1.5u, but that was too slack

     elseif c = ASCII "/":
      width(-.5u); % small kern
      
     fi;
   enddef;
   
   % pathtext takes theword (a string) and draws it with a baseline that
   % follows thepath (roughly). Probably won't work for intricate paths,
   % but fine for smooth shallow curves.
   
   def pathtext (expr theword, thepath) =
      % width advances thetime, so that the next letter will go in the right
      % place on thepath. Works by intersecting thepath with the `vertical'
      % line at the right of the character.
      def width(expr wid) =
         thetime := xpart (thepath intersectiontimes
            (((wid,-infinity)--(wid,infinity))
               transformed currenttransform));
      enddef;
      numeric thetime; thetime := 0;
      transform savetfm; savetfm := currenttransform;
         for i = 1 upto (length theword):
            currenttransform := 
               savetfm rotated(angle direction thetime of thepath)
                       shifted(point thetime of thepath);
               % ie the translation to put the letter at the right place
               % and angle on thepath
            letter(ASCII (substring (i-1,i) of theword))
         endfor;
      currenttransform := savetfm;
   enddef;

   numeric lh; lh = 6u; % letter height
   
   pickup calligraphicpen;

   def offset (expr d, t, p) = % point d away from path p at time t
      (point t of p + d*dir(90 + angle direction t of p))
   enddef;

   pathtext ("WHERE", subpath (1.25, 2) of loweredge 
         shifted (3.15u*dir (90 + angle direction 1.7 of loweredge)));

   path thetextpath;
   
   def scaffold (expr theoffset, thetime) =
      if thetime <= 4:
         offset(theoffset,thetime,loweredge)
            {direction thetime of loweredge}
      else:
         offset(theoffset,(thetime-4),reverse (loweredge reflectedabout axis))
            {direction (thetime-4) of reverse (loweredge reflectedabout axis)}
      fi
   enddef;

   thetextpath = 
      (scaffold(3.15u,3.32) ... scaffold(3.2u,3.6) ... scaffold(3.25u,4)
                         ... scaffold(3.2u,4.4) ... scaffold(3.15u,4.68))
         shifted (u*up);
   pathtext ("FINBARR T/A/U/GHT L/E//T MUNSTER", thetextpath);

   pathtext ("LEARN", 
         subpath (2.25,3) of reverse (loweredge reflectedabout axis) 
         shifted (3.15u*dir (90 + angle direction 2.5 of 
                 reverse (loweredge reflectedabout axis))));
      
enddef;

      transform tfm;
      tfm := currenttransform;
   
      currenttransform := tfm;                                 shield(a);
%%                                                               banner(j);

      currenttransform := tfm shifted (round 106u, round 79u); crown(b);
      currenttransform := tfm shifted (round 144u, round 79u); crown(c);
      currenttransform := tfm shifted (round 125u, round 48u); crown(d);
   
      currenttransform := tfm shifted (.5total_width, 109u);   book(e);

      currenttransform := tfm shifted (132u, 148u);            castle(f);
      currenttransform := tfm shifted (total_width-132u,148u); castle(g);
   
      currenttransform := tfm shifted (.5total_width,151u);    ship(h);
   
      currenttransform := tfm shifted (15u,57u);               lion(i);

      currenttransform := tfm;

picture crest_picture; cullit; % crest_picture := currentpicture;
crest_picture := nullpicture; addto crest_picture also currentpicture;

clearit; 
fill unitsquare xscaled (section_width+4u) 
                yscaled (total_height+(banner_gap_knob+1)*u)
                shifted (2u*left+(banner_gap_knob+1)*u*down);
picture mask; cullit; mask = currentpicture;

   for code := 1 upto sections:
      beginchar(code, section_width#, total_height#, total_depth#); "UCC Arms";
         currentpicture := crest_picture shifted ((code-1)* -section_width,0);
         addto currentpicture also mask; cull currentpicture keeping (2,2);
      endchar;
   endfor


end
%    \end{macrocode}
% \iffalse
%</crestfont>
% \fi
% \iffalse
%<*creststyle>
% \fi
% \clearpage
% \section{\LaTeX{} style file for the UCC crest}\label{creststyle}
% \iffalse
%% 
%% LaTeX style file for the UCC crest
% \fi
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
\ProvidesPackage{ucccrest}[2014/09/21 v2.3
 LaTeX style file for the UCC crest]
%    \end{macrocode}
% This is the {\ttfamily{}uccnew.sty} style package
% for the UCC crest implemented as a character in a \MF{}
% font outline.\par
%    \begin{macrocode}
%% UCC crest implemented as a character in a METAFONT font outline
\def\fileversion{2.0}
\def\filedate{2012/11/22}
\def\docdate{2013/07/06}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ucccrest}[\filedate\space\fileversion\space 
 UCC 2013 crest font MFNFSS2e package]
%%\RequirePackage[U]{fontenc}
\newcommand{\UCCcrest}{\fontencoding{U}\fontfamily{zcc}\selectfont\char'001 }
%    \end{macrocode}
% \iffalse
%</creststyle>
% \fi
% \iffalse
%<*crestfd>
% \fi
% \clearpage
% \section{UCC crest font definition file}\label{crestfd}
% \iffalse
%% 
%% UCC crest font definition file
% \fi
% \par
%    \begin{macrocode}
%% Filename: uzcc UCC crest
%% Created by: PF 2000/03/23
\ProvidesFile{uzcc.fd}
   [2000/03/23 UCC crest definitions for U/zcc.]
\DeclareFontFamily{U}{zcc}{}
\DeclareFontShape{U}{zcc}{m}{n}{<-> uccnew}{}
%    \end{macrocode}
% \iffalse
%</crestfd>
% \fi
% \newgeometry{left=3cm}
% \clearpage
% \section{The \LaTeX{} Project Public License}\label{LPPL:LPPL}
% \begin{quotation}\small\noindent
% Everyone is allowed to distribute verbatim copies of this
%       license document, but modification of it is not allowed.
% \end{quotation}
% \subsection{Preamble}\label{LPPL:Preamble}
% The \LaTeX{} Project Public License ({\small LPPL})
%       is the primary license under which the \LaTeX{} kernel and the
%       base \LaTeX{} packages are distributed.\par
% You may use this license for any work of which you hold the
%       copyright and which you wish to distribute.  This license may be
%       particularly suitable if your work is \TeX{}-related (such as a
%       \LaTeX{} package), but it is written in such a way that you can
%       use it even if your work is unrelated to \TeX{}.\par
% The section \emph{Whether and How to Distribute Works under This
%       License}, below, gives instructions, examples, and
%       recommendations for authors who are considering distributing
%       their works under this license.\par
% This license gives conditions under which a work may be
%       distributed and modified, as well as conditions under which
%       modified versions of that work may be distributed.\par
% We, the \LaTeX{3} Project, believe that the conditions below
%       give you the freedom to make and distribute modified versions of
%       your work that conform with whatever technical specifications
%       you wish while maintaining the availability, integrity, and
%       reliability of that work.  If you do not see how to achieve your
%       goal while meeting these conditions, then read the document
%       {\ttfamily{}cfgguide.tex} and {\ttfamily{}modguide.tex} in the base \LaTeX{}
%       distribution for suggestions.\par
% \subsection{Definitions}\label{LPPL:Definitions}
% In this license document the following terms are used:\par
% \begin{description}[style=unboxed]
% \item[Work\thinspace:]Any work being distributed under this License.
% \item[Derived Work\thinspace:]Any work that under any applicable law is derived from
%     the Work.
% \item[Modification\thinspace:]Any procedure that produces a Derived Work under any
%     applicable law~--- for example, the production of a file
%     containing an original file associated with the Work or a
%     significant portion of such a file, either verbatim or
%     with modifications and/or translated into another
%     language.
% \item[Modify\thinspace:]To apply any procedure that produces a Derived Work
%     under any applicable law.
% \item[Distribution\thinspace:]Making copies of the Work available from one person to
%     another, in whole or in part.  Distribution includes (but
%     is not limited to) making any electronic components of the
%     Work accessible by file transfer protocols such as
%     {\small FTP} or {\small HTTP} or by
%     shared file systems such as Sun's Network File System
%     ({\small NFS}).
% \item[Compiled Work\thinspace:]A version of the Work that has been processed into a
%     form where it is directly usable on a computer system.
%     This processing may include using installation facilities
%     provided by the Work, transformations of the Work, copying
%     of components of the Work, or other activities.  Note that
%     modification of any installation facilities provided by
%     the Work constitutes modification of the Work.
% \item[Current Maintainer\thinspace:]A person or persons nominated as such within the Work.
%     If there is no such explicit nomination then it is the
%     `Copyright Holder' under any applicable
%     law.
% \item[Base Interpreter\thinspace:]A program or process that is normally needed for
%     running or interpreting a part or the whole of the
%     Work.\par
% A Base Interpreter may depend on external components
%     but these are not considered part of the Base Interpreter
%     provided that each external component clearly identifies
%     itself whenever it is used interactively.  Unless
%     explicitly specified when applying the license to the
%     Work, the only applicable Base Interpreter is a
%     `\LaTeX{}-Format' or in the case of files
%     belonging to the `\LaTeX{}-format' a program
%     implementing the `\TeX{} language'.
% \end{description}
% \subsection{Conditions on Distribution and Modification}\label{LPPL:Conditions}
% \begin{enumerate}
% \item Activities other than distribution and/or modification
%   of the Work are not covered by this license; they are
%   outside its scope. In particular, the act of running the
%   Work is not restricted and no requirements are made
%   concerning any offers of support for the Work.
% \item \label{LPPL:item:distribute}You may distribute a complete, unmodified copy of the
%   Work as you received it.  Distribution of only part of the
%   Work is considered modification of the Work, and no right to
%   distribute such a Derived Work may be assumed under the
%   terms of this clause.
% \item You may distribute a Compiled Work that has been
%   generated from a complete, unmodified copy of the Work as
%   distributed under Clause~item~\ref{LPPL:item:distribute} above above, as
%   long as that Compiled Work is distributed in such a way that
%   the recipients may install the Compiled Work on their system
%   exactly as it would have been installed if they generated a
%   Compiled Work directly from the Work.
% \item \label{LPPL:item:currmaint}If you are the Current Maintainer of the Work, you may,
%   without restriction, modify the Work, thus creating a
%   Derived Work.  You may also distribute the Derived Work
%   without restriction, including Compiled Works generated from
%   the Derived Work.  Derived Works distributed in this manner
%   by the Current Maintainer are considered to be updated
%   versions of the Work.
% \item If you are not the Current Maintainer of the Work, you
%   may modify your copy of the Work, thus creating a Derived
%   Work based on the Work, and compile this Derived Work, thus
%   creating a Compiled Work based on the Derived Work.
% \item \label{LPPL:item:conditions}If you are not the Current Maintainer of the Work, you
%   may distribute a Derived Work provided the following
%   conditions are met for every component of the Work unless
%   that component clearly states in the copyright notice that
%   it is exempt from that condition.  Only the Current
%   Maintainer is allowed to add such statements of exemption to
%   a component of the Work.
% \begin{enumerate}
% \item If a component of this Derived Work can be a direct
%       replacement for a component of the Work when that
%       component is used with the Base Interpreter, then,
%       wherever this component of the Work identifies itself to
%       the user when used interactively with that Base
%       Interpreter, the replacement component of this Derived
%       Work clearly and unambiguously identifies itself as a
%       modified version of this component to the user when used
%       interactively with that Base Interpreter.
% \item Every component of the Derived Work contains
%       prominent notices detailing the nature of the changes to
%       that component, or a prominent reference to another file
%       that is distributed as part of the Derived Work and that
%       contains a complete and accurate log of the
%       changes.
% \item No information in the Derived Work implies that any
%       persons, including (but not limited to) the authors of
%       the original version of the Work, provide any support,
%       including (but not limited to) the reporting and
%       handling of errors, to recipients of the Derived Work
%       unless those persons have stated explicitly that they do
%       provide such support for the Derived Work.
% \item You distribute at least one of the following with
%       the Derived Work:
% \begin{enumerate}
% \item A complete, unmodified copy of the Work; if your
%   distribution of a modified component is made by
%   offering access to copy the modified component from
%   a designated place, then offering equivalent access
%   to copy the Work from the same or some similar place
%   meets this condition, even though third parties are
%   not compelled to copy the Work along with the
%   modified component;
% \item Information that is sufficient to obtain a
%   complete, unmodified copy of the Work.
% \end{enumerate}
% \end{enumerate}
% \item If you are not the Current Maintainer of the Work, you
%   may distribute a Compiled Work generated from a Derived
%   Work, as long as the Derived Work is distributed to all
%   recipients of the Compiled Work, and as long as the
%   conditions of Clause~item~\ref{LPPL:item:conditions} above, above, are met
%   with regard to the Derived Work.
% \item The conditions above are not intended to prohibit, and
%   hence do not apply to, the modification, by any method, of
%   any component so that it becomes identical to an updated
%   version of that component of the Work as it is distributed
%   by the Current Maintainer under Clause~item~\ref{LPPL:item:currmaint} above, above.
% \item Distribution of the Work or any Derived Work in an
%   alternative format, where the Work or that Derived Work (in
%   whole or in part) is then produced by applying some process
%   to that format, does not relax or nullify any sections of
%   this license as they pertain to the results of applying that
%   process.
% \item % \begin{enumerate}
% \item A Derived Work may be distributed under a different
%       license provided that license itself honors the
%       conditions listed in Clause~item~\ref{LPPL:item:conditions} above above, in
%       regard to the Work, though it does not have to honor the
%       rest of the conditions in this license.
% \item If a Derived Work is distributed under a different
%       license, that Derived Work must provide sufficient
%       documentation as part of itself to allow each recipient
%       of that Derived Work to honor the restrictions in
%       Clause~item~\ref{LPPL:item:conditions} above above, concerning
%       changes from the Work.
% \end{enumerate}
% \item This license places no restrictions on works that are
%   unrelated to the Work, nor does this license place any
%   restrictions on aggregating such works with the Work by any
%   means.
% \item Nothing in this license is intended to, or may be used
%   to, prevent complete compliance by all parties with all
%   applicable laws.
% \end{enumerate}
% \subsection{No Warranty}\label{LPPL:Warranty}
% There is no warranty for the Work.  Except when otherwise
%       stated in writing, the Copyright Holder provides the Work
%       `as is', without warranty of any kind, either
%       expressed or implied, including, but not limited to, the implied
%       warranties of merchantability and fitness for a particular
%       purpose.  The entire risk as to the quality and performance of
%       the Work is with you.  Should the Work prove defective, you
%       assume the cost of all necessary servicing, repair, or
%       correction.\par
% In no event unless required by applicable law or agreed to
%       in writing will The Copyright Holder, or any author named in the
%       components of the Work, or any other party who may distribute
%       and/or modify the Work as permitted above, be liable to you for
%       damages, including any general, special, incidental or
%       consequential damages arising out of any use of the Work or out
%       of inability to use the Work (including, but not limited to,
%       loss of data, data being rendered inaccurate, or losses
%       sustained by anyone as a result of any failure of the Work to
%       operate with any other programs), even if the Copyright Holder
%       or said author or said other party has been advised of the
%       possibility of such damages.\par
% \subsection{Maintenance of The Work}\label{LPPL:Maintenance}
% The Work has the status `author-maintained'
%       if the Copyright Holder explicitly and prominently states near
%       the primary copyright notice in the Work that the Work can only
%       be maintained by the Copyright Holder or simply that it is
%       `author-maintained'.\par
% The Work has the status `maintained' if there
%       is a Current Maintainer who has indicated in the Work that they
%       are willing to receive error reports for the Work (for example,
%       by supplying a valid e-mail address). It is not required for the
%       Current Maintainer to acknowledge or act upon these error
%       reports.\par
% The Work changes from status `maintained' to
%       `unmaintained' if there is no Current Maintainer,
%       or the person stated to be Current Maintainer of the work cannot
%       be reached through the indicated means of communication for a
%       period of six months, and there are no other significant signs
%       of active maintenance.\par
% You can become the Current Maintainer of the Work by
%       agreement with any existing Current Maintainer to take over this
%       role.\par
% If the Work is unmaintained, you can become the Current
%       Maintainer of the Work through the following steps:\par
% \begin{enumerate}
% \item Make a reasonable attempt to trace the Current
%   Maintainer (and the Copyright Holder, if the two differ)
%   through the means of an Internet or similar search.
% \item If this search is successful, then enquire whether the
%   Work is still maintained.
% \begin{enumerate}
% \item If it is being maintained, then ask the Current
%       Maintainer to update their communication data within one
%       month.
% \item \label{LPPL:item:intention}If the search is unsuccessful or no action to resume
%       active maintenance is taken by the Current Maintainer,
%       then announce within the pertinent community your
%       intention to take over maintenance.  (If the Work is a
%       \LaTeX{} work, this could be done, for example, by
%       posting to \url{news:comp.text.tex}.)
% \end{enumerate}
% \item % \begin{enumerate}
% \item If the Current Maintainer is reachable and agrees to
%       pass maintenance of the Work to you, then this takes
%       effect immediately upon announcement.
% \item \label{LPPL:item:announce}If the Current Maintainer is not reachable and the
%       Copyright Holder agrees that maintenance of the Work be
%       passed to you, then this takes effect immediately upon
%       announcement.
% \end{enumerate}
% \item \label{LPPL:item:change}If you make an `intention announcement'
%   as described in~item~\ref{LPPL:item:intention} above above and after three
%   months your intention is challenged neither by the Current
%   Maintainer nor by the Copyright Holder nor by other people,
%   then you may arrange for the Work to be changed so as to
%   name you as the (new) Current Maintainer.
% \item If the previously unreachable Current Maintainer becomes
%   reachable once more within three months of a change
%   completed under the terms of~item~\ref{LPPL:item:announce} above
%   or~item~\ref{LPPL:item:change} above, then that
%   Current
%   Maintainer must become or remain the Current Maintainer upon
%   request provided they then update their communication data
%   within one month.
% \end{enumerate}
% A change in the Current Maintainer does not, of itself,
%       alter the fact that the Work is distributed under the
%       {\small LPPL} license.\par
% If you become the Current Maintainer of the Work, you should
%       immediately provide, within the Work, a prominent and
%       unambiguous statement of your status as Current Maintainer.  You
%       should also announce your new status to the same pertinent
%       community as in~item~\ref{LPPL:item:intention} above
%       above.\par
% \subsection{Whether and How to Distribute Works under This
%       License}\label{LPPL:Distribute}
% This section contains important instructions, examples, and
%       recommendations for authors who are considering distributing
%       their works under this license.  These authors are addressed as
%       `you' in this section.\par
% \subsubsection{Choosing This License or Another License}\label{LPPL:Choosing}
% If for any part of your work you want or need to use
% \emph{distribution} conditions that differ
% significantly from those in this license, then do not refer to
% this license anywhere in your work but, instead, distribute
% your work under a different license. You may use the text of
% this license as a model for your own license, but your license
% should not refer to the {\small LPPL} or otherwise
% give the impression that your work is distributed under the
% {\small LPPL}.\par
% The document {\ttfamily{}modguide.tex} in the base \LaTeX{}
% distribution explains the motivation behind the conditions of
% this license.  It explains, for example, why distributing
% \LaTeX{} under the {\small GNU} General Public
% License ({\small GPL}) was considered inappropriate.
% Even if your work is unrelated to \LaTeX{}, the discussion in
% {\ttfamily{}modguide.tex} may still be
% relevant, and authors intending to distribute their works
% under any license are encouraged to read it.\par
% \subsubsection{A Recommendation on Modification Without
% Distribution}\label{LPPL:WithoutDistribution}
% It is wise never to modify a component of the Work, even
% for your own personal use, without also meeting the above
% conditions for distributing the modified component.  While you
% might intend that such modifications will never be
% distributed, often this will happen by accident~--- you may
% forget that you have modified that component; or it may not
% occur to you when allowing others to access the modified
% version that you are thus distributing it and violating the
% conditions of this license in ways that could have legal
% implications and, worse, cause problems for the community. It
% is therefore usually in your best interest to keep your copy
% of the Work identical with the public one.  Many works provide
% ways to control the behavior of that work without altering any
% of its licensed components.\par
% \subsubsection{How to Use This License}\label{LPPL:HowTo}
% To use this license, place in each of the components of
% your work both an explicit copyright notice including your
% name and the year the work was authored and/or last
% substantially modified.  Include also a statement that the
% distribution and/or modification of that component is
% constrained by the conditions in this license.\par
% Here is an example of such a notice and statement:\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX}]
%%% pig.dtx
%%% Copyright 2005 M. Y. Name
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%% 
%% The Current Maintainer of this work is M. Y. Name.
%%
%% This work consists of the files pig.dtx and pig.ins
%% and the derived file pig.sty.
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% Given such a notice and statement in a file, the
% conditions given in this license document would apply, with
% the `Work' referring to the three files
% {\ttfamily{}pig.dtx}, {\ttfamily{}pig.ins}, and {\ttfamily{}pig.sty} (the last being generated
% from {\ttfamily{}pig.dtx} using {\ttfamily{}pig.ins}), the `Base
%   Interpreter' referring to any
% `\LaTeX{}-Format', and both `Copyright
%   Holder' and `Current Maintainer'
% referring to the person
% M.~Y.~Name\index{!}.\par
% If you do not want the Maintenance section of
% {\small LPPL} to apply to your Work, change
% `maintained' above into
% `author-maintained'. However, we recommend that
% you use `maintained' as the Maintenance
% section was added in order to ensure that your Work remains
% useful to the community even when you can no longer maintain
% and support it yourself.\par
% \subsubsection{Derived Works That Are Not Replacements}\label{LPPL:NotReplacements}
% Several clauses of the {\small LPPL} specify
% means to provide reliability and stability for the user
% community. They therefore concern themselves with the case
% that a Derived Work is intended to be used as a (compatible or
% incompatible) replacement of the original Work. If this is not
% the case (e.g., if a few lines of code are reused for a
% completely different task), then clauses 6b and 6d shall not
% apply.\par
% \subsubsection{Important Recommendations}\label{LPPL:Recommendations}
% \paragraph{Defining What Constitutes the Work}
% The {\small LPPL} requires that distributions
%   of the Work contain all the files of the Work.  It is
%   therefore important that you provide a way for the licensee
%   to determine which files constitute the Work.  This could,
%   for example, be achieved by explicitly listing all the files
%   of the Work near the copyright notice of each file or by
%   using a line such as:\par
% \iffalse
%<*ignore>
% \fi
\begin{lstlisting}[language={[LaTeX]TeX}]
%% This work consists of all files listed in manifest.txt.
\end{lstlisting}
% \iffalse
%</ignore>
% \fi
% in that place.  In the absence of an unequivocal list it
%   might be impossible for the licensee to determine what is
%   considered by you to comprise the Work and, in such a case,
%   the licensee would be entitled to make reasonable
%   conjectures as to which files comprise the Work.\par
% \iffalse
%<*testfile>
%% Page 1 of this example gets used as an image
%% in the uccthesis documentation.
\documentclass[dah,ma,12pt]{uccthesis}
\usepackage{charter,lipsum,fancyvrb}% !! only needed for this example
\begin{document}
\title{Title goes here}
\subtitle{With a subtitle if necessary}
\author[10101010101]{George Boole}
\qualifications{MSc}
\professor{Prof AN Other}
\supervisors{Dr One Supervisor\\Dr Other Supervisor}
\sponsor{Some Company}
\date{August 2013}
\maketitle

\prelim*{Private insertion}
The \verb+\prelim*+ command adds a prelim without 
triggering the Declaration, and can be used for home-brew 
reference lists, such as acronyms, glossaries, or symbols 
created \emph{without} using the standard packages.

The Declaration is otherwise triggered by the first occurrence of:
\begin{itemize}
\item a \textsf{dedication} environment
\item an \textsf{acknowledgements} environment
\item a \verb+\prelim+ \emph{without} the star
\item a \verb+\part+
\item a \verb+\chapter+
\end{itemize}

\begin{dedication}
To everyone
\end{dedication}

\begin{acknowledgements}
\lipsum[1]
\end{acknowledgements}

\prelim{Introduction}

\lipsum[2]
\lipsum[3]

\chapter{Background to the problem}

\lipsum[4]
\lipsum[5]

Here comes a footnote.\footnote{Something}

\begin{quotation}[{[p.232]{einstein}}]
\lipsum[6]
\end{quotation}%

\lipsum[7]
\lipsum[8]
\lipsum[9]

With a final footnote on a numbered page.\footnote{To test the
  positioning of a multi-line footnote, which should allow the bottom
  of the page with the page number to br printable even on a
  dot-matrix or ink-jet printer that cannot print on the bottom 15mm
  of the page.}

\chapter{Review of prior research}

Stuff \cite{shaw}

Try a description list
\begin{description}
\item[Stuff]More
\item[Stuff and Nonsense]More
\item[A]More
\end{description}

\appendix
\chapter{Questionnaire}
\setcounter{page}{1}
\renewcommand{\thepage}{\Alph{chapter}\arabic{page}}
Stuff
\clearpage
More stuff
\clearpage
Yet more stuff
\bibliography{thesis-example}
\nocite{*}
\begin{VerbatimOut}{thesis-example.bib}
@techreport{rfc2119,
  author      = {Scott Bradner},
  shortauthor = {Bradner},
  title       = {{Key words for use in RFCs to Indicate Requirement Levels}},
  institution = {Internet Engineering Task Force},
  address     = {Fremont, CA},
  number      = {RFC 2119},
  year        = {1997},
  month       = {Mar},
  url         = {http://www.ietf.org/rfc/rfc2119.txt}
}
@article{shaw,
  author      = {George Bernard Shaw},
  shortauthor = {Shaw},
  title       = {{On Modern Typography (In article `The Author Looks
                  at his Book')}},
  journal     = {{The Dolphin: A Journal of the Making of Books}},
  editor      = {Lawrence C Wroth},
  shorteditor = {Wroth},
  publisher   = {Limited Editions Club},
  address     = {New York},
  year        = {1940},
  volume      = {4},
  number      = {1},
  pages       = {80-81}
}
@article{einstein,
  author      = {Albert Einstein},
  shortauthor = {Einstein},
  title       = {{Grundgedanken der allgemeinen
                  Relativit\"{a}tstheorie und Anwendung dieser
                  Theorie in der Astronomie}},
  journal     = {{Preussische Akademie der Wissenschaften}},
  number      = {Schilpp 82},
  year        = {1915},
  volume      = {1},
  pages       = {315}
}
@book{heaney,
  author      = {Seamus Heaney},
  shortauthor = {Heaney},
  title       = {{Beowulf: A New Verse Translation}},
  publisher   = {WW Norton},
  address     = {New York},
  isbn        = {978-0393320978},
  year        = {2001},
  month       = {Feb},
  pages       = {215}
}
@book{fi,
  author      = {Peter Flynn},
  shortauthor = {Flynn},
  title       = {{Formatting Information}},
  publisher   = {Silmaril Consultants},
  address     = {Cork},
  edition     = {5th},
  year        = {2011},
  month       = {Mar},
  url         = {http://latex.silmaril.ie/formattinginformation}
}
\end{VerbatimOut}
\end{document}
      
%</testfile>
% \fi
% \Finale

