-
Notifications
You must be signed in to change notification settings - Fork 0
/
thesis_master.cls
292 lines (264 loc) · 8.32 KB
/
thesis_master.cls
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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
%%%%%%
% Template for typesetting Diploma Theses
%%%%%%
% Class Information
\def\filename{thesis_master}
\def\fileversion{1.0}
\def\filedate{2017/05/20}
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesClass{thesis_master}[%
\filedate\space\fileversion\space LaTeX document class.]
% Required Packages
\RequirePackage{ifthen}
\RequirePackage{graphicx}
\RequirePackage{amsmath}
\RequirePackage{fancyhdr}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
\ProcessOptions
\LoadClass[a4paper,12pt]{book}
\usepackage[greek]{babel}
\usepackage[utf8]{inputenc}
\pagestyle{fancy}
% Title Page and Front Matter
\def\@supervisor{} \def\supervisor#1{\gdef\@supervisor{#1}}
\def\@epitropiF{} \def\epitropiF#1{\gdef\@epitropiF{#1}}
\def\@epitropiS{} \def\epitropiS#1{\gdef\@epitropiS{#1}}
\def\@subtitle{} \def\subtitle#1{\gdef\@subtitle{#1}}
\def\@translator{} \def\translator#1{\gdef\@translator{#1}}
\def\@institution{} \def\institution#1{\gdef\@institution{#1}}
\def\@department{} \def\department#1{\gdef\@department{#1}}
\def\@division{} \def\division#1{\gdef\@division{#1}}
\def\@lab{} \def\lab#1{\gdef\@lab{#1}}
\def\@other{} \def\other#1{\gdef\@other{#1}}
\def\@dedication{} \def\dedication#1{\def\@dedication{#1}}
\def\@uppertitleback{} \long\def\uppertitleback#1{\def\@uppertitleback{#1}}
\def\@middletitleback{} \long\def\middletitleback#1{\def\@middletitleback{#1}}
\def\@lowertitleback{} \long\def\lowertitleback#1{\def\@lowertitleback{#1}}
\def\@approval{} \long\def\approval#1{\def\@approval{#1}}
\def\@mysig{} \long\def\mysig#1{\def\@mysig{#1}}
\def\url#1{\gdef\@url{\texttt{#1}}}
\def\TRnumber#1{\gdef\@TRnumber{#1}}
\def\@trurl{} \def\trurl#1{\gdef\@trurl{\texttt{#1}}}
\def\@trftp{} \def\trftp#1{\gdef\@trftp{\texttt{#1}}}
\def\new@tpage{\newpage\thispagestyle{empty}\null}
% Measurements
\setlength{\oddsidemargin}{7mm}
\setlength{\evensidemargin}{0mm}
\setlength{\textwidth}{150mm}
\setlength{\topmargin}{0mm}
\setlength{\textheight}{235mm}
\advance \topmargin by -\headheight
\advance \topmargin by -\headsep
% Maketitle
\renewcommand{\maketitle}{
\begin{titlepage}
\let\footnotesize\small
\let\footnoterule\relax
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\new@tpage
\begin{center}
\begin{minipage}{2.5cm}
\includegraphics[width=2.5cm]{figures/auth-seal.eps}
\vspace{5pt}
\end{minipage}
\begin{minipage}{15cm}
\begin{center}
\textsc{
\Large{\@institution} \\
\large{\@department \\
\@division \\
%\@other
}}
\end{center}
\end{minipage}
%\hfill %\hspace{0.5cm}
%
\vfill
%
%
\begin{center}
\LARGE \bfseries \@title
\end{center}
\ifx\@subtitle\@empty\else
\begin{center}
\LARGE \@subtitle
\end{center}
\fi
%
\vspace{5mm}
%
\begin{center}
\huge{\textsc{\@translator}}\\
\vspace{3mm}
\normalsize{\toutis}\\
\vspace{3mm}
\large{\textbf{\authorNameCapital}}
\end{center}
%
\vspace{5mm}
%
\hspace{1mm}
\end{center}
\vfill
\begin{minipage}{15cm}
\begin{tabbing}
\large \textbf{\supervisorname :} \=\@supervisor\\
\>\supervisorTitle
\end{tabbing}
\end{minipage}
\vspace{1mm}
%
\vfill
%
\begin{center}
\textsc{\@lab}\\
\thesisPlaceDate
\end{center}
%
\cleardoublepage
\end{titlepage}
%
\renewcommand{\thefootnote}{\arabic{footnote}}
\setcounter{footnote}{0}
%
\gdef\@thanks{}\gdef\@author{}\gdef\@translator{}\gdef\@institution{}
\gdef\@department{}\gdef\@division{}\gdef\@lab{}\gdef\@other{}
\gdef\@uppertitleback{}\gdef\@lowertitleback{}\gdef\@dedication{}%
\gdef\@title{}\gdef\@subtitle{}\let\maketitle\relax%
}
% Names
\newcommand{\keywordsname}{Λέξεις Κλειδιά}
\newcommand{\keywordsnameeng}{\en{Keywords}}
\newcommand{\abstractname}{Περίληψη}
\newcommand{\abstractnameeng}{\en{Abstract}}
\newcommand{\draftname}{Προσχέδιο}
\newcommand{\prefacename}{Πρόλογος}
\newcommand{\acknowledgementsname}{Ευχαριστίες}
\newcommand{\supervisorname}{\supervisorMaleFemale}
\newcommand{\pagesname}{Σελίδες}
\newcommand{\urlname}{\en{URL}}
\newcommand{\ftpname}{\en{FTP}}
% More Names
\translator{Διπλωματική Εργασία}
\institution{Αριστοτέλειο Πανεπιστήμιο Θεσσαλονίκης}
\department{Πολυτεχνική Σχολή}
\division{Τμήμα Ηλεκτρολόγων Μηχανικών και Μηχανικών Η/Υ}
\other{Σωκράτους 6, Τ.Κ. 54635, Θεσσαλονίκη}
\uppertitleback{
\begin{minipage}{2cm}
\includegraphics[width=2cm]{figures/auth-seal.eps}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}{12cm}
\@institution \\
\@department \\
\@division
\end{minipage}
}
% Redefining Commands
\renewcommand{\frontmatter}{
\cleardoublepage
\@mainmatterfalse \pagenumbering{roman}
}
\renewcommand{\mainmatter}{
\label{lastfront}
\cleardoublepage
\@mainmattertrue\pagenumbering{arabic}
\addtocontents{toc}{\protect\addvspace{1em}}
}
\renewcommand{\backmatter}{
\if@openright\cleardoublepage\else\clearpage\fi
\@mainmatterfalse
}
% Headings
\def\invisiblethingie{\tiny\ }
\def\myemptypage{
\mbox{}
\vspace{\fill}
\begin{flushright}
\invisiblethingie
\end{flushright}
\vspace{5ex}
\thispagestyle{empty}
}
%
\renewcommand{\cleardoublepage}{
\clearpage %
\if@twoside \ifodd\c@page\else
\myemptypage
\newpage
\if@twocolumn\mbox{}\newpage\fi\fi\fi
}
%
\renewcommand{\chaptermark}[1]{
\markboth{\mbox{\selectlanguage{greek}\@chapapp}\ \thechapter.\ \ #1}{}
% \markboth{\mbox{\@chapapp}\ \thechapter.\ \ #1}{}
}
\renewcommand{\sectionmark}[1]{
\markright{\thesection\ \ #1}{}
}
%
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[LO]{\slshape\nouppercase{{\rightmark}}}
\fancyhead[RE]{\slshape\nouppercase{{\leftmark}}}
\addtolength{\headheight}{2pt}
\setlength{\headwidth}{\textwidth}
\addtolength{\topmargin}{-2pt}
%
\let\finik@tocont\tableofcontents
\renewcommand{\tableofcontents}{
\finik@tocont
\addcontentsline{toc}{chapter}{\contentsname}
}
\let\finik@lof\listoffigures
\renewcommand{\listoffigures}{
\finik@lof
\addcontentsline{toc}{chapter}{\selectlanguage{greek}\listfigurename}
}
\let\finik@lot\listoftables
\renewcommand{\listoftables}{
\finik@lot
\addcontentsline{toc}{chapter}{\listtablename}
}
% More Enviroments
\newenvironment{keywords}{\section*{\keywordsname}}{}
\newenvironment{keywordseng}{\section*{\keywordsnameeng}}{}
\newcommand{\footacknowledgement}[1]{%
\let\@tmp@makefntext\@makefntext%
\long\def\@makefntext##1{%
\parindent 1em%
\noindent##1}%
\footnotetext{#1}%
\let\@makefntext\@tmp@makefntext%
}
\newenvironment{acknowledgements}{%
\chapter*{\acknowledgementsname}%
\addcontentsline{toc}{chapter}{\acknowledgementsname}%
}{}
\def\abstract{%
\chapter*{\abstractname\@mkboth{\abstractname}{\abstractname}}
\addcontentsline{toc}{chapter}{\abstractname}
}
\def\abstracteng{
\chapter*{\abstractnameeng\@mkboth{\abstractnameeng}{\abstractnameeng}}
\addcontentsline{toc}{chapter}{\abstractnameeng}
}
\def\endabstract{\par\vfil\null\endtitlepage}
%
\let\finik@bibl\bibliography%#1
% Misc
\AtEndDocument{\subparagraph{}\label{lastback}}
%% Dedication
\newcommand{\thesisDedication}[1]{%
\cleardoublepage
\thispagestyle{empty}
~\\
\vfill
\begin{flushright}
\textit{#1}
\end{flushright}
~\\
\vfill
\pagebreak
}