ChengsongTanPhdThesis/MastersDoctoralThesis.cls
author Chengsong
Sat, 26 Nov 2022 16:18:10 +0000
changeset 628 7af4e2420a8c
parent 527 2c907b118f78
permissions -rw-r--r--
ready to submit~~
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
468
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     2
% Masters/Doctoral Thesis 
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     3
% Class File
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     4
% Version 1.6 (27/8/17)
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     5
%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     6
% This class was downloaded from:
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     7
% http://www.LaTeXTemplates.com
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     8
%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
     9
% Authors:
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    10
% Vel (vel@latextemplates.com)
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    11
% Johannes Böttcher
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    12
%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    13
% Notes:
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    14
% 1) This class file defines the structure and layout of the template file (main.tex).
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    15
% 2) It has been written in such a way that under most circumstances you should not need
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    16
% to edit it; updating it to a newer version will be harder. If you do make changes, please change the name of
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    17
% the file and add comments to make your changes more visible.
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    18
%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    19
% Class license:
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    20
% LPPL v1.3c (http://www.latex-project.org/lppl)
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    21
%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    22
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    23
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    24
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    25
%	CLASS DEFINITION AND PARAMETERS
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    26
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    27
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    28
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    29
\newcommand{\classname}{MastersDoctoralThesis}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    30
\ProvidesClass{\classname}[2017/08/27 v1.6 LaTeXTemplates.com]
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    31
\providecommand{\baseclass}{book}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    32
\RequirePackage{etoolbox}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    33
\RequirePackage{xparse}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    34
\newbool{nolistspace}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    35
\newbool{chapteroneline}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    36
\newbool{listtoc}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    37
\newbool{toctoc}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    38
\newbool{parskip}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    39
\newbool{hyperrefsupport}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    40
\booltrue{hyperrefsupport}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    41
\newbool{headsepline}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    42
\newbool{consistentlayout}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    43
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    44
\DeclareOption{nohyperref}{\boolfalse{hyperrefsupport}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    45
\DeclareOption{nolistspacing}{\booltrue{nolistspace}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    46
\DeclareOption{liststotoc}{\booltrue{listtoc}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    47
\DeclareOption{chapterinoneline}{\booltrue{chapteroneline}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    48
\DeclareOption{toctotoc}{\booltrue{toctoc}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    49
\DeclareOption{parskip}{\booltrue{parskip}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    50
\DeclareOption{headsepline}{\booltrue{headsepline}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    51
\DeclareOption{consistentlayout}{\booltrue{consistentlayout}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    52
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseclass}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    53
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    54
\ProcessOptions\relax
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    55
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    56
\LoadClass{\baseclass}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    57
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    58
%  Simple interface for the user  to customize the chapter titles 
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    59
\ProvideDocumentCommand{\abovechapterskip}{}{\vspace*{20pt}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    60
\ProvideDocumentCommand{\chapterbelowskip}{}{\vspace*{40pt}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    61
\ProvideDocumentCommand{\chapterinbetweenskip}{}{\vspace*{20pt}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    62
\ProvideDocumentCommand{\autodot}{}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    63
\ProvideDocumentCommand{\mdtChapapp}{}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    64
\ProvideDocumentCommand{\chapteralign}{}{\raggedright}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    65
\ProvideDocumentCommand{\chapterfont}{}{\Huge\bfseries}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    66
\ProvideDocumentCommand{\chapterprefixfont}{}{\LARGE\bfseries}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    67
\DeclareDocumentCommand{\@makechapterhead}{ m }{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    68
	\abovechapterskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    69
	{\parindent \z@ \chapteralign \normalfont
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    70
		\ifnum \c@secnumdepth >\m@ne
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    71
		\if@mainmatter
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    72
		\ifbool{chapteroneline}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    73
			\chapterfont \mdtChapapp\thechapter\autodot\enspace
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    74
		}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    75
			\chapterprefixfont \@chapapp\space \thechapter
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    76
			\par\nobreak
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    77
			\chapterinbetweenskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    78
		}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    79
		\fi
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    80
		\fi
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    81
		\interlinepenalty\@M%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    82
		\chapterfont #1\par\nobreak
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    83
		\chapterbelowskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    84
	}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    85
	\thispagestyle{\chapter@p@gestyle}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    86
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    87
\def\@makeschapterhead#1{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    88
	\abovechapterskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    89
	{\parindent \z@ \chapteralign
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    90
		\normalfont
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    91
		\interlinepenalty\@M
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    92
		\chapterfont  #1\par\nobreak
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    93
		\chapterbelowskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    94
	}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    95
	\thispagestyle{\chapter@p@gestyle}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    96
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    97
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    98
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
    99
% Addchap provides unnumbered chapters with an entry in the table of contents as well as an updated header
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   100
\ProvideDocumentCommand{\addchap}{ s o m }{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   101
	\chapter*{#3}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   102
	\markboth{}{}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   103
	\IfBooleanTF{#1}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   104
	}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   105
		\IfNoValueTF{#2}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   106
			\addchaptertocentry{#3}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   107
			\markboth{\MakeMarkcase{#3}}{\MakeMarkcase{#3}}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   108
		}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   109
			\addchaptertocentry{#2}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   110
			\markboth{\MakeMarkcase{#2}}{\MakeMarkcase{#2}}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   111
		}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   112
	}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   113
}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   114
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   115
\ProvideDocumentCommand{\addsec}{ s o m }{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   116
	\section*{#3}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   117
	\markright{}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   118
	\IfBooleanTF{#1}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   119
	}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   120
		\IfNoValueTF{#2}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   121
			\addcontentsline{toc}{section}{#3}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   122
			\markright{\MakeMarkcase{#3}}%%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   123
		}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   124
			\addcontentsline{toc}{section}{#2}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   125
			\markright{\MakeMarkcase{#2}}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   126
		}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   127
	}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   128
}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   129
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   130
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   131
%	CLASS OPTIONS
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   132
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   133
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   134
\ifbool{parskip}{\RequirePackage{parskip}} % If the parskip option is passed to the class, require the parskip package 
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   135
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   136
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   137
\ifbool{listtoc}{% If the liststotoc option has been passed to the class, add the lists to the table of contents
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   138
	\patchcmd{\listoftables}{\@starttoc{lot}}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   139
		\addchaptertocentry{\listtablename}\@starttoc{lot}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   140
	}{}{}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   141
	\patchcmd{\listoffigures}{\@starttoc{lof}}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   142
		\addchaptertocentry{\listfigurename}\@starttoc{lof}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   143
	}{}{}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   144
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   145
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   146
\ifbool{toctoc}{% If the toctotoc options has been passed to the class, add the table of contents to the table of contents
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   147
	\patchcmd{\tableofcontents}{\@starttoc{toc}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   148
}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   149
	\addchaptertocentry{\contentsname}\@starttoc{toc}}{}{}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   150
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   151
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   152
\patchcmd{\tableofcontents}{\MakeUppercase}{\MakeMarkcase}{}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   153
\patchcmd{\tableofcontents}{\MakeUppercase}{\MakeMarkcase}{}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   154
\patchcmd{\listoffigures}{\MakeUppercase}{\MakeMarkcase}{}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   155
\patchcmd{\listoffigures}{\MakeUppercase}{\MakeMarkcase}{}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   156
\patchcmd{\listoftables}{\MakeUppercase}{\MakeMarkcase}{}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   157
\patchcmd{\listoftables}{\MakeUppercase}{\MakeMarkcase}{}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   158
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   159
% If the option `nolistspacing' is given, the spacing in the different lists is reduced to single spacing. This option is only useful, if the spacing of the document has been changed to onehalfspacing or doublespacing.
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   160
\ifbool{nolistspace}{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   161
	\patchcmd{\listoffigures}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   162
		\@starttoc{lof}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   163
	}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   164
		\begingroup%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   165
		\singlespace\@starttoc{lof}\endgroup%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   166
	}{}{}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   167
	\patchcmd{\listoftables}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   168
		\@starttoc{lot}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   169
	}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   170
		\begingroup%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   171
		\singlespace\@starttoc{lot}\endgroup%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   172
	}{}{}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   173
	\patchcmd{\tableofcontents}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   174
		\@starttoc{toc}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   175
	}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   176
		\begingroup%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   177
		\singlespace\@starttoc{toc}\endgroup%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   178
	}{}{}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   179
}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   180
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   181
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   182
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   183
%	REQUIRED PACKAGES
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   184
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   185
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   186
\RequirePackage{babel} % Required for automatically changing names of document elements to languages besides english
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   187
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   188
\RequirePackage{scrbase} % Required for handling language-dependent names of sections/document elements
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   189
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   190
\RequirePackage{scrhack} % Loads fixes for various packages
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   191
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   192
\RequirePackage{setspace} % Required for changing line spacing
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   193
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   194
\RequirePackage{longtable} % Required for tables that span multiple pages (used in the symbols, abbreviations and physical constants pages)
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   195
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   196
\RequirePackage{siunitx} % Required for \SI commands
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   197
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   198
\RequirePackage{graphicx} % Required to include images
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   199
\graphicspath{{Figures/}{./}} % Specifies where to look for included images
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   200
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   201
\RequirePackage{booktabs} % Required for better table rules
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   202
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   203
\RequirePackage{caption} % Required for customising the captions
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   204
\captionsetup{justification=centerlast,font=small,labelfont=sc,margin=50pt}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   205
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   206
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   207
%	DEFINE CUSTOM THESIS INFORMATION COMMANDS
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   208
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   209
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   210
\NewDocumentCommand{\thesistitle} { o m }{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   211
 \IfValueTF{#1}{\def\shorttitle{#1}}{\def\shorttitle{#2}}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   212
 \def\@title{#2}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   213
 \def\ttitle{#2}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   214
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   215
\DeclareDocumentCommand{\author}{m}{\newcommand{\authorname}{#1}\renewcommand{\@author}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   216
\NewDocumentCommand{\supervisor}{m}{\newcommand{\supname}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   217
\NewDocumentCommand{\examiner}{m}{\newcommand{\examname}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   218
\NewDocumentCommand{\degree}{m}{\newcommand{\degreename}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   219
\NewDocumentCommand{\addresses}{m}{\newcommand{\addressname}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   220
\NewDocumentCommand{\university}{m}{\newcommand{\univname}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   221
\NewDocumentCommand{\department}{m}{\newcommand{\deptname}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   222
\NewDocumentCommand{\group}{m}{\newcommand{\groupname}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   223
\NewDocumentCommand{\faculty}{m}{\newcommand{\facname}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   224
\NewDocumentCommand{\subject}{m}{\newcommand{\subjectname}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   225
\NewDocumentCommand{\keywords}{m}{\newcommand{\keywordnames}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   226
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   227
\newcommand{\checktoopen}{% New command to move content to the next page which prints to the next odd page if twosided mode is active  
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   228
	\if@openright\cleardoublepage\else\clearpage\fi
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   229
	\ifdef{\phantomsection}{\phantomsection}{}% The \phantomsection command is necessary for hyperref to jump to the correct page
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   230
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   231
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   232
\NewDocumentCommand{\bhrule}{}{\typeout{--------------------}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   233
\NewDocumentCommand{\tttypeout}{m}{\bhrule\typeout{\space #1}\bhrule}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   234
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   235
\newcommand{\HRule}{\rule{.9\linewidth}{.6pt}} % New command to make the lines in the title page
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   236
\newcommand{\decoRule}{\rule{.8\textwidth}{.4pt}} % New command for a rule to be used under figures
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   237
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   238
\setcounter{tocdepth}{3} % The depth to which the document sections are printed to the table of contents
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   239
\ProvideDocumentCommand{\addchaptertocentry}{ m }{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   240
	\addcontentsline{toc}{chapter}{#1}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   241
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   242
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   243
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   244
%	COLOURS
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   245
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   246
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   247
\usepackage{xcolor} % Required for specifying custom colours
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   248
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   249
\colorlet{mdtRed}{red!50!black}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   250
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   251
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   252
%	MARGINS
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   253
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   254
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   255
\RequirePackage{geometry}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   256
\geometry{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   257
	headheight=4ex,
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   258
	includehead,
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   259
	includefoot
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   260
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   261
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   262
\raggedbottom
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   263
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   264
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   265
%	PENALTIES
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   266
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   267
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   268
\doublehyphendemerits=10000 % No consecutive line hyphens
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   269
\brokenpenalty=10000 % No broken words across columns/pages
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   270
\widowpenalty=9999 % Almost no widows at bottom of page
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   271
\clubpenalty=9999 % Almost no orphans at top of page
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   272
\interfootnotelinepenalty=9999 % Almost never break footnotes
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   273
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   274
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   275
%	HEADERS AND FOOTERS
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   276
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   277
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   278
\RequirePackage[markcase=used]{scrlayer-scrpage}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   279
\providepairofpagestyles{thesisSimple}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   280
	\clearpairofpagestyles%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   281
	\automark[chapter]{chapter}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   282
	\ihead{\headmark}% Inner header
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   283
	\ohead[\pagemark]{\pagemark}% Outer header
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   284
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   285
\ifoot{}% Inner footer
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   286
\ofoot{}% Outer footer
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   287
\pagestyle{thesisSimple}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   288
\providepairofpagestyles[thesisSimple]{thesis}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   289
	\automark*[section]{}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   290
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   291
\providepairofpagestyles[thesisSimple]{review}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   292
	\ofoot[\shorttitle/\authorname]{\shorttitle/\authorname}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   293
	\ifoot[\today]{\today}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   294
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   295
\pagestyle{thesis}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   296
\ifbool{headsepline}{\KOMAoption{headsepline}{true}}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   297
\PreventPackageFromLoading[\ClassError{\classname}{Package `fancyhdr' is
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   298
incompatible\MessageBreak with this class}{The pagesyles are defined 
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   299
	using package `scrlayer-scrpage', please consult the\MessageBreak 
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   300
KOMA-script documentation for details.}]{fancyhdr}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   301
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   302
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   303
\newcommand{\blank@p@gestyle}{empty}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   304
\newcommand{\chapter@p@gestyle}{plain}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   305
\NewDocumentCommand{\blankpagestyle}{ m }{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   306
	\ClassWarning{\classname}{\string\blankpagestyle\space is
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   307
	obsolete,\MessageBreak use \string\setblankpagestyle \space  instead}\renewcommand{\blank@p@gestyle}{}{#1}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   308
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   309
\NewDocumentCommand{\setblankpagestyle}{ m }{\renewcommand{\blank@p@gestyle}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   310
\NewDocumentCommand{\setchapterpagestyle}{ m }{\renewcommand{\chapter@p@gestyle}{#1}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   311
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   312
\DeclareDocumentCommand\cleardoublepage{}{\clearpage\if@twoside \ifodd\c@page\else
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   313
	\hbox{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   314
	\thispagestyle{\blank@p@gestyle}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   315
	\newpage
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   316
	\if@twocolumn\hbox{}\newpage\fi\fi\fi%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   317
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   318
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   319
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   320
%	ABBREVIATIONS PAGE DESIGN
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   321
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   322
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   323
\newcommand{\abbrevname}{List of Abbreviations}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   324
\providecaptionname{english,british,american}{\abbrevname}{List of Abbreviations}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   325
\providecaptionname{ngerman,german,austrian,naustrian}{\abbrevname}{Abk\"urzungsverzeichnis}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   326
\NewDocumentEnvironment{abbreviations}{ m }{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   327
	\ifbool{nolistspace}{\begingroup\singlespacing}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   328
	\ifbool{listtoc}{\addchap{\abbrevname}}{\addchap*{\abbrevname}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   329
	\begin{longtable}{#1}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   330
	}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   331
	\end{longtable}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   332
	\addtocounter{table}{-1}% Don't count this table as one of the document tables
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   333
	\ifbool{nolistspace}{\endgroup}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   334
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   335
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   336
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   337
%	ABSTRACT PAGE DESIGN
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   338
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   339
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   340
\DeclareDocumentCommand{\abstractauthorfont}{}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   341
\DeclareDocumentCommand{\abstracttitlefont}{}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   342
\newcommand{\byname}{by}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   343
\newcommand{\abstractname}{Abstract}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   344
\providecaptionname{german,ngerman,austrian,naustrian}{\byname}{von}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   345
\providecaptionname{american,australian,british,canadian,english,newzealand,UKenglish,USenglish}{\byname}{by}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   346
\ifbool{consistentlayout}{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   347
	\DeclareDocumentEnvironment{abstract}{ O{} }{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   348
		\addchap*{\abstractname}%
527
2c907b118f78 all chapters put in
Chengsong
parents: 468
diff changeset
   349
		%{\chapteralign\normalsize\abstractauthorfont \authorname \par}% Author name
2c907b118f78 all chapters put in
Chengsong
parents: 468
diff changeset
   350
		%\vspace{\baselineskip}
2c907b118f78 all chapters put in
Chengsong
parents: 468
diff changeset
   351
		%{\chapteralign\parbox{.7\linewidth}{\chapteralign\normalsize\itshape\abstracttitlefont\@title}\par}% Thesis title
2c907b118f78 all chapters put in
Chengsong
parents: 468
diff changeset
   352
		%\bigskip\noindent\ignorespaces
468
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   353
	}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   354
	{}%end alt-abstract
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   355
}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   356
	\DeclareDocumentEnvironment{abstract}{ O{\null\vfill} }{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   357
		\checktoopen
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   358
		\tttypeout{\abstractname}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   359
		#1%added to be able to have abstract more than one page long
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   360
		\thispagestyle{plain}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   361
		\begin{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   362
			{\normalsize \MakeUppercase{\univname} \par}% University name in capitals
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   363
			\bigskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   364
			{\huge\textit{\abstractname} \par}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   365
			\bigskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   366
			{\normalsize \facname \par}% Faculty name
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   367
			{\normalsize \deptname \par}% Department name
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   368
			\bigskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   369
			{\normalsize \degreename\par}% Degree name
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   370
			\bigskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   371
			{\normalsize\bfseries \@title \par}% Thesis title
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   372
			\medskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   373
			{\normalsize \byname{} \authorname \par}% Author name
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   374
			\bigskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   375
		\end{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   376
	}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   377
	{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   378
		\vfill\null
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   379
	}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   380
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   381
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   382
\DeclareDocumentEnvironment{extraAbstract}{ O{\null\vfill} }{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   383
	\checktoopen
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   384
	\tttypeout{\abstractname}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   385
	#1%added to be able to have abstract more than one page long
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   386
	\thispagestyle{empty}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   387
	\begin{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   388
		{\normalsize \MakeUppercase{\univname} \par}% University name in capitals
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   389
		\bigskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   390
		{\huge\textit{\abstractname} \par}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   391
		\bigskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   392
		{\normalsize \facname \par}% Faculty name
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   393
		{\normalsize \deptname \par}% Department name
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   394
		\bigskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   395
		{\normalsize \degreename\par}% Degree name
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   396
		\bigskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   397
		{\normalsize\bfseries \@title \par}% Thesis title
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   398
		\medskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   399
		{\normalsize \byname{} \authorname \par}% Author name
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   400
		\bigskip
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   401
	\end{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   402
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   403
{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   404
	\vfill\null
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   405
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   406
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   407
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   408
%	ACKNOWLEDGEMENTS PAGE DESIGN
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   409
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   410
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   411
\usepackage{xcolor}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   412
\colorlet{mdtRed}{red!50!black}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   413
\newcommand{\acknowledgementname}{Acknowledgements}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   414
\providecaptionname{american,australian,british,canadian,english,newzealand,UKenglish,USenglish} {\acknowledgementname}{Acknowledgements} % Acknowledgement text for English countries
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   415
\providecaptionname{german,ngerman,austrian,naustrian}{\acknowledgementname}{Danksagung} % Acknowledgement text for Germanic countries
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   416
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   417
\ifbool{consistentlayout}{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   418
	\DeclareDocumentEnvironment{acknowledgements}{}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   419
		\tttypeout{\acknowledgementname}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   420
		\addchap*{\acknowledgementname}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   421
	}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   422
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   423
{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   424
	\DeclareDocumentEnvironment{acknowledgements}{}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   425
		\checktoopen
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   426
		\tttypeout{\acknowledgementname}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   427
		\thispagestyle{plain}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   428
		\begin{center}{\huge\textit{\acknowledgementname}\par}\end{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   429
	}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   430
	{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   431
		\vfil\vfil\null
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   432
	}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   433
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   434
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   435
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   436
%	DECLARATION PAGE DESIGN
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   437
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   438
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   439
\newcommand{\authorshipname}{Declaration of Authorship}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   440
\providecaptionname{american,australian,british,canadian,english,newzealand,UKenglish,USenglish}{\authorshipname}{Declaration of Authorship} % Declaration of Authorship text for English countries
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   441
\providecaptionname{german,ngerman,austrian,naustrian}{\authorshipname}{Eidesstattliche Erkl\"arung} % Declaration of Authorship text for Germanic countries
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   442
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   443
\ifbool{consistentlayout}{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   444
	\DeclareDocumentEnvironment{declaration}{}{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   445
		\addchap*{\authorshipname}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   446
		}{}%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   447
}{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   448
	\DeclareDocumentEnvironment{declaration}{}{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   449
		\checktoopen
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   450
		\tttypeout{\authorshipname}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   451
		\thispagestyle{plain}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   452
		\null\vfil
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   453
		{\noindent\huge\bfseries\authorshipname\par\vspace{10pt}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   454
	}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   455
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   456
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   457
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   458
%	DEDICATION PAGE DESIGN
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   459
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   460
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   461
\ifbool{consistentlayout}{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   462
	\DeclareDocumentCommand{\dedicatory}{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   463
		m O{\vspace*{.7\textheight} }  }{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   464
			\checktoopen\tttypeout{Dedicatory}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   465
			\markboth{}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   466
			#2
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   467
			{\hfill\parbox{.4\textwidth}{\flushright#1\par}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   468
		}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   469
}{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   470
	\newcommand\dedicatory[1]{
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   471
		\checktoopen
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   472
		\tttypeout{Dedicatory}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   473
		\null\vfil
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   474
		\thispagestyle{plain}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   475
		\begin{center}{\Large\slshape #1}\end{center}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   476
		\vfil\null
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   477
	}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   478
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   479
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   480
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   481
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   482
%	PHYSICAL CONSTANTS PAGE DESIGN
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   483
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   484
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   485
\newcommand{\constantsname}{Physical Constants}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   486
\providecaptionname{english,british,american}{\constantsname}{Physical Constants}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   487
\providecaptionname{ngerman,german,austrian,naustrian}{\constantsname}{Physikalische Konstanten}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   488
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   489
\NewDocumentEnvironment{constants}{ m }{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   490
	\ifbool{nolistspace}{\begingroup\singlespacing}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   491
	\ifbool{listtoc}{\addchap{\constantsname}}{\addchap*{\constantsname}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   492
	\begin{longtable}{#1}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   493
	}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   494
	\end{longtable}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   495
	\addtocounter{table}{-1}% Don't count this table as one of the document tables
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   496
	\ifbool{nolistspace}{\endgroup}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   497
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   498
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   499
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   500
%	SYMBOLS PAGE DESIGN
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   501
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   502
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   503
\newcommand{\symbolsname}{List of Symbols}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   504
\providecaptionname{english,british,american}{\symbolsname}{List of Symbols}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   505
\providecaptionname{ngerman,german,austrian,naustrian}{\symbolsname}{Symbolverzeichnis}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   506
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   507
\NewDocumentEnvironment{symbols}{ m }{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   508
	\ifbool{nolistspace}{\begingroup\singlespacing}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   509
	\ifbool{listtoc}{\addchap{\symbolsname}}{\addchap*{\symbolsname}}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   510
	\begin{longtable}{#1}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   511
	}{%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   512
	\end{longtable}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   513
	\addtocounter{table}{-1}% Don't count this table as one of the document tables
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   514
	\ifbool{nolistspace}{\endgroup}{}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   515
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   516
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   517
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   518
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   519
\ifbool{hyperrefsupport}{% If the nohyperref class option has not been specified
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   520
\AtEndPreamble{\RequirePackage{hyperref}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   521
\hypersetup{pdfpagemode={UseOutlines},
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   522
bookmarksopen=true,
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   523
bookmarksopenlevel=0,
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   524
hypertexnames=false,
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   525
colorlinks=true,% Set to false to disable coloring links
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   526
citecolor=magenta,% The color of citations
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   527
linkcolor=red,% The color of references to document elements (sections, figures, etc)
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   528
urlcolor=mdtRed,% The color of hyperlinks (URLs)
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   529
pdfstartview={FitV},
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   530
unicode,
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   531
breaklinks=true,
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   532
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   533
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   534
\pdfstringdefDisableCommands{% If there is an explicit linebreak in a section heading (or anything printed to the pdf-bookmarks), it is replaced by a space
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   535
	\let\\\space%
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   536
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   537
	}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   538
}{%nothing
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   539
}
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   540
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   541
%----------------------------------------------------------------------------------------
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   542
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   543
\endinput
a0f27e21b42c all texrelated
Chengsong
parents:
diff changeset
   544
% lazyLizardTracer