-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSYSUReport.cls
161 lines (135 loc) · 4.69 KB
/
SYSUReport.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SYSU 课程论文模板
% 作者:NorthSecond
% License: Creative Commons CC BY 4.0
% GitHub: https://github.com/NorthSecond/SYSU_Latex_Template
% Overleaf:
% 在UCAS_Latex_Template基础上修改而来, 原作者:jweihe
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%UCAS课程论文模板
%%作者:jweihe
%%License:Creative Commons CC BY 4.0
%%GitHub:https://github.com/jweihe/UCAS_Latex_Template
%%Overleaf:https://www.overleaf.com/latex/templates/zhong-guo-ke-xue-yuan-da-xue-ke-cheng-lun-wen-mo-ban/nphpxhhqvnds
%%最后更改于2023/06/05
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%在"北京大学课程论文模板"基础上修改而来
%%原作者:Shawn Wang
%%Overleaf地址:https://www.overleaf.com/latex/templates/bei-jing-da-xue-ke-cheng-lun-wen-mo-ban/yntmqcktrzfh
\ProvidesClass{SYSUReport}
\LoadClass[12pt,hyperref,a4paper,UTF8]{ctexart}
%%页边距
\RequirePackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.50cm]{geometry}
%%一些必要的宏包
\RequirePackage[unicode=true,colorlinks,urlcolor=blue,linkcolor=blue,bookmarksnumbered=blue]{hyperref}
\RequirePackage{latexsym,amssymb,amsmath,amsbsy,amsopn,amstext,amsthm,amsxtra,color,bm,calc,ifpdf}
\RequirePackage{graphicx}
\RequirePackage{enumerate}
\RequirePackage{fancyhdr}
\RequirePackage{listings}
\RequirePackage{multirow}
\RequirePackage{makeidx}
\RequirePackage{xcolor}
\RequirePackage{fontspec}
\RequirePackage{subfigure}
\PassOptionsToPackage{hyphens}{url}
\RequirePackage{hyperref}
\RequirePackage{booktabs}
\RequirePackage{tcolorbox}
\definecolor{myteal}{cmyk}{1,0,1,0.60} % 主题色改为中大绿
%% 更改摘要二字的样式
\renewcommand{\abstractname}{\textbf{\large {摘\quad 要}}}
%可固定下划线长度
\makeatletter
\newcommand\dlmu[2][4cm]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
\makeatother
% %更改主题
\hypersetup{
colorlinks=true,
linkcolor=black,
filecolor=blue,
urlcolor=magenta,
citecolor=orange,
linktoc=all,
}
%%对一些autoref的中文引用名作修改
\def\equationautorefname{式}
\def\footnoteautorefname{脚注}
\def\itemautorefname{项}
\def\figureautorefname{图}
\def\tableautorefname{表}
\def\partautorefname{篇}
\def\appendixautorefname{附录}
\def\chapterautorefname{章}
\def\sectionautorefname{节}
\def\subsectionautorefname{小小节}
\def\subsubsectionautorefname{subsubsection}
\def\paragraphautorefname{段落}
\def\subparagraphautorefname{子段落}
\def\FancyVerbLineautorefname{行}
\def\theoremautorefname{定理}
\newtheorem{Theorem}{定理}[section]
\newtheorem{Lemma}[Theorem]{引理}
\newtheorem{Corollary}[Theorem]{推论}
\newtheorem{Proposition}[Theorem]{命题}
\newtheorem{Definition}[Theorem]{定义}
\newtheorem{Example}[Theorem]{例}
%%文本框设置
\newcommand{\tbox}[1]{
\begin{center}
\begin{tcolorbox}[colback=gray!10,%gray background
colframe=black,% black frame colour
width=8cm,% Use 8cm total width,
arc=1mm, auto outer arc,
boxrule=0.5pt,
]
{#1}
\end{tcolorbox}
\end{center}
}
\newcommand\headl[1]{\def\headl{#1}}
\newcommand\headc[1]{\def\headc{#1}}
\newcommand\headr[1]{\def\headr{#1}}
\newcommand\lessonTitle[1]{\def\lessonTitle{#1}}
\newcommand\reportTitle[1]{\def\reportTitle{#1}}
\newcommand\stuname[1]{\def\stuname{#1}}
\newcommand\stuid[1]{\def\stuid{#1}}
\newcommand\inst[1]{\def\inst{#1}}
\newcommand\major[1]{\def\major{#1}}
\renewcommand\date[1]{\def\date{#1}}
%%页眉设置
\pagestyle{fancy}
\fancyhead[L]{\fangsong {\headl}}
\fancyhead[C]{\fangsong {\headc}}
\fancyhead[R]{\fangsong {\headr}}
%% 去掉页眉横线
% \renewcommand{\headrulewidth}{0pt}
%% 常用图片文件夹路径
\graphicspath{{figures/}{figure/}{pictures/}{picture/}{pic/}{pics/}{image/}{images/}}
%%在这里可更改封面logo
\newcommand{\cover}{
%%封面校名logo,图片都在figures文件夹里
\begin{center}
\begin{figure}
\centering
\vspace{2cm}
\includegraphics[width=0.6\textwidth]{sysu.jpg}
\end{figure}
\vspace*{\fill}
\heiti \Huge \textbf{{\lessonTitle}} \par
\vspace{1cm}
\heiti \Large {\underline{\reportTitle}} \par
\vspace{3cm}
\vspace{0.5cm}
\kaishu\Large 姓\ 名\ \dlmu[9cm]{\stuname} \qquad \\ %姓名
\vspace{0.5cm}
\kaishu\Large 学\ 号\ \dlmu[9cm]{\stuid} \qquad \\ %学号
\vspace{0.5cm}
\kaishu\Large 学\ 院\ \dlmu[9cm]{\inst} \qquad \\ %院所
\vspace{0.5cm}
\kaishu\Large 专\ 业\ \dlmu[9cm]{\major} %专业
\vspace*{\fill}
\large \date
\end{center}
}