-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathFJU_thesis.cls
More file actions
127 lines (114 loc) · 3.4 KB
/
Copy pathFJU_thesis.cls
File metadata and controls
127 lines (114 loc) · 3.4 KB
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
% This class is a link to real class.
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{FJU_thesis}[2019/12/15 by Retso]
% pass no defined option to book class.
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{thesis_base}}
% terminates the option processing.
\ProcessOptions\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Load base class
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\LoadClass{thesis_base}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine header of abstract
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[page,xspace]{totalcount}
\def\mcShift{\hspace{-6.0pt}} % It's for align non-multicolumn cell .
\def\abstractHeaderZh{\centering
\abstractHeaderStyle
\normalsize
{ \renewcommand{\arraystretch}{1}
\begin{tabularx}{\textwidth}{l@{\hspace*{0.4em}}lXl@{\hspace*{0.4em}}l}
\multicolumn{3}{l}{\textbf{論文名稱:{\titleZh}}} \\
& & \\
\textbf{校(院)所組別:{\collegeZh}{\deptZh}} & \multicolumn{2}{r}{\textbf{總頁數:{\totalpages}}} \\
\textbf{畢業時間:{\degreedAcademic}} & & \\
\textbf{研究生:{\authorZh}} & \textbf{指導教授:{\profsZh}} &
\end{tabularx}\par }
}
\def\abstractHeaderEn{\centering
\abstractHeaderStyle
\normalsize
\textbf{\titleEn}
{ \renewcommand{\arraystretch}{1}
\begin{tabularx}{\textwidth}{l@{\hspace*{0.4em}}XXl@{\hspace*{0.4em}}l}
\textbf{Student:{\authorEn}} & & \textbf{Advisor:{\profsEn}} \\
\end{tabularx}\par }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine Chapter Title
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@makechapterhead#1{%
\ifzh{
\vspace*{-1.3cm}{}
% zh
{
% Abstract Header
\ifthenelse{\equal{#1}{摘要}}{
{\abstractHeaderZh\par}
}{
\ifthenelse{\equal{#1}{Abstract}}{
{\abstractHeaderEn\par}
}{}
}
% Chapter Title
% The zh abstract title shouldn't be centering
\ifthenelse{\equal{#1}{摘要}}{
\normalfont \noindent #1\par
}{
{
\parindent \z@ \centering \normalfont % modify by sppmg
% The en abstract title should be base font
\ifthenelse{\equal{#1}{Abstract}}{
#1\par\nobreak
}{
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\chapterTitleStyle \zhnumber{\thechapter}、\makebox[0.5em]{} % modify by sppmg
\fi
\fi
\chapterTitleStyle #1\par\nobreak % modify by sppmg
\vskip 40\p@
}
}
}
}
}{
% en
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\chapterTitleNumStyle \@chapapp\space \thechapter % modify by sppmg
\par\nobreak
\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\chapterTitleStyle #1\par\nobreak % modify by sppmg
\vskip 40\p@
}
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine TOC/LOF/LOT Title
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@makeschapterhead#1{%
{
\ifzh{
% Chinese
\parindent \z@ \centering % modify by sppmg
}{
% English
\parindent \z@ \raggedright
}
\normalfont
\interlinepenalty\@M
\chapterTitleStyle #1\par\nobreak
\vskip 40\p@
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Redefine other configure
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\geometry{includefoot, top=3cm, bottom=3cm, inner=3cm, outer=3cm}
\endinput % this must be the last command.