ecsdocs.dtx 84.5 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
% \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
% class files ecsthesis.cls, ecsminithesis.cls, ecsprogress.cls, ecsproject.cls, ecsreport.cls, ecsgdp.cls, ecsgdpsummary.cls and ecsarticle.cls.
% \fi
%
11

12
% \CheckSum{1908}
13
14
15
%
% \iffalse
% Copyright (C) 2001 by Steve R. Gunn
16
% Later Modifications 2018 by Edward Longman
17
%    \begin{macrocode}
18
%<thesis|minithesis|progress|project|article|report|gdp|gdpsummary>\NeedsTeXFormat{LaTeX2e}[2007/02/26]
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
%    \end{macrocode}
%
%    Announce the document class and its version.
%
%    \begin{macrocode}
%<thesis>\ProvidesClass{ecsthesis}
%<minithesis>\ProvidesClass{ecsminithesis}
%<progress>\ProvidesClass{ecsprogress}
%<project>\ProvidesClass{ecsproject}
%<article>\ProvidesClass{ecsarticle}
%<report>\ProvidesClass{ecsreport}
%<gdp>\ProvidesClass{ecsgdp}
%<gdpsummary>\ProvidesClass{ecsgdpsummary}
%<*driver>
\ProvidesFile{ecsdocs.drv}
%</driver>
%<*thesis|minithesis|progress|project|report|article|gdp|gdpsummary|driver>
36
              [2018/12/20 v2.0
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
%</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}
\GetFileInfo{ecsdocs.drv} \CodelineIndex \EnableCrossrefs
%\RecordChanges
\setcounter{IndexColumns}{2}
\begin{document}
\DocInput{ecsdocs.dtx}
\PrintIndex
%\PrintChanges
\end{document}
%</driver>
%    \end{macrocode}
% \fi
%
% \title{\LaTeXe{} Document Styles for the\\
62
%        University of Southampton\\
63
64
%       {File version \fileversion, dated \filedate}}
%
65
% \author{Edward Longman with prior work by Steve R. Gunn}
66
67
68
69
%
% \date{Printed \today}
%
% \maketitle
70
71
72
73
74
75
76
77
78
79
80
% \section{Quickstart}
%   This guide assumes you have installed MiKTeX or TeX live distributions.
%   It also requires having the program "make" for producing the templates again.
%
%   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
%   Of Southampton.
%
81
%   The basic settings for University, Faculty and School are explained in Section~\ref{IntNames}
82
83
84
85
86
%
%   If a user only wishes to change the file for their thesis it is probably
%   easier to navigate to the class file labeled ecsthesis and change the
%   department and faculty naming there. This will be located in the
%   subdirectory where you unzipped the files under tex/latex/ecsdocs/
87
88
89
90
%
% \section{Description}
%
%    These \LaTeXe{} document classes are designed to produce thesis, mini-thesis, progress,
91
92
93
94
%    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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
%    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}
%   thesis            & produce the \texttt{ecsthesis} document class\\
%   minithesis        & produce the \texttt{ecsminithesis} document class\\
%   progress          & produce the \texttt{ecsprogress} document class\\
%   project           & produce the \texttt{ecsproject} document class\\
%   report            & produce the \texttt{ecsreport} document class\\
%   article           & produce the \texttt{ecsarticle} document class\\
%   gdp               & produce the \texttt{ecsgdp} document class\\
%   gdpsummary        & produce the \texttt{ecsgdpsummary} document class\\
%   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}
%
135
136
% The checksum is to determine if there has been a truncation in the file during transmission over a network
%
137
138
139
140
%    The class has a custom option to define what colours should be used for links.
%    This option defines \texttt{sotonlinks} to use UoS palette colours.
%    Colour Code taken from \texttt{http://edshare.soton.ac.uk/10481}
%
141
142
143
144
145
146
147
148
%    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}
149
150
151
152
%% ------------ 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.)
153
154
155
156
157
158
159
160
161
162
%<*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}
163
164
165
166
167
168
169
170
171
\RequirePackage{xcolor}
\colorlet{linkBlue}{blue}
\colorlet{custGray}{gray}
\DeclareOption{sotonlinks}{
\definecolor{sotonMarineBlue}{RGB}{1,67,89} % Soton marine blue (P 7469C)
  \definecolor{sotonGrey}{RGB}{153,153,166} % Soton grey (P 443C)
  \colorlet{linkBlue}{sotonMarineBlue}
  \colorlet{custGray}{sotonGrey}
}
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
256
257
258
\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}
%
259
260
261
262
263
264
265
266
267
268
% \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}

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
329
330
331
% \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}
332
333
334
335
336
% 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}
337
338
\chead{}\lfoot{}\rfoot{}\cfoot{}
\pagestyle{fancy}
339
340
341
342
343
\fancypagestyle{plain}{
  \fancyhf{}
  \fancyhead[OR]{\thepage}
  \renewcommand{\headrulewidth}{0pt}
}
344
345
346
347
348
349
350
351
352
%    \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.
%
353
354
355
356
% The \textbackslash btypeout command is for console logging where chapters start
%
% \textbackslash chapapp expands to "Chapter" or "Appendix"
%
357
358
%    \begin{macrocode}
%<*thesis|minithesis|progress|project|report|gdp>
359
360
\renewcommand{\chaptermark}[1]{\btypeout{\thechapter.\space #1}\markboth{\chaptername\ \thechapter.\hspace{1em}#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\hspace{1em}#1}}
361
362
363
\renewcommand{\subsectionmark}[1]{}
%</thesis|minithesis|progress|project|report|gdp>
%<*article>
364
\renewcommand{\sectionmark}[1]{\btypeout{\thesection\hspace{1em}}\markboth{}{\thesection.\hspace{1em}#1}}
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
\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}
387
388
389
390
391
392
393
394
395
396
397
398
399
% \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}
400
401
402
403
404
405
406
%
% \subsection{Mathematics}
%
%    Load the \texttt{amsmath} packages, so we can do some serious math, and
%    setup the theorem environments.
%
%    \begin{macrocode}
407
408
%% -------------------- Figure/Table/Eq/Listing Stying --------------------
%% Set the styling for non text elements of the document
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
435
436
437
438
439
440
441
\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}
%
%   Load the \texttt{caption2} package to improve formatting of captions,
%   and provide short referencing commands.
%
%    \begin{macrocode}
442
\usepackage[justification=centerlast,font=small,labelfont=sc]{caption}
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
516
517
518
519
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
550
551
552
\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}
%
%    Load the \texttt{subfigure} package, so we can include subfigures easily.
%
%    \begin{macrocode}
\usepackage[scriptsize]{subfigure}
\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,
553
   colorlinks,linkcolor={linkBlue},citecolor={linkBlue},urlcolor={linkBlue},
554
555
556
557
558
559
   pdfstartview={FitV},unicode,breaklinks=true]{hyperref}
\pdfstringdefDisableCommands{
   \let\\\space
}
%    \end{macrocode}
%
560
% \section{Internal Names}\label{IntNames}
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
%
% \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
%    style for other parts of the University.
%
%    \begin{macrocode}
583
%% --------------------- Organisational Structure ----------------------
584
585
586
587
\newcommand*{\supervisor}[1]{\def\supname{#1}}
\newcommand*{\examiner}[1]{\def\examname{#1}}
\newcommand*{\degree}[1]{\def\degreename{#1}}
\newcommand*{\authors}[1]{\def\authornames{#1}}
588
\newcommand*{\qualifications}[1]{\def\quals{#1}}
589
\newcommand*{\addresses}[1]{\def\addressnames{#1}}
590
\newcommand*{\doi}[1]{\def\doicode{#1}}
591
\newcommand*{\volume}[2]{\def\volno{#1}\def\volof{#2}}
592
\newcommand*{\orcidid}[1]{\def\orcid{#1}}
593
594
595
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
\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.
%
640
%    By running these commands at the top of your tex file it will overwrite the defaults.
641
%    \begin{macrocode}
642
%% --------------------- Organisational Structure ----------------------
643
\doi{}
644
645
646
647
\supervisor  {}
\examiner    {}
\degree      {}
\authors     {}
648
649
\qualifications{}
\orcidid{}
650
651
\volume{}{}
\university  {\texorpdfstring{\href{http://www.southampton.ac.uk}
652
653
                {University of Southampton}}
                {University of Southampton}}
654
\UNIVERSITY  {\MakeUppercase{\univname}}
655
\department  {School of Electronics and Computer Science}
656
\DEPARTMENT  {\MakeUppercase{\deptname}}
657
\group       {Cyber Physical Systems Group}
658
\GROUP       {\MakeUppercase{\groupname}}
659
\faculty     {Faculty of Engineering and Physical Science}
660
\FACULTY     {\MakeUppercase{\facname}}
661
662
663
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
\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.
%
690
691
692
693
%    The %\global\let\@title\@empty has been removed
%
%    Possibly the relax statement also needs to be removed
%
694
695
%   \begin{macrocode}
%<*thesis|minithesis|progress|project|report|gdp|gdpsummary>}
696
697
698
699
700
701
702
\usepackage{titling}
\AtBeginDocument{
  \hypersetup{pdftitle={\thetitle}}
  \hypersetup{pdfsubject={\subjectname}}
  \hypersetup{pdfauthor={\authornames}}
  \hypersetup{pdfkeywords={\keywordnames}}
}
703
704
705
706
707
708
709
710
711
712
713
714
\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}
715
716
717
718
      {\scshape\LARGE\textbf{\univname}\par}
      %% TODO: Change all the descriptions to italic like the Thesis one
%<*thesis|minithesis|progress|project|gdp|gdpsummary>
      \bigskip
719
      {\large \facname \par}
720
721
%</thesis|minithesis|progress|project|gdp|gdpsummary>
%<*thesis|minithesis|progress|project>
722
      {\large \deptname \par}
723
%</thesis|minithesis|progress|project>
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
      \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
      {\normalsize Supervisor: \supname \par}
      {\normalsize Examiner: \examname \par}
      \vfill
      \hspace{6mm}\parbox[t][51mm][s]{89mm}{
        \center
        \vfill
        {\large \bf \@title \par}
        \vfill
755
        {\normalsize \textit{by} \textbf\authornames \par}
756
757
758
759
760
761
762
        \vfill
        {\normalsize \@date \par}
        \vfill
      }
      \parbox[t][95mm][s]{89mm}{}
%</minithesis|progress|project|gdp|gdpsummary>
%<*thesis|report>
763
764
765
766
      {\huge \bf \@title \par
}
      \ifthenelse{\equal{\doicode}{}}
      {}
767
768
769
770
      {\smallskip DOI: \href{http://orcid.org/\doicode}{\doicode}\par}
      \ifthenelse{\equal{\volno}{}}
      {}
      {\smallskip Volume \volno{} of \volof}
771
      \vfill
772
      {\LARGE \textit{by} \par}
773
      \smallskip
774
775
776
777
778
779
780
781
782
783
784
      {\LARGE \textbf\authornames
        \ifthenelse{\equal{\quals}{}}
        {}
        {\par\Large
        \quals}
      \par}
        \ifthenelse{\equal{\orcid}{}}
        {}
        {\smallskip
        ORCiD: \href{http://orcid.org/\orcid}{\orcid}}

785
786
      \vfill
%<*thesis>
787
788
      {\large \textit{A thesis for the degree of} \par}
      {\large \textit{Doctor of Philosophy} \par}
789
%</thesis>
790
%<*report>      {\large  \textit{Technical Report} \par}
791
      \bigskip
792
\bigskip
793
794
      {\large \facname \par}
      {\large \deptname \par}
795
%</report>
796
797
798
799
800
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
      \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}
954
    {\textsc\normalsize \univname \par}
955
    \bigskip
956
    {\underline{Abstract} \par}
957
    \bigskip
958
    {\textsc\normalsize \facname \par}
959
%<*thesis|minithesis|progress|project|report>
960
    {\textsc\normalsize \deptname \par}
961
962
963
964
965
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
%</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}
For faster browsing, not all history is shown. View entire blame