uosdocs.dtx 87.5 KB
Newer Older
1
2
3
4
5
6
7
% \iffalse
% This file builds on the class file `book.cls' to provide a thesis,
% minithesis, progress, project and report format, and on the class file `article.cls'
% to provide an article format, for use within the Dept. of Electronics
% and Computer Science at the University of Southampton.
%
% The thesis, minithesis, progress, project, report, gdp, gdpsummary and article environments are written to separate
8
% class files uosthesis.cls, uosminithesis.cls, uosprogress.cls, uosproject.cls, uosreport.cls, uosgdp.cls, uosgdpsummary.cls and uosarticle.cls.
9
% Copyright (C) 2001 by Steve R. Gunn
10
% Later Modifications (C) 2018 by Edward Longman
11
%    \begin{macrocode}
12
%<thesis|minithesis|progress|project|article|report|gdp|gdpsummary>\NeedsTeXFormat{LaTeX2e}[2007/02/26]
13
14
15
16
17
%    \end{macrocode}
%
%    Announce the document class and its version.
%
%    \begin{macrocode}
18
19
20
21
22
23
24
25
%<thesis>\ProvidesClass{uosthesis}
%<minithesis>\ProvidesClass{uosminithesis}
%<progress>\ProvidesClass{uosprogress}
%<project>\ProvidesClass{uosproject}
%<article>\ProvidesClass{uosarticle}
%<report>\ProvidesClass{uosreport}
%<gdp>\ProvidesClass{uosgdp}
%<gdpsummary>\ProvidesClass{uosgdpsummary}
26
%<*driver>
27
\ProvidesFile{uosdocs.drv}
28
29
%</driver>
%<*thesis|minithesis|progress|project|report|article|gdp|gdpsummary|driver>
Edward Longman's avatar
Edward Longman committed
30
              [2019/03/12 v2.2
31
32
33
34
35
36
37
38
39
40
41
42
%</thesis|minithesis|progress|project|report|article|gdp|gdpsummary|driver>
%<thesis|minithesis|progress|project|report|article|gdp|gdpsummary>   LaTeX document class]
%    \end{macrocode}
%
%    This bit of code contains the documentation driver file for
%    \TeX{}, i.e., the file that will produce the documentation you
%    are currently reading. It can be extracted from this file by the
%    {\sc docstrip} program.
%    \begin{macrocode}
%<*driver>
]
\documentclass[a4paper,10pt]{ltxdoc}
43
\GetFileInfo{uosdocs.drv} \CodelineIndex \EnableCrossrefs
44
45
46
%\RecordChanges
\setcounter{IndexColumns}{2}
\begin{document}
47
\DocInput{uosdocs.dtx}
48
49
50
51
52
53
54
55
\PrintIndex
%\PrintChanges
\end{document}
%</driver>
%    \end{macrocode}
% \fi
%
% \title{\LaTeXe{} Document Styles for the\\
56
%        University of Southampton\\
57
58
%       {File version \fileversion, dated \filedate}}
%
59
% \author{Edward Longman with prior work by Steve R. Gunn}
60
61
62
63
%
% \date{Printed \today}
%
% \maketitle
64
65
% \section{Quickstart}
%   This guide assumes you have installed MiKTeX or TeX live distributions.
66
%   It also requires having the program ``make'' for producing the templates again.
67
68
69
70
71
72
%
%   The folder labelled tex-mf should be installed in your local tex files
%   source or whatever your tex distro uses.
%
%   The Templates have been built for the Deparment of Electronics and Computer
%   Science in the Faculty of Engineering and Physical Science at the University
73
%   of Southampton.
74
%
75
%   The basic settings for University, Faculty and School are explained in Section~\ref{IntNames}
76
77
%
%   If a user only wishes to change the file for their thesis it is probably
78
%   easier to navigate to the class file labeled uosthesis and change the
79
%   department and faculty naming there. This will be located in the
80
%   subdirectory where you unzipped the files under tex/latex/uosdocs/
81
82
83
84
%
% \section{Description}
%
%    These \LaTeXe{} document classes are designed to produce thesis, mini-thesis, progress,
85
86
87
88
%    project, report, GDP report and GDP summary report documents which conformed to the
%    University of Southampton guidelines of April 2001. They were updated in Jan 2019 to
%    conform to changes in those guidelines. Specifically copyright and authorship
%    declaration changes. They are based on the document
89
90
91
92
93
94
95
96
97
98
99
%    class \texttt{book}, but modify some of its layout decisions. An article class is also
%    provided which is based on the document class \texttt{article}.
%
% \StopEventually{}
%
% \section{The {\sc docstrip} modules}
%
% The following modules are used in the implementation to direct
% {\sc docstrip} when generating the external files:
% \begin{center}
% \begin{tabular}{ll}
100
101
102
103
104
105
106
107
%   thesis            & produce the \texttt{uosthesis} document class\\
%   minithesis        & produce the \texttt{uosminithesis} document class\\
%   progress          & produce the \texttt{uosprogress} document class\\
%   project           & produce the \texttt{uosproject} document class\\
%   report            & produce the \texttt{uosreport} document class\\
%   article           & produce the \texttt{uosarticle} document class\\
%   gdp               & produce the \texttt{uosgdp} document class\\
%   gdpsummary        & produce the \texttt{uosgdpsummary} document class\\
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
%   testthesis        & produce an example thesis\\
%   testminithesis    & produce an example minithesis\\
%   testprogress      & produce an example progress\\
%   testproject       & produce an example project\\
%   testreport        & produce an example report\\
%   testarticle       & produce an example article\\
%   testgdp           & produce an example GDP report\\
%   testgdpsummary    & produce an example GDP summary report\\
%   introduction      & produce an example introduction chapter\\
%   conclusions       & produce an example conclusions chapter\\
%   appendix          & produce an example appendix chapter\\
%   figure            & produce an example figure file\\
%   definitions       & produce an example definitions file\\
%   references        & produce an example references file\\
%   bst               & produce a bibliography style file\\
%   driver            & produce a documentation driver file \\
% \end{tabular}
% \end{center}
%
% \section{Implementation}
%
129
130
% The checksum is to determine if there has been a truncation in the file during transmission over a network
%
131
%    The class has a custom option to define what colours should be used for links.
132
%    This option defines \texttt{sotoncolour} to use UoS palette colours.
133
134
%    Colour Code taken from \texttt{http://edshare.soton.ac.uk/10481}
%
135
136
137
138
139
140
141
142
%    All options are passed on to the \texttt{book} or \texttt{article} class.
%
%    \begin{macrocode}
%<*thesis|minithesis|progress|project|report|article|gdp|gdpsummary>
%    \end{macrocode}
%
% \begin{macro}{\baseclass}
%    \begin{macrocode}
143
144
145
146
%% ------------ Class/Formating Adjustment ----------------------
%% Adjust the book class to match the requirements
%% Set spacing, line and paragraph options
%% Set LaTeX builder options (work break penalties etc.)
147
148
149
150
151
152
153
154
155
156
%<*thesis|minithesis|progress|project|report|gdp|gdpsummary>
\def\baseclass{book}
%</thesis|minithesis|progress|project|report|gdp|gdpsummary>
%<*article>
\def\baseclass{article}
%</article>
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
157
158
159
\RequirePackage{xcolor}
\colorlet{linkBlue}{blue}
\colorlet{custGray}{gray}
160
161
\colorlet{chapRed}{red}
\DeclareOption{sotoncolour}{
162
163
\definecolor{sotonMarineBlue}{RGB}{1,67,89} % Soton marine blue (P 7469C)
  \definecolor{sotonGrey}{RGB}{153,153,166} % Soton grey (P 443C)
164
  \definecolor{sotonRed}{RGB}{171,18,16} % Soton Red (P 484C)
165
166
  \colorlet{linkBlue}{sotonMarineBlue}
  \colorlet{custGray}{sotonGrey}
167
  \colorlet{chapRed}{sotonRed}
168
}
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
%    \end{macrocode}
%
% \begin{macro}{\@checkoptions}
%
%    Before we can process the options we must deal with a small
%    problem.  That is, we want to change the default options of
%    the \texttt{book} or \texttt{article} class to \texttt{a4paper} and \texttt{11pt} or \texttt{12pt} but the
%    macro |\ProcessOptions| used by the \texttt{book} or \texttt{article} class
%    processes the options in the order specified in the
%    file.  Because \texttt{a4paper} is the first of the paper
%    sizing options it will be overridden by any user defined
%    option.  But the same is not true of the font size option
%    \texttt{11pt} or \texttt{12pt}.  To remedy this we define a macro
%    |\@checkoptions{|\meta{default}|}{|\meta{option-list}|}|
%    which checks to see if any options in \meta{option-list} have
%    been specified and if not adds \meta{default} to the option list.
%
%    \begin{macrocode}
\def\@checkoptions#1#2{
  \edef\@curroptions{\@ptionlist{\@currname.\@currext}}
  \@tempswafalse
  \@tfor\@this:=#2\do{
    \@expandtwoargs\in@{,\@this,}{,\@curroptions,}
    \ifin@ \@tempswatrue \@break@tfor \fi}
  \let\@this\@empty
  \if@tempswa \else \PassOptionsToClass{#1}{\baseclass}\fi
}
%    \end{macrocode}
% \end{macro}
%
%    With this macro at our disposal we can continue to
%    process the options
%
%    \begin{macrocode}
%<*thesis|minithesis|progress|report|article|gdp|gdpsummary>
\@checkoptions{11pt}{{10pt}{11pt}{12pt}}
%</thesis|minithesis|progress|report|article|gdp|gdpsummary>
%<*project>
\@checkoptions{12pt}{{10pt}{11pt}{12pt}}
%</project>
\PassOptionsToClass{a4paper}{\baseclass}
\ProcessOptions\relax
%    \end{macrocode}
%
%    and load the \texttt{book} or \texttt{article} document class
%    with A4 as the default paper size.
%
%    \begin{macrocode}
\LoadClass{\baseclass}
%    \end{macrocode}
%
% \subsection{Banner}
%
% \begin{macro}{\bhrule}
% \begin{macro}{\btypeout}
%
%    Provide a function to produce a banner on the output making the location
%    of the current section simpler.
%
%    \begin{macrocode}
\newcommand\bhrule{\typeout{------------------------------------------------------------------------------}}
\newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{Date}
%
% \begin{macro}{\today}
%
%    This macro uses the \TeX\ primitives |\month|, |\day| and |\year|
%    to provide the date of the \LaTeX-run in a suitable format.
%
%    \begin{macrocode}
%<*thesis>
\def\today{\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}
%</thesis>
%    \end{macrocode}
%
% \end{macro}
%
% \section{Document Layout}
%
256
257
258
259
260
261
262
263
264
265
% \subsection{Font}
%    \begin{macrocode}
%% \usepackage[T1]{fontspec}
%    Set font for copyright statement body text
\usepackage[defaultsans]{droidsans}
%    Set a particular style of font for the thesis. A font that has smallcaps
\usepackage{mathpazo}
%%\usepackage[T1]{fontenc} %This may not be necessary for english only text
%    \end{macrocode}

266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
% \subsection{Spacing}
%
%    Load the \texttt{setspace} package so that spacing can easily be set. The text in all
%    three styles is set to one and a half spacing, paragraphs not indented, and a newline
%    between paragraphs.
%
%    \begin{macrocode}
\usepackage{setspace}
%<thesis|minithesis|progress|project|report|gdp|gdpsummary>\onehalfspacing
%<article>\singlespacing
\setlength{\parindent}{0pt}
\setlength{\parskip}{2.0ex plus0.5ex minus0.2ex}
%    \end{macrocode}
%
%  \subsection{Margins}
%
%    Load the \texttt{vmargin} package to setup the page dimensions.
%
%    \begin{macrocode}
\usepackage{vmargin}
%<*thesis|minithesis|progress|project|report|gdp|gdpsummary>
\setmarginsrb           { 1.5in}  % left margin
                        { 0.6in}  % top margin
                        { 1.0in}  % right margin
                        { 0.8in}  % bottom margin
                        {  20pt}  % head height
                        {0.25in}  % head sep
                        {   9pt}  % foot height
                        { 0.3in}  % foot sep
%</thesis|minithesis|progress|project|report|gdp|gdpsummary>
%<*article>
\setmarginsrb           { 0.8in}  % left margin
                        { 0.6in}  % top margin
                        { 0.8in}  % right margin
                        { 0.8in}  % bottom margin
                        {  20pt}  % head height
                        {0.25in}  % head sep
                        {   9pt}  % foot height
                        { 0.3in}  % foot sep
%</article>
%    \end{macrocode}
%
% \subsection{Breaks}
%
%    Control how pages and lines are broken.
%
%    \begin{macrocode}
\raggedbottom
\setlength{\topskip}{1\topskip \@plus 5\p@}
\doublehyphendemerits=10000       % No consecutive line hyphens.
\brokenpenalty=10000              % No broken words across columns/pages.
\widowpenalty=9999                % Almost no widows at bottom of page.
\clubpenalty=9999                 % Almost no orphans at top of page.
\interfootnotelinepenalty=9999    % Almost never break footnotes.
%    \end{macrocode}
%
%  \subsection{Fancy Page Headers}
%
%    Setup the the default fancy page headers with an underlined header containing
%    chapter, name and page number.
%
%    \begin{macrocode}
\usepackage{fancyhdr}
329
330
331
332
333
% Help from https://texblog.org/2007/11/07/headerfooter-in-latex-with-fancyhdr/#comment-4783
\fancyhead[LE]{\textrm\thepage}
\fancyhead[LO]{\fancyplain{}{\textsl{\rightmark}}}
\fancyhead[RE]{\fancyplain{}{\textsl{\leftmark}}}
\fancyhead[RO]{\textrm\thepage}
334
335
\chead{}\lfoot{}\rfoot{}\cfoot{}
\pagestyle{fancy}
336
337
338
339
340
\fancypagestyle{plain}{
  \fancyhf{}
  \fancyhead[OR]{\thepage}
  \renewcommand{\headrulewidth}{0pt}
}
341
342
343
344
345
346
347
348
349
%    \end{macrocode}
%
% \begin{macro}{\chaptermark}
% \begin{macro}{\sectionmark}
% \begin{macro}{\subsectionmark}
%
%    Redefine \texttt{chaptermark} and \texttt{sectionmark} to set up the correct header name and produce a
%    banner on the output making the location of messages simpler.
%
350
351
352
353
% The \textbackslash btypeout command is for console logging where chapters start
%
% \textbackslash chapapp expands to "Chapter" or "Appendix"
%
354
355
%    \begin{macrocode}
%<*thesis|minithesis|progress|project|report|gdp>
356
357
\renewcommand{\chaptermark}[1]{\btypeout{\thechapter.\space #1}\markboth{\chaptername\ \thechapter.\hspace{1em}#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\hspace{1em}#1}}
358
359
360
\renewcommand{\subsectionmark}[1]{}
%</thesis|minithesis|progress|project|report|gdp>
%<*article>
361
\renewcommand{\sectionmark}[1]{\btypeout{\thesection\hspace{1em}}\markboth{}{\thesection.\hspace{1em}#1}}
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
\renewcommand{\subsectionmark}[1]{}
\renewcommand{\subsubsectionmark}[1]{}
%</article>
%<gdpsummary>\markboth{GDP Summary Report}{GDP Summary Report}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\cleardoublepage}
%
%    Redefine \texttt{cleardoublepage} to remove headers from blank pages
%    in twosided documents.
%
%    \begin{macrocode}
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
%    \end{macrocode}
% \end{macro}
384
385
386
387
388
389
390
391
392
393
394
395
396
% \begin{macro}{\cleartoeven}
%
%    Define \texttt{cleartoeven} to remove headers from blank pages
%    and force to even page for appendix or index.
%
%    \begin{macrocode}
\def\cleartoeven{\clearpage\if@twoside \ifodd\c@page
\hbox{}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
%    \end{macrocode}
% \end{macro}
397
398
399
400
401
402
403
%
% \subsection{Mathematics}
%
%    Load the \texttt{amsmath} packages, so we can do some serious math, and
%    setup the theorem environments.
%
%    \begin{macrocode}
404
405
%% -------------------- Figure/Table/Eq/Listing Stying --------------------
%% Set the styling for non text elements of the document
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
\usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}
\theoremstyle{plain}
%<*thesis|minithesis|progress|project|report|gdp>
\newtheorem{example}{Example}[chapter]
\newtheorem{theorem}{Theorem}[chapter]
%</thesis|minithesis|progress|project|report|gdp>
%<*article|gdpsummary>
\newtheorem{example}{Example}[section]
\newtheorem{theorem}{Theorem}[section]
%</article|gdpsummary>
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{axiom}[theorem]{Axiom}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
%    \end{macrocode}
%
% \subsection{Captions}
%
% \begin{macro}{\fref}
% \begin{macro}{\tref}
% \begin{macro}{\eref}
% \begin{macro}{\cref}
% \begin{macro}{\sref}
% \begin{macro}{\aref}
%
435
%   Load the \texttt{caption} package to improve formatting of captions,
436
437
438
%   and provide short referencing commands.
%
%    \begin{macrocode}
439
\usepackage[justification=centerlast,font=small,labelfont=sc]{caption}
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
\setlength{\captionmargin}{20pt}
\newcommand{\fref}[1]{Figure~\ref{#1}}
\newcommand{\tref}[1]{Table~\ref{#1}}
\newcommand{\eref}[1]{Equation~\ref{#1}}
\newcommand{\cref}[1]{Chapter~\ref{#1}}
\newcommand{\sref}[1]{Section~\ref{#1}}
\newcommand{\aref}[1]{Appendix~\ref{#1}}
%    \end{macrocode}
%
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Float Placement}
%
% \begin{macro}{\topfraction}
% \begin{macro}{\textfraction}
%    Preventing figures from appearing on a page by themselves. \LaTeX's figure
%    placement algorithm is quite biased in favour of putting figures on a page
%    by themselves, instead of on the top of a page with some text below it.
%    Fortunately, the parameters of the algorithm can be changed. The main problem
%    is that \LaTeX\ per default only allows a part of the top of a text-page (70\%)
%    to contain figures, and requires at least 20\% of a page to be text when text and
%    figures share a page. These parameters should be set to more reasonable values,
%    for example 85\% and 10\%.
%    \begin{macrocode}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{.85}
\renewcommand{\textfraction}{0.1}
\renewcommand{\dbltopfraction}{.85}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\floatpagefraction}
%    This helps, but sometimes \LaTeX\ puts a figure on a page by itself, although it
%    would fit perfectly well on the top of a page. This happens when the figure will
%    not fit on the page where it was defined. \LaTeX\ then attempts to put it on a
%    figures-only page before it attempts to put it at the top of the next page. A page
%    may contain figures alone if the figure(s) use at least half the page. To prevent
%    half-empty pages this limit should probably be increased to around 75\%.
%    \begin{macrocode}
\renewcommand{\floatpagefraction}{0.75}
\renewcommand{\dblfloatpagefraction}{.75}
%    \end{macrocode}
%    Be careful not to make \texttt{floatpagefraction} larger than \texttt{topfraction},
%    then you risk to produce a figure that can neither go on the top of a text page,
%    nor on a page by itself. If that happens, the figure and all later figures will be
%    postponed until next time a \texttt{clearpage} is executed (typically at the end of
%    a chapter or the end of the document). This will also happen if a figure is too
%    large to fit on a page.
%    \begin{macrocode}
\setcounter{topnumber}{9}
\setcounter{bottomnumber}{9}
\setcounter{totalnumber}{20}
\setcounter{dbltopnumber}{9}
%    \end{macrocode}
% \end{macro}
%
%
% \subsection{Graphics}
%
%    Load the \texttt{graphicx} package, so we can include pictures easily. Load the \texttt{epstopdf},
%    so that eps files are automatically converted to pdf when pdf\LaTeX\ is used. This requires a
%   version of {\em epstopdf} to be installed on you system. You can find a windows version at\newline
%   \texttt{http://www.ctan.org/tex-archive/support/epstopdf/epstopdf.exe}.
%
%    \begin{macrocode}
\usepackage{graphicx}
\usepackage{epstopdf}
%    \end{macrocode}
%
% \subsection{Subfigures and subtables}
%
516
%    Load the \texttt{subcaption} package, so we can include subfigures easily.
517
518
%
%    \begin{macrocode}
519
\usepackage[]{subcaption}
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
\usepackage{booktabs}
\usepackage{rotating}
%    \end{macrocode}
%
% \subsection{Listings}
%
%    Load the \texttt{listings} package, so we can include listings easily.
%
%    \begin{macrocode}
\usepackage{listings}
% %\usepackage{lstpatch}
\lstset{captionpos=b,
        frame=tb,
        basicstyle=\scriptsize\ttfamily,
        showstringspaces=false,
        keepspaces=true}
\lstdefinestyle{matlab} {
        language=Matlab,
        keywordstyle=\color{blue},
        commentstyle=\color[rgb]{0.13,0.55,0.13}\em,
        stringstyle=\color[rgb]{0.7,0,0} }
%    \end{macrocode}
%
% \subsection{Hyperlinks}
%
%    Load the \texttt{hyperref} package to provide hyperlinks in pdf and dvi documents.
%
%    \begin{macrocode}
\usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,
   bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false,
550
   colorlinks,linkcolor={linkBlue},citecolor={linkBlue},urlcolor={linkBlue},
551
552
553
554
555
556
   pdfstartview={FitV},unicode,breaklinks=true]{hyperref}
\pdfstringdefDisableCommands{
   \let\\\space
}
%    \end{macrocode}
%
557
% \section{Internal Names}\label{IntNames}
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
%
% \begin{macro}{\supervisor}
% \begin{macro}{\examiner}
% \begin{macro}{\degree}
% \begin{macro}{\authors}
% \begin{macro}{\addresses}
% \begin{macro}{\university}
% \begin{macro}{\UNIVERSITY}
% \begin{macro}{\department}
% \begin{macro}{\DEPARTMENT}
% \begin{macro}{\group}
% \begin{macro}{\GROUP}
% \begin{macro}{\faculty}
% \begin{macro}{\FACULTY}
% \begin{macro}{\subject}
% \begin{macro}{\keywords}
%
%    The various elements of the documents are defined
%    as control sequences to make it easy to customize this
577
578
579
580
581
582
583
%    style for other parts of the University. When the
%    command is run the other terms are defined by the args.
%
%    The examiner and supervisor commands can be puralised
%    so that it can print "Supervisors:". This is with an
%    optional argument. [s] which will add and ``s'' to the
%    word "Supervisor"
584
585
%
%    \begin{macrocode}
586
%% --------------------- Organisational Structure ----------------------
587
588
\newcommand*{\supervisor}[2][]{\def\supname{#2}\def\supplural{#1}}
\newcommand*{\examiner}[2][]{\def\examname{#2}\def\examplural{#1}}
589
590
\newcommand*{\degree}[1]{\def\degreename{#1}}
\newcommand*{\authors}[1]{\def\authornames{#1}}
591
\newcommand*{\qualifications}[1]{\def\quals{#1}}
592
\newcommand*{\addresses}[1]{\def\addressnames{#1}}
593
\newcommand*{\doi}[1]{\def\doicode{#1}}
594
\newcommand*{\volume}[2]{\def\volno{#1}\def\volof{#2}}
595
\newcommand*{\orcidid}[1]{\def\orcid{#1}}
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
\newcommand*{\university}[1]{\def\univname{#1}}
\newcommand*{\UNIVERSITY}[1]{\def\UNIVNAME{#1}}
\newcommand*{\department}[1]{\def\deptname{#1}}
\newcommand*{\DEPARTMENT}[1]{\def\DEPTNAME{#1}}
\newcommand*{\group}[1]{\def\groupname{#1}}
\newcommand*{\GROUP}[1]{\def\GROUPNAME{#1}}
\newcommand*{\faculty}[1]{\def\facname{#1}}
\newcommand*{\FACULTY}[1]{\def\FACNAME{#1}}
\newcommand*{\subject}[1]{\def\subjectname{#1}}
\newcommand*{\keywords}[1]{\def\keywordnames{#1}}
%    \end{macrocode}
%
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
% \begin{macro}{\supname}
% \begin{macro}{\examname}
% \begin{macro}{\degreename}
% \begin{macro}{\authornames}
% \begin{macro}{\univname}
% \begin{macro}{\UNIVNAME}
% \begin{macro}{\deptname}
% \begin{macro}{\DEPTNAME}
% \begin{macro}{\groupname}
% \begin{macro}{\GROUPNAME}
% \begin{macro}{\facname}
% \begin{macro}{\FACNAME}
% \begin{macro}{\subjectname}
% \begin{macro}{\keywordnames}
%
%    The internal names of the elements are set
%    to defaults appropriate to the Department of Electronics and Computer Science.
%
643
%    By running these commands at the top of your tex file it will overwrite the defaults.
644
%    \begin{macrocode}
645
%% --------------------- Organisational Structure ----------------------
646
\doi{}
647
648
649
650
\supervisor  {}
\examiner    {}
\degree      {}
\authors     {}
651
652
\qualifications{}
\orcidid{}
653
654
\volume{}{}
\university  {\texorpdfstring{\href{http://www.southampton.ac.uk}
655
656
                {University of Southampton}}
                {University of Southampton}}
657
\UNIVERSITY  {\MakeUppercase{\univname}}
658
\department  {School of Electronics and Computer Science}
659
\DEPARTMENT  {\MakeUppercase{\deptname}}
660
\group       {Cyber Physical Systems Group}
661
\GROUP       {\MakeUppercase{\groupname}}
662
\faculty     {Faculty of Engineering and Physical Science}
663
\FACULTY     {\MakeUppercase{\facname}}
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
\addresses   {}
\subject     {}
\keywords    {}
%    \end{macrocode}
%
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \section{Special Pages}
%
% \subsection{Title Page}
%
% \begin{macro}{\maketitle}
%
%    Setup an appropriate title page and pdf strings if we are using
%    pdf\LaTeX.
%
693
%    The %\\global\\let\\@title\\@empty has been removed
694
695
696
%
%    Possibly the relax statement also needs to be removed
%
697
698
%   \begin{macrocode}
%<*thesis|minithesis|progress|project|report|gdp|gdpsummary>}
699
%    Start by Adding meta data to the produced document
700
701
702
703
704
705
706
\usepackage{titling}
\AtBeginDocument{
  \hypersetup{pdftitle={\thetitle}}
  \hypersetup{pdfsubject={\subjectname}}
  \hypersetup{pdfauthor={\authornames}}
  \hypersetup{pdfkeywords={\keywordnames}}
}
707
%    Define the title page layout
708
709
710
711
712
713
714
715
716
717
718
719
\renewcommand\maketitle{
  \btypeout{Title Page}
  \thispagestyle{empty}
  \begin{titlepage}
    \let\footnotesize\small
    \let\footnoterule\relax
    \let \footnote \thanks
    \setcounter{footnote}{0}
    \null\vfil
    \vskip 60\p@
    \begin{center}
      \setlength{\parskip}{0pt}
720
721
722
723
      {\scshape\LARGE\textbf{\univname}\par}
      %% TODO: Change all the descriptions to italic like the Thesis one
%<*thesis|minithesis|progress|project|gdp|gdpsummary>
      \bigskip
724
      {\large \facname \par}
725
726
%</thesis|minithesis|progress|project|gdp|gdpsummary>
%<*thesis|minithesis|progress|project>
727
      {\large \deptname \par}
728
%</thesis|minithesis|progress|project>
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
      \vfill
%<*minithesis>
      {\large A mini-thesis submitted for transfer from}
      {\large MPhil to PhD \par}
%</minithesis>
%<*progress>
      {\large A progress report submitted for continuation}
      {\large towards a PhD \par}
%</progress>
%<*project>
      {\large A project report submitted for the}
      {\large award of \par \degreename \par}
%</project>
%<*gdp>
      {\large A group design project report submitted for}
      {\large the award of \par \degreename \par}
%</gdp>
%<*gdpsummary>
      {\large A group design project summary report submitted}
      {\large for the award of \par \degreename \par}
%</gdpsummary>
%<*minithesis|progress|project|gdp|gdpsummary>
      \vfill
752
753
      {\normalsize Supervisor\supplural: \supname \par}
      {\normalsize Examiner\examplural: \examname \par}
754
755
756
757
758
759
      \vfill
      \hspace{6mm}\parbox[t][51mm][s]{89mm}{
        \center
        \vfill
        {\large \bf \@title \par}
        \vfill
760
        {\normalsize \textit{by} \textbf\authornames \par}
761
762
763
764
765
766
767
        \vfill
        {\normalsize \@date \par}
        \vfill
      }
      \parbox[t][95mm][s]{89mm}{}
%</minithesis|progress|project|gdp|gdpsummary>
%<*thesis|report>
768
769
770
771
      {\huge \bf \@title \par
}
      \ifthenelse{\equal{\doicode}{}}
      {}
772
773
774
775
      {\smallskip DOI: \href{http://orcid.org/\doicode}{\doicode}\par}
      \ifthenelse{\equal{\volno}{}}
      {}
      {\smallskip Volume \volno{} of \volof}
776
      \vfill
777
      {\LARGE \textit{by} \par}
778
      \smallskip
779
780
781
782
783
784
785
786
787
788
789
      {\LARGE \textbf\authornames
        \ifthenelse{\equal{\quals}{}}
        {}
        {\par\Large
        \quals}
      \par}
        \ifthenelse{\equal{\orcid}{}}
        {}
        {\smallskip
        ORCiD: \href{http://orcid.org/\orcid}{\orcid}}

790
791
      \vfill
%<*thesis>
792
793
      {\large \textit{A thesis for the degree of} \par}
      {\large \textit{Doctor of Philosophy} \par}
794
%</thesis>
795
%<*report>      {\large  \textit{Technical Report} \par}
796
      \bigskip
797
\bigskip
798
799
      {\large \facname \par}
      {\large \deptname \par}
800
%</report>
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
      \bigskip
      \bigskip
      \bigskip
      {\Large \@date \par}
      \bigskip
%</thesis|report>
    \end{center}
    \par
    \@thanks
    \vfil\null
  \end{titlepage}
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
  \cleardoublepage
}
%</thesis|minithesis|progress|project|report|gdp|gdpsummary>
%<*article>
\if@titlepage
  \renewcommand\maketitle{
    \btypeout{Title Page}
    \markboth{\authornames}{\@title}
    \begin{titlepage}
    \thispagestyle{empty}
    \let\footnotesize\small
    \let\footnoterule\relax
    \let \footnote \thanks
    \null\vfil
    \vskip 60\p@
    \begin{center}
      {\LARGE \@title \par}
      \vskip 3em
      {\large \lineskip .75em
        \begin{tabular}[t]{c} \authornames \end{tabular}
      \par}
      \vskip 1em
      {\large \lineskip .5em
        \begin{tabular}[t]{c} \addressnames \end{tabular}
      \par}
      \vskip 1.5em
      {\large \@date \par}
      \if\keywordnames
      \else
        \quotation
        \vskip 1.5em
        {\noindent \normalsize
            \textbf{Keywords:}
            \textit{\keywordnames}
        \par}
        \endquotation
      \fi
    \end{center}
    \par
    \@thanks
    \vfil\null
    \end{titlepage}
    \setcounter{footnote}{0}
    \global\let\thanks\relax
    \global\let\maketitle\relax
    \global\let\@maketitle\relax
    \global\let\@thanks\@empty
    \global\let\@author\@empty
    \global\let\@date\@empty
    \global\let\title\relax
    \global\let\author\relax
    \global\let\date\relax
    \global\let\and\relax
  }
\else
  \renewcommand\maketitle{
    \btypeout{Title Page}
    \markboth{\authornames}{\@title}
    \thispagestyle{empty}
    \par
    \begingroup
      \renewcommand\thefootnote{\@fnsymbol\c@footnote}
      \def\@makefnmark{
        \rlap{\@textsuperscript{\normalfont\@thefnmark}}
      }
      \long\def\@makefntext##1{
        \parindent 1em\noindent \hb@xt@1.8em
        {\hss\@textsuperscript{\normalfont\@thefnmark}}##1
      }
      \if@twocolumn
        \ifnum \col@number=\@ne
          \@maketitle
        \else
          \twocolumn[\@maketitle]%
        \fi
      \else
        \newpage
        % Prevent figures from going at top of page.
        \global\@topnum\z@
        \@maketitle
      \fi
      \thispagestyle{plain}\@thanks
    \endgroup
    \setcounter{footnote}{0}%
    \global\let\thanks\relax
    \global\let\maketitle\relax
    \global\let\@maketitle\relax
    \global\let\@thanks\@empty
    \global\let\@author\@empty
    \global\let\@date\@empty
    \global\let\title\relax
    \global\let\author\relax
    \global\let\date\relax
    \global\let\and\relax
  }
  \def\@maketitle{
    \newpage
    \null
    \vskip 2em
    \begin{center}
      \let \footnote \thanks
      {\LARGE \@title \par}
      \vskip 1.5em
      {\large \lineskip .5em
        \begin{tabular}[t]{c} \authornames \end{tabular}
      \par}
      \vskip 0.7em
      {\large \lineskip .5em
        \begin{tabular}[t]{c} \addressnames \end{tabular}
      \par}
      \vskip 1em
      {\large \@date}
    \end{center}
    \par
    \vskip 1.5em
  }
\fi
%</article>
%    \end{macrocode}
%
% \end{macro}
%
% \subsection{Abstract Page}
%
% \begin{macro}{\abstract}
%
%    Setup an appropriate abstract page.
%
%    \begin{macrocode}
%<*thesis|minithesis|progress|project|report|gdp>
\newenvironment{abstract}
{
  \btypeout{Abstract Page}
  \thispagestyle{empty}
  \null\vfil
  \begin{center}
    \setlength{\parskip}{0pt}
959
    {\textsc\normalsize \univname \par}
960
    \bigskip
961
    {\underline{Abstract} \par}
962
    \bigskip
963
    {\textsc\normalsize \facname \par}
964
%<*thesis|minithesis|progress|project|report>
965
    {\textsc\normalsize \deptname \par}
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
%</thesis|minithesis|progress|project|report>
    \bigskip
%<*thesis>
    {\normalsize \underline{Doctor of Philosophy}\par}
%</thesis>
%<*minithesis>
    {\normalsize \underline{A mini-thesis submitted for transfer from MPhil to PhD}\par}
%</minithesis>
%<*progress>
    {\normalsize \underline{A progress report submitted for continuation towards a PhD}\par}
%</progress>
%<*project>
    {\normalsize \underline{A project report submitted for the award of \degreename}\par}
%</project>
%<*gdp>
    {\normalsize \underline{A group design project report submitted for the award of \degreename}\par}
%</gdp>
    \bigskip
    {\normalsize\bf \@title \par}
    \medskip
    {\normalsize by \authornames \par}
    \bigskip
  \end{center}
}
{
  \vfil\vfil\vfil\null
  \cleardoublepage
}
%</thesis|minithesis|progress|project|report|gdp>
%<*article>
\if@titlepage
  \renewenvironment{abstract}{
      \titlepage
      \null\vfil
      \@beginparpenalty\@lowpenalty
      \begin{center}
        \bfseries \abstractname
        \@endparpenalty\@M
      \end{center}
      \begin{itshape}
      \noindent
  }
  {
      \par
      \end{itshape}
      \if\keywordnames
      \else
        \quote
        \vskip 1.5em
        {\noindent \normalsize
            \textbf{Keywords:}
            \textit{\keywordnames}
        \par}
        \endquote
      \fi
      \vfil\null\endtitlepage
  }
\else
  \renewenvironment{abstract}{
      \if@twocolumn
        \section*{\abstractname}
      \else
        \small
        \begin{center}
          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}
        \end{center}
        \quote
      \fi
      \begin{itshape}
  }
  {
      \end{itshape}
      \if\keywordnames
      \else
        \vskip 1.5em
        {\noindent \normalsize
            \textbf{Keywords:}
            \textit{\keywordnames}
        \par}
      \fi
      \if@twocolumn\else\endquote\fi
  }
\fi
%</article>
%    \end{macrocode}
%
% \end{macro}
%
% \subsection{Contents Pages}
%
% \subsubsection{Add to Table of Contents}
%
1058
% \begin{macro}{\addtotoc}
1059
1060
%    Get a better list of contents package
%
1061
1062
1063
%    Ensures numbering for sub-subsections in the table of contents, and provide
%    for 6 levels to appear in toc. Define \texttt{addtotoc} to enable adding
%    elements to the toc at chapter level, using a dummy counter to fix bookmarks
1064
%    in pdf\LaTeX{}.
1065
1066
1067
%
%    \begin{macrocode}
%<*thesis|minithesis|progress|project|report|gdp|article>
1068
\usepackage[nottoc]{tocbibind}         % Put the Lists, Glossary, Biblog and Idx in the contents
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
\addtocounter{secnumdepth}{1}
\setcounter{tocdepth}{6}
\newcounter{dummy}
\newcommand\addtotoc[1]{
\refstepcounter{dummy}
%<*thesis|minithesis|progress|project|report|gdp>
\addcontentsline{toc}{chapter}{#1}}
%</thesis|minithesis|progress|project|report|gdp>
%<*article>
\addcontentsline{toc}{section}{#1}}
%</article>
%    \end{macrocode}
1081
% \end{macro}
1082
1083
1084
1085
1086
1087
1088
1089
% \subsubsection{Table of Contents}
%
% \begin{macro}{\tableofcontents}
%
%    Adjust line and paragraph spacing.
%
%    \begin{macrocode}
\renewcommand\tableofcontents{
1090
\hypersetup{linkcolor={black}}
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
\btypeout{Table of Contents}
\begin{spacing}{1}{
    \setlength{\parskip}{1pt}
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
%<*thesis|minithesis|progress|project|report|gdp>
    \chapter*{\contentsname
%</thesis|minithesis|progress|project|report|gdp>
%<*article>
    \section*{\contentsname
%</article>
        \@mkboth{
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
    \@starttoc{toc}
    \if@restonecol\twocolumn\fi
%<thesis|minithesis|progress|project|report|gdp>   \cleardoublepage
}\end{spacing}
}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{List of Figures}
%
% \begin{macro}{\listoffigures}
%
%    Adjust line and paragraph spacing.
%
%    \begin{macrocode}
\renewcommand\listoffigures{
1123
\addtotoc{\listfigurename}
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
\begin{spacing}{1}{
    \setlength{\parskip}{1pt}
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
%<*thesis|minithesis|progress|project|report|gdp>
    \chapter*{\listfigurename
%</thesis|minithesis|progress|project|report|gdp>
%<*article>
    \section*{\listfigurename
%</article>
      \@mkboth{\MakeUppercase\listfigurename}
              {\MakeUppercase\listfigurename}}
    \@starttoc{lof}
    \if@restonecol\twocolumn\fi
%<*thesis|minithesis|progress|project|report|gdp>
    \cleardoublepage
%</thesis|minithesis|progress|project|report|gdp>
}\end{spacing}
}
%    \end{macrocode}
% \end{macro}
%
% \subsubsection{List of Tables}
%
% \begin{macro}{\listoftables}
%
%    Adjust line and paragraph spacing.
%
%    \begin{macrocode}
\renewcommand\listoftables{
1157
\addtotoc{\listtablename}
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
\begin{spacing}{1}{
    \setlength{\parskip}{1pt}
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
%<*thesis|minithesis|progress|project|report|gdp>
    \chapter*{\listtablename
%</thesis|minithesis|progress|project|report|gdp>
%<*article>
    \section*{\listtablename
%</article>
      \@mkboth{
          \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}
    \@starttoc{lot}
    \if@restonecol\twocolumn\fi
%<*thesis|minithesis|progress|project|report|gdp>
    \cleardoublepage
%</thesis|minithesis|progress|project|report|gdp>
}\end{spacing}
}
%    \end{macrocode}
% \end{macro}
%
% \subsection{List of Symbols}
%
1185
% \begin{macro}{\listsymbolname}
1186
1187
1188
1189
1190
1191
% \begin{macro}{\listofsymbols}
%
%    Provide a \texttt{listofsymbols} command to produce a list of symbols,
%
%    \begin{macrocode}
%<*thesis|minithesis|progress|report|article>
1192
\newcommand\listsymbolname{Definitions and Abbreviations}
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
%</thesis|minithesis|progress|report|article>
%<*project|gdp>
\newcommand\listsymbolname{List of Symbols}
%</project|gdp>
\usepackage{longtable}
\newcommand\listofsymbols[2]{
\btypeout{\listsymbolname}
\addtotoc{\listsymbolname}
%<*thesis|minithesis|progress|project|report|gdp>
    \chapter*{\listsymbolname
%</thesis|minithesis|progress|project|report|gdp>
%<*article>
    \section*{\listsymbolname
%</article>
      \@mkboth{
          \MakeUppercase\listsymbolname}{\MakeUppercase\listsymbolname}}
\begin{longtable}[c]{#1}#2\end{longtable}\par
%<*thesis|minithesis|progress|project|report|gdp>
    \cleardoublepage
%</thesis|minithesis|progress|project|report|gdp>
}
%</thesis|minithesis|progress|project|report|gdp|article>
%    \end{macrocode}
%
% \end{macro}
1218
% \end{macro}
1219
%
1220
1221
% \subsection{Declaration of Authorship}
% \begin{macro}{\authorshipdeclaration}
1222
1223
% Taken from Modified Template by Lovell \ref{references}
%
1224
% TODO: Consider a separate dissertation class for non techinical?
1225
%
1226
% TODO: Provide extra argument for putting the date into the Declaration
1227
%
1228
1229
1230
1231
% TODO: make slightly different declarations for theses and projects
%
% This Authorship macro takes one argument for the case of People
% who have published part of their thesis already (perhaps in a paper).
1232
%
1233
% xifthen else package used for the isempty command
1234
%
1235
1236
%    \begin{macrocode}
%<*thesis|minithesis|progress|report|article>
1237
\usepackage{xifthen}
1238
1239
1240
1241
1242
1243
\newcommand\authorshipdeclaration[1]{
\btypeout{Declaration of Authorship}
\addtotoc{Declaration of Authorship}
\thispagestyle{plain}
\null\vfil
\vskip 60\p@
1244
1245
1246
\begin{center}{\Large\bf Declaration of Authorship \par}\end{center}
I declare that this thesis and the work presented in it is my own and has
been generated by me as the result of my own original research.
1247

1248
1249
1250
1251
1252
1253
1254
I confirm that:

\begin{enumerate}
\item This work was done wholly or mainly while in candidature for a research degree at this University;
\item Where any part of this thesis has previously been submitted for a degree or any other qualification at this University or any other institution, this has been clearly stated;
\item Where I have consulted the published work of others, this is always clearly attributed;
\item Where I have quoted from the work of others, the source is always given. With the exception of such quotations, this thesis is entirely my own work;
1255
\item I have acknowledged all main sources of help;
1256
1257
\item Where the thesis is based on work done by myself jointly with others, I have made clear exactly what was done by others and what I have contributed myself;

1258
\ifthenelse{\isempty{#1}}
1259
1260
1261
{\item None of this work has been published before submission}
{\item Parts of this work have been published as: #1}
\end{enumerate}
1262
1263

\vspace{15.0mm}
1264
\begin{minipage}[t]{0.7\textwidth}
1265
1266
  Signed:..........................................................................
\end{minipage}%
1267
\begin{minipage}[t]{0.3\textwidth}
1268
1269
  Date:..................
\end{minipage}
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
\vfil\vfil\null
\cleardoublepage
}
%</thesis|minithesis|progress|report|article>
%    \end{macrocode}
%
% \end{macro}
%
% \subsection{Copyright Statement}
% \begin{macro}{\copyrightDeclaration}
%
1281
%    This standard Copyright statement is to be included for a thesis submission
1282
1283
1284
1285
%    to University of Southampton Digital Repository
%
%    \begin{macrocode}
%<*thesis>
1286
\usepackage[export]{adjustbox} % for Soton logo alignment
1287
\newcommand\copyrightDeclaration[1]{
1288

1289
1290
1291
\btypeout{Copyright declaration}
\thispagestyle{plain}

1292
1293
\hspace{-1.5in}\hspace{2.5cm}\begin{minipage}{17cm}
\null\vfil
1294
\includegraphics[width=6cm,right]{UoSLogo.png}
1295
1296

\vskip 60\p@
1297
\begin{center}{\selectfont\huge
1298
\textcolor{custGray}{University~of~Southampton~Research~Repository}\par}
1299
\end{center}
1300
1301
\vspace{1cm}

1302
{\fontfamily{fds}\selectfont
1303

1304
1305
1306
1307
1308
1309
1310
1311
1312
\noindent Copyright \textcopyright~ and Moral Rights for this thesis and, where
applicable, any accompanying data are retained by the author and/or other
copyright owners. A copy can be downloaded for personal non-commercial research
or study, without prior permission or charge. This thesis and the accompanying
data cannot be reproduced or quoted extensively from without first obtaining
permission in writing from the copyright holder/s. The content of the thesis
and accompanying research data (where applicable) must not be changed in any
way or sold commercially in any format or medium without the formal permission
of the copyright holder/s.
1313
1314
1315

\vspace{0.5cm}

1316
1317
1318
1319
When referring to this thesis and any accompanying data, full bibliographic
details must be given, e.g.

\vspace{0.5cm}
1320

1321
1322
Thesis: Author (Year of Submission) "Full thesis title", University of
Southampton, name of the University Faculty or School or Department,
1323
1324
1325
1326
1327
PhD Thesis, pagination.

\vspace{0.5cm}

Data: Author (Year) Title. URI [dataset]}
1328
\end{minipage}
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
\vfil\vfil\null
\cleardoublepage
}

\usepackage{lastpage} % counts the full number of pages

%</thesis>
%    \end{macrocode}
%
% \end{macro}


1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
% \subsection{Acknowledgements}
%
% \begin{macro}{\acknowledgements}
%
%    Thank someone!
%
%    \begin{macrocode}
\newcommand\acknowledgements[1]{
\btypeout{Acknowledgements}
\addtotoc{Acknowledgements}
%<*thesis|minithesis|progress|project|report|gdp>
\thispagestyle{plain}
\null\vfil
\vskip 60\p@
\begin{center}{\Large\bf Acknowledgements \par}\end{center}
{\normalsize #1}
\vfil\vfil\null
\cleardoublepage
%</thesis|minithesis|progress|project|report|gdp>
%<*article>
\section*{Acknowledgements}
{\normalsize #1}
%</article>
}
%    \end{macrocode}
%
% \end{macro}
%
% \subsection{Dedicatory}
%
% \begin{macro}{\dedicatory}
%
%    Dedicate the document to someone!
%
%    \begin{macrocode}
\newcommand\dedicatory[1]{
\btypeout{Dedicatory}
%<*thesis|minithesis|progress|project|report|gdp>
\thispagestyle{plain}
\null\vfil
\vskip 60\p@
\begin{center}{\Large \sl #1}\end{center}
\vfil\null
\cleardoublepage
%</thesis|minithesis|progress|project|report|gdp>
}
%    \end{macrocode}
%
% \end{macro}
%
% \section{Parts}
%
% \begin{macro}{\frontmatter}
% \begin{macro}{\mainmatter}
% \begin{macro}{\backmatter}
1396
% \begin{macro}{\appendix}
1397
%
1398
%    Define \texttt{frontmatter},\texttt{mainmatter},\texttt{backmatter} for the article class
1399
1400
1401
%    and rename the bibliography to something that makes more sense. For other classes make the
%    Appendix entry in the table of contents better and rename the references in a slightly
%    different way.
1402
1403
1404
%
%    \begin{macrocode}
%<*article>
1405
1406
\newcommand\frontmatter{ }
\newcommand\mainmatter{ }
1407
\newcommand\bibname{References}
1408
\newcommand\backmatter{}
1409
%</article>
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
%<*thesis|minithesis|progress|project|report|gdp>
\renewcommand\bibname{References}
\let\oldappendix\appendix % Put full appendix name in ToC
\renewcommand{\appendix}{%
  \oldappendix
  \let\oldacl@pp=\addcontentsline
  \def\addcontentsline##1##2##3{\oldacl@pp{##1}{##2}{\appendixname\space ##3}}
}
\let\oldbackmatter\backmatter
\def\backmatter{%
  \oldbackmatter
  \let\addcontentsline=\oldacl@pp
  }
%</thesis|minithesis|progress|project|report|gdp>
1424
1425
%    \end{macrocode}
% \end{macro}
1426
1427
% \end{macro}
% \end{macro}
1428
% \end{macro}
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
%
%    \begin{macrocode}
%</thesis|minithesis|progress|project|report|article|gdp|gdpsummary>
%    \end{macrocode}
%
%
% \section{Example Documents}
%
%    \begin{macrocode}
%<*testthesis>
1439
\documentclass[sotoncolour]{uosthesis}      % Use the Thesis Style with custom link colour
1440
1441
%</testthesis>
%<*testminithesis>
1442
\documentclass[sotoncolour]{uosminithesis}  % Use the minithesis Style with custom link colour
1443
1444
%</testminithesis>
%<*testprogress>
1445
\documentclass[sotoncolour]{uosprogress}    % Use the progress Style with custom link colour
1446
1447
%</testprogress>
%<*testproject>
1448
\documentclass[sotoncolour]{uosproject}     % Use the Project Style with custom link colour
1449
1450
%</testproject>
%<*testreport>
1451
\documentclass[sotoncolour]{uosreport}      % Use the Report Style with custom link colour
1452
1453
%</testreport>
%<*testarticle>
1454
\documentclass[sotoncolour]{uosarticle}     % Use the Article Style with custom link colour
1455
1456
%</testarticle>
%<*testgdp>
1457
\documentclass[sotoncolour]{uosgdp}         % Use the GDP Report Style with custom link colour
1458
1459
%</testgdp>
%<*testgdpsummary>
1460
\documentclass[sotoncolour]{uosgdpsummary}  % Use the GDP Summary Report Style with custom link colour
1461
1462
1463
1464
%</testgdpsummary>
%<*testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp|testgdpsummary>
\graphicspath{{../Figures/}}   % Location of your graphics files
\usepackage{natbib}            % Use Natbib style for the refs.
1465
1466
1467
%<*testthesis|testminithesis|testproject|testreport|testgdp>
\usepackage{bibentry}          % Use bibentry for prepublished works
\nobibliography*               % Use bibentry for prepublished works
1468
\usepackage{attrib}            % Use the attrib package for quotations
1469
%</testthesis|testminithesis|testproject|testreport|testgdp>
1470
1471
1472
\hypersetup{colorlinks=true}   % Set to false for black/white printing
\input{Definitions}            % Include your abbreviations
%% ----------------------------------------------------------------
1473
%% --------------------THESIS/DOC INFORMATION ---------------------
1474
1475
1476
1477
1478
1479
\department  {School of [Insert school]}
\DEPARTMENT  {\MakeUppercase{\deptname}}
\group       {[Group name]}
\GROUP       {\MakeUppercase{\groupname}}
\faculty     {Faculty of [Insert faculty]}
\FACULTY     {\MakeUppercase{\facname}}
1480
\title      {An Investigation into \dots}
1481
%<*testthesis>
1482
\authors    {Insert name, for example, Sarah Alison Watson} % Use of Soton Email unadvised, use ORCiD instead.
1483
1484
%</testthesis>
%<*testminithesis|testprogress|testproject|testreport|testarticle|testgdp|testgdpsummary>
1485
\authors    {\texorpdfstring
1486
1487
             {\href{mailto:S.A.Watson@soton.ac.uk}{Name and email, for example, Sarah Alison Watson}}
             {Name and email, for example, Sarah Alison Watson}
1488
            }
1489
%</testminithesis|testprogress|testproject|testreport|testarticle|testgdp|testgdpsummary>
1490
1491
1492
\addresses  {\groupname\\\deptname\\\univname}
\date       {\today}
%<*testminithesis|testprogress|testproject|testgdp|testgdpsummary>
1493
% \supervisor[s] {Mr Beavis and Mrs S Supervisor}
1494
\supervisor {Mr Beavis}
1495
% \examiner[s] {Dr Butthead and Dr A.N. Other}
1496
1497
1498
1499
1500
1501
1502
1503
\examiner   {Dr Butthead}
%</testminithesis|testprogress|testproject|testgdp|testgdpsummary>
%<*testproject>
\degree     {BEng Electronic Engineering}
%</testproject>
%<*testgdp|testgdpsummary>
\degree     {Master of Engineering}
%</testgdp|testgdpsummary>
1504
1505
1506
1507
1508
%% Optional Fields
%<testthesis|testminithesis|testprogress> \qualifications{MEng PhD}
%<*testthesis>
\orcidid{0000-0002-1825-0097}
\doi{10.1002/0470841559.ch1}
1509
\volume{n}{m} %Optional Volume Numbering Volume n of m
1510
1511
1512
1513
1514
%</testthesis>
\subject    {}
\keywords   {}

\begin{document}
1515
%% ------------------ FRONT MATTER ORGANISATION -------------------
1516
1517
1518
%<*testthesis>
\pagenumbering{gobble} % removes page number
\copyrightDeclaration{} % !!! Comment this line when printing the hardcopy !!!
1519
1520
\raggedright                  %% Set the style to Left justification, remove for fill justification
                              %% Must be done after copyrightDeclaration
1521
1522
%</testthesis>
\frontmatter
1523
1524
1525
1526
1527
\maketitle
%</testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp|testgdpsummary>
%<*testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp>
\begin{abstract}
This work is all about \dots
1528
1529
1530
1531
1532
%<*testthesis|testminithesis|testprogress>
There are broad instructions for this template entitled: How to use the University of Southampton LaTeX template. There is a technical reference included in the \texttt{doc} folder with the templates.

There is no prescribed font, you should use a font appropriate to your discipline.  See Producing your thesis section 7.2.
%</testthesis|testminithesis|testprogress>
1533
\end{abstract}
1534
%<*testthesis|testminithesis|testprogress|testproject|testreport|testgdp>
1535
1536
1537
\tableofcontents
\listoffigures
\listoftables
1538
%% The List of listings does not, by default, appear in the ToC, so....
1539
\addtotoc{Listings}
1540
\lstlistoflistings
1541
1542
%<*testthesis|testminithesis|testproject|testreport|testgdp>
%% ---------- AUTHORSHIP DECLARATION/ ACKNOW. / DEDICATORY ----------
1543
%% Either include citations like below (as many as required spaced with commas or 'and').
1544
1545
1546
%% \bibentry command must be used here with prepublished papers
% https://www.stefaanlippens.net/bibentry/
\authorshipdeclaration{\bibentry{Gunn:2001:pdflatex}, \bibentry{Lovell:2011:updated} and \bibentry{Gunn:2011:updated2}}
1547
1548
1549
%% Or state no citations like below
%% \authorshipdeclaration{}
%% -----------------------
1550
1551
\acknowledgements{Thanks to no one.}
\dedicatory{To \dots}
1552
%</testthesis|testminithesis|testproject|testreport|testgdp>
1553
%%Lightweight Definitions and Abbreviations see package:nomencl for alternative
1554
1555
%% Include if relevant to discipline
\listofsymbols{ll}{$w$ & The weight vector\\$\S$ & If relevant to discipline}
1556
1557
%</testthesis|testminithesis|testprogress|testproject|testreport|testgdp>
%</testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp>
1558
1559
%<*testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp|testgdpsummary>
\mainmatter
1560
%% ------------------ MAIN MATTER (CONTENT) --------------------
1561
1562
1563
1564
%</testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp|testgdpsummary>
%<*testthesis|testminithesis|testprogress|testproject|testreport|testgdp>
\include{Introduction}
\include{Conclusions}
1565
1566
1567
1568
1569
1570
1571
\begin{lstlisting}[caption=Without a title it doesn't appear in the table]
This is a test listing

It has several lines
That
say not much at all
\end{lstlisting}
1572
1573
1574
\appendix
\include{AppendixA}
\backmatter
1575
1576
1577
%<*testthesis|testminithesis|testprogress>
\chapter{Glossary [if relevant]}
%</testthesis|testminithesis|testprogress>
1578
1579
\bibliographystyle{uos}
\bibliography{UOS}
1580
%<*testthesis|testminithesis|testprogress>
1581
1582
\chapter{Bibliography}
To use bibliography as well as the references section use the \texttt{multibbl} package.
1583
1584
\chapter{Index [if relevant]}
%</testthesis|testminithesis|testprogress>
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
%</testthesis|testminithesis|testprogress|testproject|testreport|testgdp>
%<*testgdpsummary>
\section*{Introduction}
\section*{Objectives}
\section*{Resources}
\section*{Constraints}
\section*{Approaching the task}
\section*{Team Organisation}
\section*{Important Results}
\section*{Conclusions}
\section*{Recommendations}
%</testgdpsummary>
%<*introduction>
\chapter{Introduction} \label{Chapter:Introduction}
%</introduction>
%<*testarticle>
\section{Introduction} \label{Section:Introduction}
%</testarticle>
%<*introduction|testarticle>
You probably found all the files from \cite{Gunn:2001:pdflatex}.
\tref{Table:tabex} illustrates the results of my work.
\begin{table}[!htb]
  \centering
  \begin{tabular}{cc}
  \toprule
  \textbf{Training Error} & \textbf{Testing Error}\\
  \midrule
  0 & $\infty$\\
  \bottomrule
  \end{tabular}
  \caption{The Results}
  \label{Table:tabex}
\end{table}

\fref{Figure:figex} shows why this is the case.
\begin{figure}[!htb]
  \centering
  \includegraphics[width=8cm]{figure}
  \caption{A colourful picture.}
  \label{Figure:figex}
\end{figure}

This page shows you a subfigure example in \fref{Figure:figsubex}.
\begin{figure}[!htb]
  \centering
1630
  \subcaptionbox{The left caption}{
1631
1632
1633
    \includegraphics[width=4.2cm]{figure}
    \label{Figure:figsubex:left}
  }
1634
  \subcaptionbox{The right caption}{
1635
1636
1637
1638
1639
1640
    \includegraphics[width=4.2cm]{figure}
    \label{Figure:figsubex:right}
  }
  \caption{A doubly colourful picture.}
  \label{Figure:figsubex}
\end{figure}
1641
1642
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec rutrum sodales ligula, ac aliquam sem interdum at. Ut commodo pulvinar ipsum. Aliquam et diam sed nibh tincidunt mollis vitae quis nunc. In vel ante vitae felis semper malesuada sed a metus. Aliquam semper metus vel metus imperdiet, quis mollis nisi volutpat. Integer in convallis erat, et auctor dui. Phasellus id tristique tortor. Mauris ac nisi ut mi pulvinar interdum. Donec quis nibh tempus erat lobortis dapibus non a nunc. Nulla laoreet tempus fringilla. Aliquam pulvinar, sapien eu interdum gravida, libero urna dapibus sem, sodales efficitur lorem nunc et justo. Proin vitae dolor nisl.

1643
\section{A Section of a chapter}
1644
1645
Nulla molestie velit sed dui ullamcorper viverra. Fusce placerat vulputate lacus eu consequat. Cras ullamcorper vel mauris quis aliquam. Curabitur non varius elit, eget commodo urna. Phasellus erat libero, faucibus elementum augue eget, malesuada fringilla purus. Quisque pulvinar, lectus sit amet ultricies tristique, eros nunc commodo lacus, nec ultrices risus lorem vitae diam. Cras ac ornare nisi.

1646
1647
1648
1649
1650
1651
\subsection{Some quotes}

Nam egestas felis euismod erat tincidunt ornare. Nulla hendrerit tempor purus ac consequat. Aliquam commodo, ipsum vestibulum lobortis semper, urna turpis sagittis dolor, id ullamcorper nulla nisl vitae ex. Vivamus ut metus vel velit rhoncus pulvinar sit amet nec diam. Aliquam aliquet, enim eget efficitur euismod, velit arcu mattis nisl, a mollis dui leo vel libero. Nullam porttitor convallis magna ut feugiat. `Cras at ultrices metus.' Nullam vulputate quis justo sit amet pharetra. Praesent sodales eros non suscipit gravida.
\begin{quote}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec rutrum sodales ligula, ac aliquam sem interdum at.
\end{quote}
1652
1653

Pellentesque sodales lobortis feugiat. Vivamus volutpat mauris id odio aliquam maximus sed sit amet nibh. Fusce odio tortor, aliquam et mauris facilisis, interdum placerat tortor. Suspendisse dapibus, massa eget cursus congue, mi lectus luctus nisl, vitae sagittis ligula ante sit amet enim. Donec quis sapien vel ex vestibulum porta. Vivamus mattis sodales turpis, id interdum justo ullamcorper a. Aenean ornare urna turpis, id fermentum eros commodo aliquet. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec cursus pretium ex at mollis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed at diam quam. Etiam a sollicitudin dui. Nulla facilisi. Phasellus condimentum tincidunt ipsum. Sed dignissim neque a porttitor finibus. Maecenas pretium dictum lorem vitae viverra.
1654
1655
1656
1657
1658
\begin{quote}
The \verb|\attrib| macro attributes block elements, for example when citing
a reference after a block quotation.
\attrib{\cite{attribpackage}}
\end{quote}
1659
1660

Donec vitae massa nisi. Praesent sed sollicitudin urna. Suspendisse vitae cursus tortor. In egestas quis dolor ac porttitor. Pellentesque suscipit leo nisi, a semper nunc interdum quis. Aenean massa magna, aliquam imperdiet lorem vitae, vestibulum dignissim nunc. Nunc molestie eleifend dui et porta. Sed auctor eu nunc vel faucibus. Integer et finibus metus, pharetra egestas velit. Sed nec magna semper, rutrum diam vitae, accumsan sapien. Donec congue viverra luctus.
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
%</introduction|testarticle>
%<*conclusions>
\chapter{Conclusions} \label{Chapter: Conclusions}
%</conclusions>
%<*testarticle>
%% ----------------------------------------------------------------
\section{Conclusions} \label{Section: Conclusions}
%</testarticle>
%<*conclusions|testarticle>
It works.
%</conclusions|testarticle>
%<*testarticle>
\acknowledgements{Thanks to no one.}
\backmatter
1675
\appendix
1676
1677
\bibliographystyle{uos}
\bibliography{UOS}
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
%</testarticle>
%<*appendix|testarticle>
%<*appendix>
\chapter{Stuff} \label{Chapter:Stuff}
%</appendix>
%<*testarticle>
%% ----------------------------------------------------------------
\section{Stuff} \label{Section:Stuff}
%</testarticle>
The following gets in the way of the text....
%</appendix|testarticle>
%<*testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp|testgdpsummary>
\end{document}
%% ----------------------------------------------------------------
%</testthesis|testminithesis|testprogress|testproject|testreport|testarticle|testgdp|testgdpsummary>
%    \end{macrocode}
%
% \subsection{Example Figure}
%
%    \begin{macrocode}
%<*figure>
%%BoundingBox: 0 150 600 650
%%EndComments
0.0 setlinewidth
/length 0.1 def
/width 0.02 def
/hsvcircle {
gsave
    /h 0.0 def
    0 4 360 {
    pop
    gsave
    0.5 0.0 translate
    newpath
    0.0 0.0 moveto
    length 0.0 lineto
    length width lineto
    0.0 width lineto
    closepath
    h 1.0 1.0 sethsbcolor
    fill
    grestore
    /h h 4 360 div add def
    4 rotate
    } for
grestore
} def
0.0 setlinewidth
0.0 setgray
300 400 translate
500 500 scale
30 rotate
1.0 0.7 scale
-30 rotate
hsvcircle
0.8 0.8 scale
hsvcircle
0.8 0.8 scale
hsvcircle
0.8 0.8 scale
hsvcircle
0.8 0.8 scale
hsvcircle
0.8 0.8 scale
hsvcircle
0.8 0.8 scale
hsvcircle
showpage
%</figure>
%    \end{macrocode}
%
% \subsection{Definitions File}
%
%    \begin{macrocode}
%<*definitions>
\newcommand{\BibTeX}{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}

%% People
\newcounter{address}
\setcounter{address}{1}
\renewcommand{\theaddress}{\textsuperscript{\fnsymbol{address}}}
\newcommand{\address}[1]{\refstepcounter{address}\theaddress#1\\}
\newcommand{\Name}[3]{\texorpdfstring{\href{mailto:#3}{#2}#1}{#2}\xspace}
\newcommand{\SteveRGunn}[1]{\Name{#1}{Steve R. Gunn}{S.R.Gunn@ecs.soton.ac.uk}}

%% Dingbats
\newcommand{\tick}{\ding{51}}
\newcommand{\cross}{\ding{55}}

%% Calculus
\newcommand{\pd}[2]{\ensuremath{\frac{\partial #1}{\partial #2}}\xspace}
\newcommand{\fd}[2]{\ensuremath{\frac{d #1}{d #2}}\xspace}
\newcommand{\dint}{\ensuremath{\int\!\!\!\int}\xspace}
\newcommand{\tint}{\ensuremath{\int\!\!\!\int\!\!\!\int}\xspace}

%% Math Sets
\newcommand{\Q}[1]{\ensuremath{\mathbb{#1}}\xspace}
\newcommand{\R}{\Q{R}}

%% Matrix, Vector
\newcommand{\V}[1]{\ensuremath{\boldsymbol{#1}}\xspace}
\newcommand{\M}[1]{\ensuremath{\boldsymbol{#1}}\xspace}
\newcommand{\0}{\V{0}}
\newcommand{\1}{\V{1}}
\newcommand{\I}{\M{I}}

%% Math Functions
\newcommand{\F}[1]{\ensuremath{\mathrm{#1}}\xspace}
\newcommand{\sgn}{\F{sgn}}
\newcommand{\tr}{\F{trace}}
\newcommand{\diag}{\F{diag}}

%% Math Names
\newcommand{\N}[1]{\ensuremath{\mathit{#1}}\xspace}

%% Data
\newcommand{\mc}[1]{\ensuremath{\mathcal{#1}}\xspace}
\newcommand{\Hyp}{\mc{H}}
\newcommand{\D}{\mc{D}}

%% Kernel
\newcommand{\K}{\M{K}}
\newcommand{\eins}{\texorpdfstring{\ensuremath{\epsilon}}{\textepsilon}-insensitive\xspace}
\newcommand{\e}{\ensuremath{\epsilon}\xspace}
\newcommand{\Bxi}{\ensuremath{\boldsymbol{\xi}}\xspace}
\newcommand{\Kanova}{\ensuremath{\mathit{K_{ANOVA}}}\xspace}
\newcommand{\Kspline}{\ensuremath{\mathit{K_{spline}}}\xspace}

%% Bayesian
\newcommand{\MP}{\ensuremath{\mathit{{\scriptscriptstyle \hspace{-1.5pt}M\hspace{-1.5pt}P}}}\xspace}
\newcommand{\ML}{\ensuremath{\mathit{{\scriptscriptstyle \hspace{-1.5pt}M\hspace{-1.5pt}L}}}\xspace}
\newcommand{\Qw}{\ensuremath{Q_{\w}(\w)}\xspace}
\newcommand{\Qa}{\ensuremath{Q_{\Ba}(\Ba)}\xspace}
\newcommand{\Qb}{\ensuremath{Q_{\beta}(\beta)}\xspace}
\newcommand{\wMPab}{\ensuremath{\w_{\MP|\bar {\Ba},\bar \beta}}\xspace}
\newcommand{\wMP}{\ensuremath{\w_{\MP}}\xspace}
\newcommand{\yMP}{\ensuremath{y_{\MP}}\xspace}
\newcommand{\BaMP}{\ensuremath{\Ba_{\hspace{1pt}\MP}}\xspace}
\newcommand{\aMP}{\ensuremath{\alpha_{\hspace{1pt}\MP}}\xspace}
\newcommand{\bMP}{\ensuremath{\beta_{\hspace{1pt}\MP}}\xspace}
\newcommand{\Sab}{\ensuremath{\M{\Sigma}_{\bar \Ba,\bar \beta}}\xspace}
\newcommand{\Ba}{\ensuremath{\boldsymbol{\alpha}}\xspace}
\newcommand{\Bb}{\ensuremath{\boldsymbol{\beta}}\xspace}
\newcommand{\Bm}{\ensuremath{\boldsymbol{\mu}}\xspace}
\newcommand{\BL}{\ensuremath{\boldsymbol{\Lambda}}\xspace}
\newcommand{\BPhi}{\ensuremath{\boldsymbol{\Phi}}\xspace}
\newcommand{\SMP}{\ensuremath{\M{\Sigma}_{\MP}}\xspace}

\newcommand{\Pa}{\ensuremath{P(\alpha|\mathcal{H})}\xspace}
\newcommand{\Pb}{\ensuremath{P(\beta|\mathcal{H})}\xspace}
\newcommand{\Pab}{\ensuremath{P(\alpha,\beta|\mathcal{H})}\xspace}
\newcommand{\Pw}{\ensuremath{P(\w|\mathcal{H})}\xspace}
\newcommand{\PD}{\ensuremath{P(\D|\mathcal{H})}\xspace}
\newcommand{\PwIa}{\ensuremath{P(\w|\alpha,\mathcal{H})}\xspace}
\newcommand{\PDIwb}{\ensuremath{P(\D|\w,\beta,\mathcal{H})}\xspace}
\newcommand{\PDwab}{\ensuremath{P(\D,\w,\alpha,\beta|\mathcal{H})}\xspace}
\newcommand{\PDIw}{\ensuremath{P(\D|\w,\mathcal{H})}\xspace}
\newcommand{\PwID}{\ensuremath{P(\w|\D,\mathcal{H})}\xspace}
\newcommand{\PwabID}{\ensuremath{P(\w,\alpha,\beta|\D,\mathcal{H})}\xspace}

\newcommand{\PanH}{\ensuremath{P(\alpha)}\xspace}
\newcommand{\PbnH}{\ensuremath{P(\beta)}\xspace}
\newcommand{\PabnH}{\ensuremath{P(\alpha,\beta)}\xspace}
\newcommand{\PwnH}{\ensuremath{P(\w)}\xspace}
\newcommand{\PDnH}{\ensuremath{P(\D)}\xspace}
\newcommand{\PwIanH}{\ensuremath{P(\w|\alpha)}\xspace}
\newcommand{\PDIwbnH}{\ensuremath{P(\D|\w,\beta)}\xspace}
\newcommand{\PDwabnH}{\ensuremath{P(\D,\w,\Ba,\beta)}\xspace}
\newcommand{\PDIwnH}{\ensuremath{P(\D|\w)}\xspace}
\newcommand{\PwIDnH}{\ensuremath{P(\w|\D)}\xspace}
\newcommand{\PwabIDnH}{\ensuremath{P(\w,\alpha,\beta|\D)}\xspace}

\newcommand{\PDwBab}{\ensuremath{P(\D,\w,\Ba,\beta|\mathcal{H})}\xspace}
\newcommand{\PwIBa}{\ensuremath{P(\w|\Ba,\mathcal{H})}\xspace}
\newcommand{\PBab}{\ensuremath{P(\Ba,\beta|\mathcal{H})}\xspace}
\newcommand{\PwBabID}{\ensuremath{P(\w,\Ba,\beta|\D,\mathcal{H})}\xspace}

\newcommand{\PBanH}{\ensuremath{P(\Ba)}\xspace}
\newcommand{\PwIBanH}{\ensuremath{P(\w|\Ba)}\xspace}

%% Snakes
\newcommand{\Esnake}{\ensuremath{\mathit{E_{snake}}}\xspace}
\newcommand{\Eimage}{\ensuremath{\mathit{E_{image}}}\xspace}
\newcommand{\Econt}{\ensuremath{\mathit{E_{cont}}}\xspace}
\newcommand{\Ecurv}{\ensuremath{\mathit{E_{curv}}}\xspace}
\newcommand{\Eint}{\ensuremath{\mathit{E_{int}}}\xspace}
\newcommand{\Eext}{\ensuremath{\mathit{E_{ext}}}\xspace}
\newcommand{\Eterm}{\ensuremath{\mathit{E_{term}}}\xspace}
\newcommand{\Eline}{\ensuremath{\mathit{E_{line}}}\xspace}
\newcommand{\Eedge}{\ensuremath{\mathit{E_{edge}}}\xspace}
\newcommand{\Econ}{\ensuremath{\mathit{E_{con}}}\xspace}
\newcommand{\Eangle}{\ensuremath{\mathit{E_{angle}}}\xspace}
\newcommand{\Elshape}{\ensuremath{\mathit{E_{lshape}}}\xspace}
\newcommand{\Eedgedir}{\ensuremath{\mathit{E_{edgedir}}}\xspace}
\newcommand{\Emodel}{\ensuremath{\mathit{E_{model}}}\xspace}
\newcommand{\wte}{\ensuremath{\mathit{w_{term}}}\xspace}
\newcommand{\wli}{\ensuremath{\mathit{w_{line}}}\xspace}
\newcommand{\wed}{\ensuremath{\mathit{w_{edge}}}\xspace}
\newcommand{\wco}{\ensuremath{\mathit{w_{con}}}\xspace}


%% Environments
\newcounter{alg}
\newenvironment{algorithm}[1]
{
    \stepcounter{alg}
    \begin{table}[htb]
    \centering
    \begin{tabular}[t]{ll}
    \hline&\\
    \multicolumn{2}{l}{\bf Algorithm \arabic{alg}: #1}\\&\\
} {
    &\\
    \hline
    \end{tabular}
    \end{table}
}
%</definitions>
%    \end{macrocode}
%
1898
% \subsection{References File}\label{references}
1899
1900
1901
1902
1903
1904
1905
1906
1907
%
%    \begin{macrocode}
%<*references>
@MISC{Gunn:2001:pdflatex,
  author =       {S.R. Gunn},
  title =        {PDFLaTeX Instructions},
  year =         {2001},
  url =          {http://www.ecs.soton.ac.uk/~srg/softwaretools/document/}
}
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
@MISC{Lovell:2011:updated,
  author =       {C. J. Lovell},
  title =        {Updated templates},
  year =         {2011}
}
@MISC{Gunn:2011:updated2,
  author =       {S.R. Gunn and C. J. Lovell},
  title =        {Updated templates reference 2},
  year =         {2011}
}
1918
1919
1920
1921
1922
1923
1924
@MISC{attribpackage,
  author =       {Matt Swift},
  title =        {The attrib LaTeX package
attribution of block elements (Frankenstein’s hat)},
  year =         {1999},
  url =          {http://cs.brown.edu/about/system/managed/latex/doc/attrib.pdf}
}
1925

1926
1927
1928
1929
1930
1931
1932
%</references>
%    \end{macrocode}
%
% \subsection{Bibliography Style File}
%
%    \begin{macrocode}
%<*bst>
1933
%% File: `uos.bst'
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143