-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathhanyang-thesis.cls
264 lines (227 loc) · 9.48 KB
/
hanyang-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
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
% Hanyang University PhD thesis style
%
% NOTE. This is unofficial so you should always double check against the
% Registrar's office rules
%
% Original version is Stanford University PhD thesis style
% Modified by Jaemyoun Lee 21/Oct/2016
% modified for Hanyang University Thesis style
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{hanyang-thesis}[2016/10/21 v0.1 Hanyang University Thesis Class]
\LoadClass[10pt, oneside, letterpaper]{book}
% for doubles pacing
\RequirePackage{setspace}
\setstretch{1.6}
% for lowercase to uppercase i.e. {\sc All} -> ALL
\RequirePackage[small, md, sc]{titlesec}
% for chapter
\RequirePackage[palatino]{quotchap}
\definecolor{chaptergrey}{rgb}{0.6,0,0}
\let\defaultchapter\chapter
\def\chapter{\@ifstar{\defaultchapter*}{\nochapter}}
\newcommand{\nochapter}[1]{\setstretch{1}\defaultchapter{#1}\setstretch{2.0}}
% for font style
\RequirePackage{xltxtra,xunicode}
\RequirePackage{noto}
% for Korean
\RequirePackage{xeCJK}
\xeCJKsetup{CJKspace=true,CJKecglue={}}% ref. https://gist.github.com/dlimpid/5454229
\setCJKmainfont[Ligatures=TeX,BoldFont={NanumMyeongjoExtraBold.otf},AutoFakeSlant]{NanumMyeongjo.otf}
\setCJKsansfont[Ligatures=TeX,BoldFont={NanumMyeongjoExtraBold.otf},AutoFakeSlant]{NanumMyeongjo.otf}
\setCJKmonofont[Ligatures=TeX,BoldFont={NanumMyeongjoExtraBold.otf},AutoFakeSlant]{NanumMyeongjo.otf}
% for insertion of 'contents', 'list of tables/figures', and 'bibliography' into TOC
\RequirePackage{tocbibind}
% Quoation
\RequirePackage[palatino]{quotchap}
% Disallow page breaks at hyphens (this will give some underfull vbox's, so an alternative is to use \brokenpenalty=100 and manually search for and fix such page breaks)
\brokenpenalty=100 % ref. Stanford PhD Thesis Class
% Define hyphenation to break word by hyphen
\hyphenation{val-id-ated}
\hyphenation{pro-viders}
\hyphenation{dis-trib-ut-ed}
%%%%%
%%%%% SETUP MARGINS
%%%%%
\RequirePackage[b5j, top=32mm, bottom=32mm, left=22.5mm, right=22.5mm]{geometry}
% \RequirePackage[showframe, b5j, top=29.5mm, bottom=29.5mm, left=20mm, right=20mm]{geometry}
% \RequirePackage[a4paper, top=53mm, bottom=53mm, left=35mm, right=35mm]{geometry}
% \RequirePackage[showframe, a4paper, top=53mm, bottom=53mm, left=35mm, right=35mm]{geometry}
%%%%%
%%%%% SETUP COMMANDS PECULIAR TO THESES
%%%%%
\def\dept#1{\gdef\@dept{#1}}
\def\principaladviser#1{\gdef\@principaladviser{#1}}
\def\firstreader#1{\gdef\@firstreader{#1}}
\def\secondreader#1{\gdef\@secondreader{#1}}
\def\thirdreader#1{\gdef\@thirdreader{#1}}
\def\fourthreader#1{\gdef\@fourthreader{#1}}
\def\fifthreader#1{\gdef\@fifthreader{#1}}
\def\submitdate#1{\gdef\@submitdate{#1}}
\def\@submitdate{\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 \space \number\the\year}
\def\copyrightyear#1{\gdef\@copyrightyear{#1}}
\def\@copyrightyear{\number\the\year}
%%%%%
%%%%% PREFACE FORMS
%%%%%
%% The front and end space would be decrease approximately 5mm for according to Hanyang Thesis.
\newfontfamily\setFontToArnoPro[Path = fonts/,
Extension = .otf,
Mapping=tex-text,
Ligatures={Common},
SizeFeatures={%
{Size={-12},Font=*-Regular, Ligatures=Rare, Contextuals={Swash,Alternate}},
{Size={12-50}, Font=*-BoldSubhead, Ligatures=Rare, Contextuals={Swash,Alternate}}},
% {Size={12-50}, Font=*-RegularSubhead, Ligatures=Rare, Contextuals={Swash,Alternate}}},
BoldFont=ArnoPro-Bold
]{ArnoPro} %
\newfontfamily\setFontToArnoProRuglar[Path = fonts/,
Extension = .otf,
Mapping=tex-text,
Ligatures={Common},
SizeFeatures={%
{Size={-50},Font=*-Regular, Ligatures=Rare, Contextuals={Swash,Alternate}}}
]{ArnoPro} %
\renewcommand*{\sectfont}{\setFontToArnoProRuglar}
\def\titlep{
\thispagestyle{empty}
\begin{center}
\null
\setFontToArnoPro % change a font style
% \vspace{17.5mm} \LARGE\uppercase{Thesis For The Degree of Doctor of Philosophy} \\
\vspace{20mm} \LARGE\uppercase{Thesis For The Degree of Doctor of Philosophy} \\
\vspace{30mm} \huge\expandafter{\@title} \\
\vspace{\fill} \LARGE{\@author} \\
\vspace{35mm} \LARGE{Graduate School of Hanyang University} \\
\vspace{25mm} \LARGE{\@submitdate} \\
% \vspace{12.5mm} \null
\vspace{15mm} \null
\end{center}
\newpage}
\def\submitpage{
\thispagestyle{empty}
\begin{center}
\null
\setFontToArnoPro % change a font style
% \vspace{12.5mm} \LARGE\uppercase{Thesis For The Degree of Doctor of Philosophy} \\
\vspace{15mm} \LARGE\uppercase{Thesis For The Degree of Doctor of Philosophy} \\
\vspace{20mm} \huge{\@title} \\
\vspace{\fill} \LARGE{Thesis Supervisor: \@principaladviser} \\
\vspace{15mm} \hspace{15mm} \LARGE{A Thesis submitted to the graduate school of \\ Hanyang University in partial fulfillment of the requirements \\ for the degree of Doctor of Philosophy} \\
\vspace{30mm} \LARGE{\@author} \\
\vspace{10mm} \LARGE{\@submitdate} \\
\vspace{10mm} \LARGE{Department of \@dept} \\
\vspace{\z@} \LARGE{Graduate School of Hanyang University}
% \vspace{7.5mm} \null
\vspace{10mm} \null
\end{center}
\newpage}
\newfontfamily\fontToArnoProDisplay[Path = fonts/,
Extension = .otf, Mapping=tex-text,
Ligatures={Common},
LetterSpace=-4,
SizeFeatures={{Size={-50},Font=*-RegularDisplay, Ligatures=Rare, Contextuals={Swash,Alternate}}},
BoldFont=ArnoPro-BoldDisplay
]{ArnoPro}
\def\approvalpage{
\thispagestyle{empty}
\begin{center}
\null
\setFontToArnoPro % change a font style
% \vspace{22.5mm} \LARGE{This thesis, written by \@author, \\ has been approved as a thesis for the Doctor of Philosophy.} \\
\vspace{25mm} \LARGE{This thesis, written by \@author, \\ has been approved as a thesis for the Doctor of Philosophy.} \\
\vspace{30mm} \LARGE{\@submitdate} \\
\vspace{25mm}
\begin{tabular}{lr}
\fontToArnoProDisplay{\textbf{\LARGE{Committee Chairman:}}} & \LARGE{\underline{\makebox[45mm][r]{\@firstreader}} \hspace{3mm}\fontToArnoProDisplay{(Signature)}} \\ \\
\fontToArnoProDisplay{\textbf{\LARGE{Committee Member:}}} & \LARGE{\underline{\makebox[45mm][r]{\@secondreader}} \hspace{3mm}\fontToArnoProDisplay{(Signature)}} \\ \\
\fontToArnoProDisplay{\textbf{\LARGE{Committee Member:}}} & \LARGE{\underline{\makebox[45mm][r]{\@thirdreader}} \hspace{3mm}\fontToArnoProDisplay{(Signature)}} \\ \\
\fontToArnoProDisplay{\textbf{\LARGE{Committee Member:}}} & \LARGE{\underline{\makebox[45mm][r]{\@fourthreader}} \hspace{3mm}\fontToArnoProDisplay{(Signature)}} \\ \\
\fontToArnoProDisplay{\textbf{\LARGE{Committee Member:}}} & \LARGE{\underline{\makebox[45mm][r]{\@fifthreader}} \hspace{3mm}\fontToArnoProDisplay{(Signature)}} \\
\end{tabular} \\
\vspace{\fill} \LARGE{Graduate School of Hanyang University} \\
% \vspace{17.5mm} \null
\vspace{20mm} \null
\end{center}
\newpage}
\def\copyrightpage{
\newpage
\thispagestyle{empty}
\setFontToArnoPro % change a font style
\vspace*{\fill}
\noindent \copyright~\textit{\@copyrightyear~\textendash\hspace{3pt}~\textbf{\@author}} \\
\noindent \textsc{All rights reserved.} \\
\vspace*{\fill}
\newpage}
\def\abstractpage{
\chapter*{Abstract}
\begin{center}
\large{\@title}
\end{center}
\vspace{1mm}
\begin{flushright}
\@author \\
Department of \@dept \\
The Graduate School \\
Hanyang University \\
\end{flushright}
\addcontentsline{toc}{chapter}{Abstract}
\input{chapter/abstracteng}
\vspace*{\fill}\newpage}
\def\beforepreface{
\pagestyle{plain}
\newgeometry{top=0mm, bottom=0mm, left=0mm, right=0mm} % To change the margin
% \newgeometry{showframe, top=21mm, bottom=21mm, left=12.5mm, right=12.5mm} % To change the margin
\setstretch{1}
\titlep
\submitpage
\approvalpage
\restoregeometry % To restore the margin
\copyrightpage
\rm % change a font style
\pagenumbering{roman}
\setstretch{1.6}
\tableofcontents\newpage
% \addcontentsline{toc}{chapter}{\listtablename}
\listoftables\newpage
% \addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures\newpage
\setstretch{1.3}
\abstractpage\newpage
\pagenumbering{arabic}
}
\def\abstractpagekor{
\chapter*{국문요지}
\addcontentsline{toc}{chapter}{\textbf{국문요지}}
\input{chapter/abstractkor}
\vspace*{\fill}\newpage}
\def\acknowledgments{
\chapter*{Acknowledgments}
\addcontentsline{toc}{chapter}{Acknowledgments}
\input{chapter/acknowledgments}
\vspace*{\fill}\newpage}
\def\afterpreface{
\abstractpagekor\newpage
\acknowledgments\newpage
}
% Redefine \thebibliography to go to a new page and put an entry in the
% table of contents
\renewcommand\bibname{References}
\let\@ldthebibliography\thebibliography
\renewcommand{\thebibliography}[1]{
\newpage
\@ldthebibliography{#1}}%
% redefine \@endpart so the blank page after part has a page number
\def\@endpart{
\vfil\newpage
\if@twoside
\if@openright
\null
\thispagestyle{plain}%
\newpage
\fi
\fi
\if@tempswa
\twocolumn
\fi}
% Start out normal
\pagestyle{headings}