-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathUCASReport.sty
143 lines (119 loc) · 3.97 KB
/
UCASReport.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%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
\ProvidesPackage{UCASReport}
%%页边距
\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{pythonhighlight}
\RequirePackage{tcolorbox}
\RequirePackage{fontawesome}
%% 更改摘要二字的样式
\renewcommand{\abstractname}{\textbf{\large {摘\quad 要}}}
%可固定下划线长度
\makeatletter
\newcommand\dlmu[2][4cm]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
\makeatother
%更改主题
% \hypersetup{
% colorlinks=true,
% linkcolor=blue,
% filecolor=blue,
% urlcolor=Magenta,
% citecolor=orange,
% }
%%对一些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{\reference}{
%\nocite{*} %打开此选项会列出bib里面的所有参考文献
\bibliographystyle{unsrt} %规定了参考文献的格式
\begin{center}%居中
\bibliography{reference} %调出LaTeX生成参考文献列表
\end{center}
}
%%文本框设置
\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}
}
%%页眉设置
\pagestyle{fancy}
\fancyhead[L]{}%%留空则不显示
\fancyhead[C]{\fangsong 页眉中}%%留空则不显示
\fancyhead[R]{}%%留空则不显示
%封面页设置
{
\title{ \vspace{3cm} \heiti \Huge \textbf{{XXXX课程报告}} \par
\vspace{1cm}
\heiti \Large {\underline{XXXXXX进展调研}}
\vspace{3cm} }%标题
\author{
\vspace{0.5cm}
\kaishu\Large 姓名\ \dlmu[9cm]{XXX} \qquad \\ %姓名
\vspace{0.5cm}
\kaishu\Large 学号\ \dlmu[9cm]{在此填写学号} \qquad \\ %学号
\vspace{0.5cm}
\kaishu\Large 院所\ \dlmu[9cm]{中国科学院计算技术研究所} %院所
}
\date{\today} % 默认为今天的日期,可以注释掉不显示日期
}
%%在这里可更改封面logo
\newcommand{\cover}{
%%封面校名logo,图片都在figures文件夹里
\begin{figure}
\centering
\vspace{2cm}
\includegraphics[width=0.6\textwidth]{figures/ucas_logo.pdf}
\end{figure}
\maketitle
}