This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HEUReport.sty
160 lines (137 loc) · 4.73 KB
/
HEUReport.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%HEU课程论文模板
%%作者:akkiri
%%License:Creative Commons CC BY 4.0
%%GitHub:https://github.com/a-kkiri/HEU_Latex_Template
%%Overleaf:https://www.overleaf.com/latex/templates/ha-er-bin-gong-cheng-da-xue-ke-cheng-lun-wen-mo-ban/zyxyqtpdkdzy
%%最后更改于2023/11/04
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%在"中国科学院大学课程论文模板"基础上修改而来
%%原作者:jweihe
%%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
\ProvidesPackage{HEUReport}
%%页边距
\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}
%% 定义一些字号和字体
\newcommand{\sihao}{\fontsize{14pt}{21pt}\selectfont} % 四号, 1.5 倍行距
\newcommand{\xiaosi}{\fontsize{12pt}{18pt}\selectfont} % 小四, 1.5倍行距
\setCJKfamilyfont{STXinwei}{华文新魏.ttf}
\newcommand{\STXinwei}{\CJKfamily{STXinwei}}
%% 更改摘要二字的样式
\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=black,
}
%%对一些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]{}%%留空则不显示
\fancyhead[R]{}%%留空则不显示
%封面页设置
{
\title{ \vspace{0.5cm}\STXinwei \fontsize{50pt}{1pt} \selectfont \textbf{{\tplTitle}} \par
\vspace{2.5cm} }
\author{
\vspace{0.5cm}
\songti \sihao 课程名称:\ \dlmu[8cm]{\xiaosi \tplCourse} \qquad \\ %课程名称
\vspace{0.5cm}
\songti \sihao 班\qquad 级:\ \dlmu[8cm]{\xiaosi \tplClass} \qquad \\ %班级
\vspace{0.5cm}
\songti \sihao 学\qquad 号:\ \dlmu[8cm]{\xiaosi \tplID} \qquad \\ %学号
\vspace{0.5cm}
\songti \sihao 姓\qquad 名:\ \dlmu[8cm]{\xiaosi \tplName} \qquad \\ %姓名
\vspace{0.5cm}
\songti \sihao 任课教师:\ \dlmu[8cm]{\xiaosi \tplTeacher} %任课教师
}
\date{} % 括号里输入 \today 可以显示今天的日期
}
%%在这里可更改封面logo
\newcommand{\cover}{
%%封面校名logo,图片都在figures文件夹里
\begin{figure}
\centering
\vspace{2.4cm}
\includegraphics[width=10.5cm, height=1.4cm]{figures/heu_title.png}
\end{figure}
\maketitle
%% 评价表,不需要可以注释掉
\begin{center}
\begin{tabular}{|l|}
\hline
\heiti \multirow{2}*{大作业成绩:} \hspace{12cm} \\ \\
\hline
\heiti \multirow{2}*{任课教师评语:} \\ \\ \\ \\ \\ \\ \\
\hline
\end{tabular}
\end{center}
}