-
Notifications
You must be signed in to change notification settings - Fork 25
/
ctuth-templates.tex
230 lines (212 loc) · 6.49 KB
/
ctuth-templates.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
%!TEX ROOT = ctutest.tex
\ProvidesExplFile{ctuth-templates.tex}%
{2016/06/15}{0.1 t1606152353}%MY TIMESTAMP HERE {0.1}
{"Templates"\space part\space of\space the\space class\space ctuthesis}
% The titlepage, includes doctype, faculty, department, title, author,
% and some auxiliary information at the bottom
\ctutemplateset{titlepage}{
\thispagestyle { empty }
\noindent
\vbox to \textheight{%
% The titlepage goes all way up to the header (taking one \baselineskip of the head)
\vspace*{\dimexpr-\baselineskip-\headsep}
\vss%
{\noindent\leavevmode\color{ctubluerule}\vrule width 11pt\hspace*{11pt}}
% The main vbox of the titlepage is larger by (bls + heasep) up and (footskip) down
\vbox to \dimexpr\textheight + \baselineskip + \headsep + \footskip{
% Reduce hsize by the rule width and the sep
\hsize\dimexpr\linewidth-17pt
% No justification, sf bf font
\raggedright \sffamily \bfseries
\selectctulanguage{title}
%
% The document type
{\ctufield[title]{doctype}\par}
%
\vspace*{3ex}
%
% A table containing: the CTU logo and name, faculty number, faculty and deparment name
\begin{tabular}{@{}l@{\hspace*{1em}}l@{}}
\Large\includegraphics[height=\dimexpr4\normalbaselineskip-1ex]{ctu_logo_black}
&
\Large\color{ctubluetext}\begin{tabular}[b]{@{}l@{}}\ctufield[title]{university-endl}\end{tabular}
\\[3ex]
% \begin{tabular}[c]{@{}l@{}}
\raisebox{-8pt}{
\color{ctubluetext}\fontsize{32.7}{32.7}\selectfont
\setbox0\hbox{\smash{\ctufield{facultynum}}\vphantom{X}}
\ifdim\wd0>2em \scalebox{0.9}[1]{\textls[-50]{\smash{\ctufield{facultynum}}\vphantom{X}}}\else\box0\fi
}
% \end{tabular}
&
\begin{tabular}[c]{@{}l@{}}\rlap{\ctufield[title]{faculty}}\\[2pt]\ctufield[title]{department}\end{tabular}
\end{tabular}\par
%
\vspace{8ex plus 1fill}
%
% The title, in two languages
{\LARGE\color{ctubluetext}
\ctufield[title]{title}
\par}
%
\vspace{3ex}
%
{\Large\color{ctubluetext}
\ctufield[title]{subtitle}
\par}
%
\vspace*{8ex}
%
% The author
{\Large
\ctufield{author}
\par}
%
\vspace{0pt plus 3fill}
{
% The "metadata": supervisor, field of study, month and year
\parskip 1pt
\ctuiffield*{supervisor}{\supervisorname :~{\frenchspacing\ctufield{supervisor}}\par}{}
\ctuiffield*{supervisor-specialist}{\supervisorspecialistname :~{\frenchspacing\ctufield{supervisor-specialist}}\par}{}
\ctuiffield*[title]{fieldofstudy}{\fieldofstudyname :~\ctufield[title]{fieldofstudy}\par}{}
\ctuiffield*[title]{subfieldofstudy}{\subfieldofstudyname :~\ctufield[title]{subfieldofstudy}\par}{}
\monthinlanguage*{title}~\ctufield{year}\par
}
}
\vss
% The titlepage goes all way down to the foot
\vspace*{-\footskip}
}
\par
}
% This include the specification file, and does nothing more
\ctutemplateset{include.specification}{
\includepdf[pages=-]{\tl_use:c{ g_ctuthesis_field_specification-file_tl }}
}
% Includes the specification as a chapter
\ctutemplateset{specification.as.chapter}{
\cleardoublepage
% If it is an appendix, it gets a number, if not, it does not
\ifctu@app
\refstepcounter{chapter}
\phantomsection
\addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}\specificationname}
\else
\phantomsection
\addcontentsline{toc}{chapter}{\specificationname}
\fi
\ctutemplate{include.specification}
}
\ctutemplateset{twocolumn.abstract.in.titlelanguage}{
\selectctulanguage{title}
\chapter{\abstractname}\noindent
\ctufield[title]{abstract}\par
{ \raggedright
\paragraph{\keywordsname :}
\ctufield[title]{keywords}
\paragraph{\supervisorname :}
\ctuiffield*{supervisor}{
\ctufield{supervisor}
\ctuiffield*{supervisor-address}{
\\
\ctufield{supervisor-address}
}{}
}{}
\par }
}
\ctutemplateset{twocolumn.abstract.in.secondlanguage}{
\selectctulanguage{second}
\chapter{\abstractname}\noindent
\ctufield[second]{abstract}\par
{ \raggedright
\paragraph{\keywordsname :}
\ctufield[second]{keywords}
\paragraph{\titletranslationname :}
\ctufield[second]{title}
\ctuiffield*[second]{subtitle}{
\ --- \ \ctufield[second]{subtitle}
} { }
\par }
}
\ctutemplateset{twocolumn.tableofcontents}{
\selectctulanguage{main}
\tableofcontents
}
\ctutemplateset{twocolumn.thanks}{
\selectctulanguage{title}
\chapter{\thanksname}\noindent
\ctufield{thanks}
}
\ctutemplateset{twocolumn.declaration}{
\selectctulanguage{title}
\chapter{\declarationname}\noindent
\ctufield{declaration}
}
\ctutemplateset{twocolumn.listoffigures}{
\selectctulanguage{main}
\listoffigures
}
\ctutemplateset{twocolumn.listoftables}{
\selectctulanguage{main}
\listoftables
}
% Abstract template includes the Acknowledgements, Declaration and two Abstracts
% the abstracts are accompanied by the keywords and possibly other information
\ctutemplateset{maketitle.twocolumn.default}{
\begin{twocolumnfrontmatterpage}
\ctutemplate{twocolumn.thanks}
\newpage
\ctutemplate{twocolumn.declaration}
\clearpage
\ctutemplate{twocolumn.abstract.in.titlelanguage}
\newpage
\ctutemplate{twocolumn.abstract.in.secondlanguage}
\clearpage
\ctutemplate{twocolumn.tableofcontents}
% The "loft" template is included only if at least one of the lists is enabled
\bool_if:nTF {
\ctuthesis_if_switch_p:n { front-list-of-figures }
|| \ctuthesis_if_switch_p:n { front-list-of-tables }
} {
\clearpage
\ctutemplate{twocolumn.loft}
} { }
\end{twocolumnfrontmatterpage}
}
% Lists of Figures and Tables
\ctutemplateset{twocolumn.loft}{
\ctuifswitch { front-list-of-figures } { \ctutemplate{twocolumn.listoffigures} } { }
\newpage
\ctuifswitch { front-list-of-tables } { \ctutemplate{twocolumn.listoftables} } { }
}
% The maketitle command (moreorless): roman page numbering
\ctutemplateset{maketitle}{
\frontmatter
% Start with the titlepage
\ctutemplate{titlepage}
% title verso is empty (the star makes it completely empty in our template)
\cleardoublepage*
% If the specification has to be in front, include it. It it's one page only,
% the verso is left empty
\ctuifswitch{front-specification}{
\ctutemplate{include.specification}
\cleardoublepage*
} { }
% The abstract and alike
\ctutemplate{maketitle.twocolumn.default}
\def\thepage{}
% Start the mainmatter
\mainmatter
}
% Minor change to \mainmatter: we add the star to \cleardoublepage
\DeclareDocumentCommand \mainmatter { } {
\cleardoublepage*
\@mainmattertrue
\pagenumbering{arabic}
\pagestyle{headings}
}
% \maketitle command itself just calls the maketitle template
\DeclareDocumentCommand \maketitle { } {
\ctutemplate{maketitle}
}
\endinput