forked from hoang-himself/hcmut-thesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hcmut-thesis.cls
195 lines (154 loc) · 4.37 KB
/
hcmut-thesis.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{hcmut-thesis}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
\ProcessOptions\relax
\LoadClass[12pt,a4paper]{memoir}
\RequirePackage[utf8]{vntex,inputenc}
\RequirePackage{anyfontsize,mathptmx}
\RequirePackage[T5]{fontenc}
\RequirePackage{geometry,graphicx,indentfirst,setspace}
\RequirePackage{tikz}
\RequirePackage[center]{caption}
\RequirePackage{fancyhdr,hyperref}
\RequirePackage[super,square,sort]{natbib}
% Change to [english,vietnamese] to use Vietnamese labels
\RequirePackage[english]{babel}
% Custom commands
\newcommand{\Month}{
\ifcase \the\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
}
\newcommand{\@upperuniname}{Vietnam National University Ho Chi Minh City}
\newcommand{\@uniname}{Ho Chi Minh City University of Technology}
\newcommand{\@deptname}{Faculty of Computer Science and Engineering}
\newcommand{\deptname}[1]{\renewcommand{\@deptname}{#1}}
\newcommand{\@reporttype}{Graduation Thesis}
\newcommand{\reporttype}[1]{\renewcommand{\@reporttype}{#1}}
\newcommand{\@stumajor}{Computer Science}
\newcommand{\stumajor}[1]{\renewcommand{\@stumajor}{#1}}
\renewcommand{\@title}{Report title}
\newcommand{\@defcouncil}{Council}
\newcommand{\defcouncil}[1]{\renewcommand{\@defcouncil}{#1}}
\newcommand{\@supervisor}{Supervisor}
\newcommand{\supervisor}[1]{\renewcommand{\@supervisor}{#1}}
\newcommand{\@secretary}{Secretary}
\newcommand{\secretary}[1]{\renewcommand{\@secretary}{#1}}
\newcommand{\@reviewer}{Reviewer}
\newcommand{\reviewer}[1]{\renewcommand{\@reviewer}{#1}}
\newcommand{\@stuname}{STUDENT:\ H (xxxxxxx)}
\newcommand{\stuname}[1]{\renewcommand{\@stuname}{#1}}
\newcommand{\@reportplace}{Ho Chi Minh City}
\newcommand{\reportplace}[1]{\renewcommand{\@reportplace}{#1}}
\newcommand{\@reporttime}{\Month \the\year}
\newcommand{\reporttime}[1]{\renewcommand{\@reporttime}{#1}}
% Configurations
\usetikzlibrary{calc}
\geometry{
paper=a4paper,
left=3cm,
right=2cm,
vmargin=2cm,
includeheadfoot=true,
headheight=30pt
}
\renewcommand{\large}{\fontsize{15}{15}\selectfont}
\renewcommand{\Large}{\fontsize{20}{20}\selectfont}
\OnehalfSpacing
\raggedbottom
\renewcommand{\arraystretch}{1.2}
% Set depth of numbering for sections and table of contents
\setsecnumdepth{subsection}
\settocdepth{subsection}
% Set numwidths (see Section 9)
\setlength{\cfttablenumwidth}{3em}
\setlength{\cftfigurenumwidth}{3em}
\AtBeginDocument{\renewcommand*\bibname{References}}
\hypersetup{
colorlinks=true,
linkcolor=black,
citecolor=red,
urlcolor=blue
}
\renewcommand{\headrulewidth}{0.3pt}
\renewcommand{\footrulewidth}{0pt}
\pagestyle{fancy}
\fancyhf{}
\if@twoside
\fancyhead[EL,OR]{\bfseries\nouppercase\rightmark}
\else
\fancyhead[R]{\bfseries\nouppercase\rightmark}
\fi
\fancyfoot[C]{\thepage}
% Custom pages and sections
\def\coverpage{
\pagestyle{empty}
\large\bfseries
\begin{tikzpicture}[remember picture,overlay]
\draw[line width=3pt](
$(current page.north west) + (3.0cm,-2.0cm)$
) rectangle (
$(current page.south east) + (-2.0cm,2.0cm)$
);
\draw[line width=1pt](
$(current page.north west) + (2.9cm,-1.9cm)$
) rectangle (
$(current page.south east) + (-1.9cm,1.9cm)$
);
\end{tikzpicture}
\vspace*{-3\baselineskip}
\begin{center}
\MakeUppercase{\@upperuniname}
\MakeUppercase{\@uniname}
\MakeUppercase{\@deptname}
\vfill
\includegraphics[scale=0.4]{graphics/hcmut.png}
\vfill
\MakeUppercase{\@reporttype}
\vfill
{\Large\MakeUppercase{\parbox[c]{0.8\linewidth}{\centering\@title}}}
\vfill
{\mdseries Major: \@stumajor}
\end{center}
\vfill
\hfill\parbox[t]{13cm}{
THESIS COMMITTEE: \@defcouncil
SUPERVISOR(s): \parbox[t]{7cm}{\@supervisor}
%MEMBER SECRETARY: \@secretary
REVIEWER: \@reviewer
\hspace*{3cm} ---o0o---
\@stuname
}
\vfill
\mdseries
\begin{center}
\MakeUppercase{\@reportplace, \@reporttime}
\end{center}
\normalsize
\cleardoublepage%
\pagestyle{fancy}
}
\providecommand{\phantomsection}{}
\newenvironment{preface}[1]{
\cleardoublepage%
\vspace*{\stretch{2}}
\thispagestyle{plain}
{\noindent \bfseries \Huge #1}%
\phantomsection\addcontentsline{toc}{chapter}{#1}
\begin{center}
\end{center}
}{
\vspace*{\stretch{5}}
\cleardoublepage%
}