-
Notifications
You must be signed in to change notification settings - Fork 637
/
zjuthesis.cls
114 lines (103 loc) · 2.87 KB
/
zjuthesis.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{zjuthesis}
[Zhejiang University Thesis and Design Template, Zixuan Wang [email protected]]
\input{config/version}
\wlog{zjuthesis version: \zjuthesisversion}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=zjuthesis,
prefix=
}
\DeclareStringOption{ClassNumber}
\DeclareStringOption{Security}
\DeclareStringOption{StudentName}
\DeclareStringOption{StudentID}
\DeclareStringOption{AdvisorName}
\DeclareStringOption{Grade}
\DeclareStringOption{Major}
\DeclareStringOption{Department}
\DeclareStringOption{Topic}
\DeclareStringOption{Title}
\DeclareStringOption{TitleEng}
\DeclareStringOption{SubmitDate}
\DeclareStringOption[undergraduate]{Degree}
\DeclareStringOption[general]{MajorFormat}
\DeclareStringOption[thesis]{Type}
\DeclareStringOption[proposal]{Period}
\DeclareStringOption[chinese]{Language}
\DeclareStringOption[doctor]{GradLevel}
\DeclareStringOption{ColaboratorName}
\DeclareStringOption[false]{BlindReview}
\DeclareStringOption[false]{PrintFilePath}
\DeclareStringOption[true]{TwoSide}
\DeclareBoolOption[true]{ListOfContents}
\DeclareBoolOption[true]{ListOfFigures}
\DeclareBoolOption[true]{ListOfTables}
\DeclareBoolOption[false]{ListOfAlgorithms}
\ProcessKeyvalOptions*
\wlog{Degree: {\Degree}}
\wlog{MajorFormat: {\MajorFormat}}
\wlog{Type: {\Type}}
\wlog{Period: {\Period}}
\wlog{BlindReview: {\BlindReview}}
\wlog{Language: {\Language}}
\wlog{GradLevel: {\GradLevel}}
\wlog{PrintFilePath: {\PrintFilePath}}
\PassOptionsToPackage{no-math}{fontspec}
\PassOptionsToPackage{AutoFakeBold}{xeCJK}
\usepackage{xifthen}
\ifthenelse{\equal{\TwoSide}{true}}
{
\PassOptionsToClass{
twoside,
openright
}{ctexrep}
}
{}
\LoadClass[
zihao=-4,
UTF8
]{ctexrep}
\input{config/packages}
\ifthenelse{\equal{\Degree}{undergraduate}}
{
% undergraduate
\ifthenelse{\equal{\Type}{thesis}}
{
\newcommand{\TitleTypeName}{浙江大学本科生毕业论文}
}
{
\newcommand{\TitleTypeName}{浙江大学本科生毕业设计}
}
}
{
% graduate
\ifthenelse{\equal{\GradLevel}{doctor}}
{
% doctor
\ifthenelse{\equal{\Type}{thesis} \OR \equal{\Type}{design}}
{
% thesis or design
\newcommand{\TitleTypeName}{浙江大学博士学位论文}
\newcommand{\TitleTypeNameCover}{博士学位论文}
}
{}
}
{
% master
\ifthenelse{\equal{\Type}{thesis}}
{
% thesis
\newcommand{\TitleTypeName}{浙江大学硕士学位论文}
\newcommand{\TitleTypeNameCover}{硕士学位论文}
}
{
% design
\newcommand{\TitleTypeName}{浙江大学硕士专业学位论文}
\newcommand{\TitleTypeNameCover}{硕士专业学位论文}
}
}
}
\input{config/path}
\input{config/commands}
\input{config/format/format}