-
Notifications
You must be signed in to change notification settings - Fork 0
/
book.thud.tex
248 lines (227 loc) · 7.84 KB
/
book.thud.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
\def\thud@unisep{.5em}
\def\thud@se@and{.2ex}
\def\thud@se@qual{1ex}
\def\thud@se@sep{2em}
\geometry{%
hcentering,%
bindingoffset=.025\paperwidth,%
outer=.075\paperwidth,%
nofoot,nomarginpar,%
vdivide={.08\paperheight,*,.06\paperheight}%
}
\ifthud@phd\let\thud@spacing\singlespacing\else\def\thud@spacing{\setstretch{1.3}}\fi
\def\thud@newpagestyle#1#2{
\@namedef{ps@#1}{
\let\@oddfoot\@empty
\let\@evenfoot\@empty
\let\@mkboth\markboth
\let\ps@plain\ps@empty%
\@nameuse{thud@chs@#1}%
\@nameuse{thud@pts@#1}%
#2%
}
}
\def\chaptermark#1{\ifnum\c@secnumdepth>\m@ne\relax\def\thud@tmpcmd{\thechapter. \ #1}\else\let\thud@tmpcmd\@empty\fi\markboth{\thud@tmpcmd}{\thud@tmpcmd}}
\def\sectionmark#1{\markright{\ifnum\c@secnumdepth>\z@\relax\thesection. \ \fi#1}}
\def\thud@headruledbox#1#2#3{\underline{\makebox[\textwidth]{%
{\small#1\bfseries#2\hfill#3}\rule[-0.5ex]{0pt}{1ex}%
}}}
\def\thud@defheads#1{%
\def\@evenhead{\thud@headruledbox{#1}\thepage\leftmark}%
\def\@oddhead{\thud@headruledbox{#1}\rightmark\thepage}%
}
\let\ps@bookplain\ps@plain
\thud@newpagestyle{plain}{\thud@defheads\relax}
\thud@newpagestyle{big}{\thud@defheads\relax}
\thud@newpagestyle{sfbig}{\thud@defheads\sffamily}
\def\thud@declgigantic{\DeclareFontShape{T1}{cmr}{ch}{n}{<-> cmr17}{}}
\def\thud@gigantic{\fontsize{99.45}{100\p@}\usefont{T1}{cmr}{ch}{n}}
\thud@save{@makechapterhead}
\thud@save{@makeschapterhead}
\long\def\thud@mkchaphdstub#1#2#3{%
{\parindent\z@\relax
\raggedleft\normalfont
\vspace*{30\p@}%
#1%% Either \iftrue or \iffalse
\ifnum\c@secnumdepth>\m@ne\relax
\if@mainmatter
{\thud@gigantic\thechapter}\Huge\par\nobreak\vskip15\p@\relax\hrule\vskip15\p@\relax%
\fi%
\fi%
\fi%
\interlinepenalty\@M\relax%
\Huge\bfseries#2#3\par\nobreak%
\vskip40\p@\relax}%
}
\long\def\thud@defmakechapterhead#1{
\thud@declgigantic%
\def\@makechapterhead##1{\expandafter\thud@mkchaphdstub\noexpand\iftrue{#1}{##1}}
\def\@makeschapterhead##1{\expandafter\thud@mkchaphdstub\noexpand\iffalse{#1}{##1}}
}
\def\thud@chs@plain{%
\thud@restore{@makechapterhead}
\thud@restore{@makeschapterhead}
}
\def\thud@chs@big{\thud@defmakechapterhead\relax}
\def\thud@chs@sfbig{\thud@defmakechapterhead\sffamily}
\thud@save{@part}
\thud@save{@spart}
\long\def\thud@spartstub#1#2{
{\raggedleft
\interlinepenalty\@M\relax
\normalfont%
#1%% Either \iftrue or \iffalse
\ifnum\c@secnumdepth>-2\relax
\if@mainmatter
{\thud@gigantic\thepart\par\vskip20\p@\relax\hrule\vskip20\p@\relax}%
\fi%
\fi%
\else%
\hrule\vskip20\p@\relax%
\fi%
\Huge\bfseries#2\par}%
\@endpart%
}
\def\thud@defpartstub#1{
\def\@part[##1]##2{
\ifnum\c@secnumdepth>-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}{\thepart\hspace{1em}##1}%
\else
\addcontentsline{toc}{part}{##1}%
\fi%
\markboth{}{}%
\expandafter\thud@spartstub\noexpand\iftrue{#1##2}%
}
\def\@spart##1{
\expandafter\thud@spartstub\noexpand\iffalse{#1##1}%
}
}
\def\thud@pts@plain{%
\thud@restore{@part}
\thud@restore{@spart}
}
\def\thud@pts@big{%
\thud@declgigantic%
\thud@defpartstub\relax
}
\def\thud@pts@sfbig{%
\thud@declgigantic%
\thud@defpartstub\sffamily
}
\def\printindex{\InputIfFileExists{\jobname.ind}{}{\ClassWarningNoLine{\@currname}{No file \jobname.ind.}}}
\newif\ifthud@endpart
\def\maybeblank{\ifthud@endpart\else\ifodd\c@page\@endpart\fi\fi\global\thud@endpartfalse}
\g@addto@macro\@endpart{\global\thud@endparttrue}
\def\thud@patchMatter#1{%
\thud@save{#1matter}
\@namedef{#1matter}{%
\thud@save{cleardoublepage}
\def\cleardoublepage{\maybeblank\thud@endparttrue}
\@nameuse{thud@save@#1matter}
\thud@restore{cleardoublepage}
}
}
\thud@patchMatter{main}
\thud@patchMatter{back}
\thud@save{part}
\def\part{\maybeblank\thud@save@part}
\newcounter{thud@secnumdepth}
\newif\ifthud@unnmkchp
\thud@save{chapter}
\def\chapter{\maybeblank\@ifplus{\thud@unnmkchptrue\thud@save@chapter}{\thud@unnmkchpfalse\thud@save@chapter}}
\thud@save{@chapter}
\def\@chapter[#1]#2{%
\ifthud@unnmkchp\c@thud@secnumdepth=\c@secnumdepth\relax\c@secnumdepth=-100\relax\fi%
\thud@save@@chapter[#1]{#2}%
\ifthud@unnmkchp\c@secnumdepth=\c@thud@secnumdepth\relax\fi%
}
\thud@save{@schapter}
\def\@schapter#1{\thud@save@@schapter{#1\ifthud@unnmkchp\@mkboth{#1}{#1}\fi}}
\def\abstract{\chapter+*{\abstractname}}
\def\acknowledgements{\chapter+*{\acknowledgementsname}}
\def\summary{\chapter+*{\summaryname}}
\newenvironment{titlelike}[1]{
\cleardoublepage\thispagestyle{empty}%
\def\thud@titlelike{#1}%
\vspace*{\z@\@plus.3fil}%
\begin{\thud@titlelike}%
}{
\end{\thud@titlelike}%
\vspace*{\z@\@plus.6fil}%
\newpage\thispagestyle{empty}%
}
\newenvironment{approval}{\begin{titlelike}{center}}{\end{titlelike}}
\newenvironment{dedication}{\begin{titlelike}{flushright}}{\end{titlelike}}
\def\thud@patchNoUc#1{
\thud@save{#1}
\@namedef{#1}{
\thud@save{MakeUppercase}
\let\MakeUppercase\@iden
\@nameuse{thud@save@#1}%
\thud@restore{MakeUppercase}
}
}
\def\thud@patchNoUcI#1{%
\thud@save{#1}
\@namedef{#1}##1{
\thud@save{MakeUppercase}
\let\MakeUppercase\@iden
\@nameuse{thud@save@#1}{##1}%
\thud@restore{MakeUppercase}
}
}
\thud@patchNoUc{tableofcontents}
\thud@patchNoUc{listoffigures}
\thud@patchNoUc{listoftables}
\thud@patchNoUc{theindex}
\thud@patchNoUcI{thebibliography}
\thud@save{@starttoc}
\def\@starttoc#1{\singlespacing\thud@save@@starttoc{#1}\thud@spacing}
\def\maketitle{
\begin{titlepage}%
\noindent%
\ifpdf\makebox[\z@][l]{\raisebox{-.98\textheight}[\z@][\z@]{\includegraphics[height=\textheight]{UdineLogo}}}\fi%
\begin{minipage}[t][\textheight][s]{.99\linewidth}%
\let\footnotesize\small
\let\footnoterule\relax
{\Large\textsc{\thud@universityA}}%
\ifx\thud@chair\@empty\else\par\medskip\chairname: \thud@chair\fi%
\vfill%
\begin{center}%
{\large\textsc{\thesisname\ifx\thud@phdnumber\@empty\else\space\thud@phdnumber\fi}\par}
\vskip 4em\relax%
{\huge\bfseries\@title\par}
\vskip 5em\@plus1fill\relax%
{\large%
\parbox[t]{.4\linewidth}{%
\let\thud@candidate\@author
\thud@showentry*{candidate}%
}%
\quad%
\parbox[t]{.4\linewidth}{%
\thud@showentry{supervisor}%
\thud@showentry{cosupervisor}%
\thud@showentry{tutor}%
\thud@showentry{reviewer}%
}%
}
\par\vskip 1em\@plus1fill\relax%
{\large\ifx\thud@cycle\@empty\datename\else\cyclename~\thud@cycle\ --- \shortdatename\fi~\@date}\par
\end{center}%
\end{minipage}%
\end{titlepage}
\thispagestyle{empty}%
\setcounter{footnote}{0}
{\parindent\z@\relax%
\textsc{\institutecontactsname}\\\thud@universityB\par%
\ifx\thud@contacts\@empty\else\vskip2em\relax\textsc{\authorcontactsname}\\\thud@contacts\par\fi%
\ifx\thud@rights\@empty\else\vfill\thud@rights\par\fi%
}%
\thud@spacing%
\let\thanks\relax\let\maketitle\relax
}
\AtBeginDocument{%
\pagestyle{sfbig}%
\frontmatter%
}