forked from yylou/ntu-thesis-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThesisStyle.sty
228 lines (181 loc) · 7 KB
/
ThesisStyle.sty
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
% author: Tz-Huan Huang [http://www.csie.ntu.edu.tw/~tzhuan]
% ----------------------------------------------------------------------------
% "THE CHOCOLATE-WARE LICENSE":
% Tz-Huan Huang wrote this file. As long as you retain this notice you
% can do whatever you want with this stuff. If we meet some day, and you think
% this stuff is worth it, you can buy me a chocolate in return Tz-Huan Huang
% ----------------------------------------------------------------------------
%Revised by Tzu-Han Chang
\RequirePackage{array}
\RequirePackage{graphicx}
\RequirePackage[top=3cm,left=3cm,bottom=2cm,right=3cm]{geometry}
\RequirePackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\RequirePackage[AutoFakeBold,AutoFakeSlant]{xeCJK}
\RequirePackage{CJKfntef}
\setmainfont{Times New Roman} % Default main font
\setromanfont{Times New Roman} % Default roman font
\setCJKmainfont{AR PL KaitiM Big5} % Default CJK
\setCJKfamilyfont{kaiv}[Vertical=RotatedGlyphs]{AR PL KaitiM Big5}
%\setCJKfamilyfont{kaiv}{BiauKai:script=hani:language=ZHT:vertical:+vert}
\setmonofont{Courier New} % 等寬字型
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt
\newcommand\universityCH[1]{\newcommand{\theuniversityCH}{#1}}
\newcommand\collageCH[1]{\newcommand{\thecollageCH}{#1}}
\newcommand\instituteCH[1]{\newcommand{\theinstituteCH}{#1}}
\newcommand\degreeCH[1]{\newcommand{\thedegreeCH}{#1}}
\newcommand\degreeEN[1]{\newcommand{\thedegreeEN}{#1}}
\newcommand\thesisCH[1]{\newcommand{\thethesisCH}{#1}}
\newcommand\instituteEN[1]{\newcommand{\theinstituteEN}{#1}}
\newcommand\collageEN[1]{\newcommand{\thecollageEN}{#1}}
\newcommand\universityEN[1]{\newcommand{\theuniversityEN}{#1}}
\newcommand\thesisEN[1]{\newcommand{\thethesisEN}{#1}}
\newcommand\titleCH[1]{\newcommand{\thetitleCH}{#1}}
\newcommand\titleEN[1]{\newcommand{\thetitleEN}{#1}}
\newcommand\authorCH[1]{\newcommand{\theauthorCH}{#1}}
\newcommand\authorEN[1]{\newcommand{\theauthorEN}{#1}}
\newcommand\advisorCH[1]{\newcommand{\theadvisorCH}{#1}}
\newcommand\advisorEN[1]{\newcommand{\theadvisorEN}{#1}}
\newcommand\advisortitleCH[1]{\newcommand{\theadvisortitleCH}{#1}}
\newcommand\advisortitleEN[1]{\newcommand{\theadvisortitleEN}{#1}}
\newcommand\yearCH[1]{\newcommand{\theyearCH}{#1}}
\newcommand\yearEN[1]{\newcommand{\theyearEN}{#1}}
\newcommand\monthCH[1]{\newcommand{\themonthCH}{#1}}
\newcommand\monthEN[1]{\newcommand{\themonthEN}{#1}}
\newcommand\dateCH[1]{\newcommand{\thedateCH}{#1}}
\newcommand\datetitleCH[1]{\newcommand{\thedatetitleCH}{#1}}
\newcommand\yeartitleCH[1]{\newcommand{\theyeartitleCH}{#1}}
\newcommand\monthtitleCH[1]{\newcommand{\themonthtitleCH}{#1}}
\newcommand\writtenCH[1]{\newcommand{\thewrittenCH}{#1}}
\newcommand\abstractnameEN[1]{\newcommand{\theabstractnameEN}{#1}}
\newcommand\abstractnameCH[1]{\newcommand{\theabstractnameCH}{#1}}
\newcommand\studentID[1]{\newcommand{\thestudentID}{#1}}
\newcommand\acknowledgementsnameEN[1]{\newcommand{\theacknowledgementsnameEN}{#1}}
\newcommand\acknowledgementsnameCH[1]{\newcommand{\theacknowledgementsnameCH}{#1}}
% Command to generate the title page.
\renewcommand{\maketitle}{ {
\begin{titlepage}
\begin{center}
\fontsize{18}{27}\selectfont
\vspace{1cm}
\theuniversityCH\thecollageCH\theinstituteCH\\
\thethesisCH
\fontsize{14}{21}\selectfont
\theinstituteEN\\
\thecollageEN\\
\fontsize{16}{24}\selectfont
\theuniversityEN\\
\thethesisEN
\vspace{2cm}
\parbox[c][150pt][c]{\textwidth}{
\centering
\thetitleCH\\
\thetitleEN
}
\vspace{4cm}
\theauthorCH\\
\theauthorEN
\vspace{1.5cm}
\theadvisortitleCH\theadvisorCH\\
\theadvisortitleEN{} \theadvisorEN
\vspace{1.5cm}
\thedatetitleCH{}
\raisebox{1pt}{\theyearCH} \theyeartitleCH{}
\raisebox{1pt}{\themonthCH} \themonthtitleCH\\
\themonthEN{\quad} \theyearEN
\end{center}
\end{titlepage}
} }
\def\CJKmovesymbol#1{\raise.35em\hbox{#1}}
\def\CJKmove{\let\CJKsymbol\CJKmovesymbol
\let\CJKpunctsymbol\CJKsymbol}
\newenvironment{kaivmove}
{\CJKfamily{kaiv}\CJKmove{}}
{\CJKmove\CJKfamily{kaiv}{}}
\newcommand{\makeside}{ {
\fontsize{12}{12}\selectfont
\noindent\rotatebox{-90}{
\begin{tabular}{%
m{3.5cm}m{0.1cm}m{2cm}m{0.1cm}m{10cm}m{1cm}m{3cm}m{0.1cm}m{1.5cm}}
\fontsize{12}{12}\selectfont\begin{CJKfilltwosides}{3cm}\CJKfamily{kaiv}\CJKmove{\theuniversityCH}\\
\CJKfamily{kaiv}\CJKmove{\theinstituteCH}\end{CJKfilltwosides} & &
\CJKfamily{kaiv}\CJKmove{\thethesisCH} & &
{\fontsize{14}{14}\selectfont\CJKfamily{kaiv}\CJKmove{\thetitleCH}} & &
{\fontsize{14}{14}\CJKfamily{kaiv}\CJKmove{\theauthorCH{\quad} \thewrittenCH}} & &
\rotatebox{90}{\hspace{-0.25em}\theyearCH} \rotatebox{90}{\hspace{0.25em}\themonthCH}
\end{tabular}
}
\thispagestyle{empty}
\newpage
} }
% Command to generate the certification page
\newcommand{\makecertification}{ {
\thispagestyle{empty}
\addcontentsline{toc}{chapter}{口試委員會審定書}
\begin{center}
\fontsize{24}{36}\selectfont
\theuniversityCH\thedegreeCH 學位論文\\
口試委員會審定書
\vspace{0.5cm}
\fontsize{20}{30}\selectfont\thetitleCH\\
\thetitleEN
\end{center}
\vspace{1cm}
\fontsize{16}{12}\selectfont
本論文係\theauthorCH{}君 \raisebox{1pt}{(\thestudentID)}
在\theuniversityCH\theinstituteCH 完成之\thedegreeCH 學位論文,於民國
\raisebox{1pt}{\theyearCH} 年
\raisebox{1pt}{\themonthCH} 月
\raisebox{1pt}{\thedateCH} 日承下列考試委員審查通過及口試及格,特此證明
\fontsize{14}{18}\selectfont
\vspace{1.5cm}\\
\fontsize{16}{12}\selectfont
\noindent
口試委員:
{\centering
\fontsize{16}{25}\selectfont
\hspace{84pt} \underline{\hspace{18.15em}(簽名)}
(指導教授)
\hspace{84pt} \underline{\hspace{8.825em}} \hspace{2.5em} \underline{\hspace{8.825em}}
\vspace{30pt}
\hspace{84pt} \underline{\hspace{8.825em}} \hspace{2.5em} \underline{\hspace{8.825em}}
\vspace{30pt}
\hspace{84pt} \underline{\hspace{8.825em}} \hspace{2.5em} \underline{\hspace{8.825em}}
\vspace{30pt}
\hspace{84pt} \underline{\hspace{8.825em}} \hspace{2.5em} \underline{\hspace{8.825em}}
\vspace{30pt}
}
\fontsize{14}{25}\selectfont
\noindent
系主任、所長 \fontsize{16}{25}\selectfont\underline{\hspace{13em} (簽名)}
\vspace*{20pt}
\newpage
} }
% Environment to generate the english abstract page.
\newenvironment{Abstract_E} % {{{
{\chapter*{\centerline{\theabstractnameEN}}%
\addcontentsline{toc}{chapter}{\theabstractnameEN}%
\quotation}
{\endquotation\newpage} % }}}
% Environment to generate the chinese abstract page.
\newenvironment{Abstract_C} % {{{
{ %
\chapter*{\centerline{\theabstractnameCH}}%
\addcontentsline{toc}{chapter}{\theabstractnameCH}%
\quotation}
{\endquotation\newpage} % }}}
% Environment to generate the english acknowledgements page.
\newenvironment{Ack_E} % {{{
{\chapter*{\centerline{\theacknowledgementsnameEN}}%
\addcontentsline{toc}{chapter}{\theacknowledgementsnameEN}%
\quotation}
{\endquotation\newpage} % }}}
% Environment to generate the chinese acknowledgements page.
\newenvironment{Ack_C} % {{{
{%
\chapter*{\centerline{\theacknowledgementsnameCH}}%
\addcontentsline{toc}{chapter}{\theacknowledgementsnameCH}%
\quotation}
{\endquotation\newpage} % }}}
\input{Variable}