Skip to content

Commit b041ba4

Browse files
authored
Add files via upload
Fist commit
1 parent 0ffd536 commit b041ba4

File tree

4 files changed

+317
-0
lines changed

4 files changed

+317
-0
lines changed

UCASReport.sty

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2+
%%UCAS课程论文模板
3+
%%作者:jweihe
4+
%%License:Creative Commons CC BY 4.0
5+
%%GitHub:https://github.com/jweihe/UCAS_Latex_Template
6+
%%Overleaf:https://www.overleaf.com/latex/templates/bnuke-cheng-lun-wen-mo-ban/bcwvxncqffkw
7+
8+
%%最后更改于2023/06/05
9+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10+
11+
12+
%%在"北京大学课程论文模板"基础上修改而来
13+
%%原作者:Shawn Wang
14+
%%Overleaf地址:https://www.overleaf.com/latex/templates/bei-jing-da-xue-ke-cheng-lun-wen-mo-ban/yntmqcktrzfh
15+
16+
17+
\ProvidesPackage{UCASReport}
18+
19+
%%页边距
20+
\RequirePackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.50cm]{geometry}
21+
22+
%%一些必要的宏包
23+
\RequirePackage[unicode=true,colorlinks,urlcolor=blue,linkcolor=blue,bookmarksnumbered=blue]{hyperref}
24+
\RequirePackage{latexsym,amssymb,amsmath,amsbsy,amsopn,amstext,amsthm,amsxtra,color,bm,calc,ifpdf}
25+
\RequirePackage{graphicx}
26+
\RequirePackage{enumerate}
27+
\RequirePackage{fancyhdr}
28+
\RequirePackage{listings}
29+
\RequirePackage{multirow}
30+
\RequirePackage{makeidx}
31+
\RequirePackage{xcolor}
32+
\RequirePackage{fontspec}
33+
\RequirePackage{subfigure}
34+
\PassOptionsToPackage{hyphens}{url}
35+
\RequirePackage{hyperref}
36+
\RequirePackage{pythonhighlight}
37+
38+
\RequirePackage{tcolorbox}
39+
40+
\RequirePackage{fontawesome}
41+
42+
%% 更改摘要二字的样式
43+
\renewcommand{\abstractname}{\textbf{\large {摘\quad 要}}}
44+
45+
%可固定下划线长度
46+
\makeatletter
47+
\newcommand\dlmu[2][4cm]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
48+
\makeatother
49+
50+
%更改主题
51+
% \hypersetup{
52+
% colorlinks=true,
53+
% linkcolor=blue,
54+
% filecolor=blue,
55+
% urlcolor=Magenta,
56+
% citecolor=orange,
57+
% }
58+
59+
%%对一些autoref的中文引用名作修改
60+
\def\equationautorefname{式}
61+
\def\footnoteautorefname{脚注}
62+
\def\itemautorefname{项}
63+
\def\figureautorefname{图}
64+
\def\tableautorefname{表}
65+
\def\partautorefname{篇}
66+
\def\appendixautorefname{附录}
67+
\def\chapterautorefname{章}
68+
\def\sectionautorefname{节}
69+
\def\subsectionautorefname{小小节}
70+
\def\subsubsectionautorefname{subsubsection}
71+
\def\paragraphautorefname{段落}
72+
\def\subparagraphautorefname{子段落}
73+
\def\FancyVerbLineautorefname{行}
74+
\def\theoremautorefname{定理}
75+
76+
\newtheorem{Theorem}{定理}[section]
77+
\newtheorem{Lemma}[Theorem]{引理}
78+
\newtheorem{Corollary}[Theorem]{推论}
79+
\newtheorem{Proposition}[Theorem]{命题}
80+
\newtheorem{Definition}[Theorem]{定义}
81+
\newtheorem{Example}[Theorem]{例}
82+
83+
%%参考文献设置
84+
\newcommand{\reference}{
85+
%\nocite{*} %打开此选项会列出bib里面的所有参考文献
86+
\bibliographystyle{unsrt} %规定了参考文献的格式
87+
\begin{center}%居中
88+
\bibliography{reference} %调出LaTeX生成参考文献列表
89+
\end{center}
90+
}
91+
92+
%%文本框设置
93+
\newcommand{\tbox}[1]{
94+
\begin{center}
95+
\begin{tcolorbox}[colback=gray!10,%gray background
96+
colframe=black,% black frame colour
97+
width=8cm,% Use 8cm total width,
98+
arc=1mm, auto outer arc,
99+
boxrule=0.5pt,
100+
]
101+
{#1}
102+
\end{tcolorbox}
103+
\end{center}
104+
}
105+
106+
%%页眉设置
107+
\pagestyle{fancy}
108+
\fancyhead[L]{}%%留空则不显示
109+
\fancyhead[C]{\fangsong 页眉中}%%留空则不显示
110+
\fancyhead[R]{}%%留空则不显示
111+
112+
113+
%封面页设置
114+
{
115+
\title{ \vspace{3cm} \heiti \Huge \textbf{{XXXX课程报告}} \par
116+
\vspace{1cm}
117+
\heiti \Large {\underline{XXXXXX进展调研}}
118+
\vspace{3cm} }%标题
119+
120+
\author{
121+
\vspace{0.5cm}
122+
\kaishu\Large 姓名\ \dlmu[9cm]{何XX} \qquad \\ %姓名
123+
\vspace{0.5cm}
124+
\kaishu\Large 学号\ \dlmu[9cm]{在此填写学号} \qquad \\ %学号
125+
\vspace{0.5cm}
126+
\kaishu\Large 院所\ \dlmu[9cm]{中国科学院计算技术研究所} %院所
127+
}
128+
129+
\date{\today} % 默认为今天的日期,可以注释掉不显示日期
130+
}
131+
132+
%%在这里可更改封面logo
133+
\newcommand{\cover}{
134+
%%封面校名logo,图片都在figures文件夹里
135+
\begin{figure}
136+
\centering
137+
\vspace{2cm}
138+
\includegraphics[width=0.6\textwidth]{figures/ucas_logo.pdf}
139+
\end{figure}
140+
141+
\maketitle
142+
}
143+

figures/ucas_logo.pdf

40.2 KB
Binary file not shown.

main.tex

+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
%!TeX program = xelatex
2+
\documentclass[12pt,hyperref,a4paper,UTF8]{ctexart}
3+
\usepackage{UCASReport}
4+
5+
%%-------------------------------正文开始---------------------------%%
6+
\begin{document}
7+
8+
%%-----------------------封面--------------------%%
9+
\cover
10+
11+
%%------------------摘要-------------%%
12+
%\begin{abstract}
13+
%
14+
%在此填写摘要内容
15+
%
16+
%\end{abstract}
17+
18+
\thispagestyle{empty} % 首页不显示页码
19+
20+
%%--------------------------目录页------------------------%%
21+
\newpage
22+
\tableofcontents
23+
24+
%%------------------------正文页从这里开始-------------------%
25+
\newpage
26+
27+
%%可选择这里也放一个标题
28+
%\begin{center}
29+
% \title{ \Huge \textbf{{标题}}}
30+
%\end{center}
31+
32+
\section{模板说明}
33+
本模板主要适用于一些课程的平时论文以及期末论文,默认页边距为2.5cm,中文宋体,英文Times New Roman,字号为12pt(小四)。
34+
35+
编译方式:\verb|xelatex -> bibtex -> xelatex*2|
36+
37+
38+
默认模板文件由以下四部分组成:
39+
\begin{itemize}
40+
\item \texttt{main.tex} 主文件
41+
\item \texttt{reference.bib} 参考文献,使用bibtex
42+
\item \texttt{UCASReport.sty} 文档格式控制,包括一些基础的设置,如页眉、标题、姓名等
43+
\item \texttt{figures} 放置图片的文件夹
44+
\end{itemize}
45+
46+
第一次使用时需前往\texttt{UCASReport.sty} 对标题、姓名、学号、院所、页眉等进行设置,设置完后即可一劳永逸,封面logo亦可替换
47+
48+
默认带有封面页以及目录页,页码从目录页开始
49+
50+
\section{一些插入功能}
51+
\subsection{插入公式}
52+
行内公式$v-\varepsilon+\phi=2$
53+
54+
插入行间公式如\autoref{Euler}:
55+
\begin{equation}
56+
v-\varepsilon+\phi=2
57+
\label{Euler}
58+
\end{equation}
59+
60+
\subsection{插入图片}
61+
UCAS校徽如\autoref{UCAS}所示,注意这里使用了\verb|~\autoref{}|命令,也就是会自动生成“图”“式”等前缀,无需手动输入。
62+
63+
\begin{figure}[!htbp]
64+
\centering
65+
\includegraphics[width =.4\textwidth]{figures/ucas_logo.pdf}
66+
\caption{中国科学院大学}
67+
\label{UCAS}
68+
\end{figure}
69+
70+
插入上面图片的代码:
71+
72+
\begin{verbatim}
73+
\begin{figure}[!htbp]
74+
\centering
75+
\includegraphics[width =.4\textwidth]{figures/ucas_logo.pdf}
76+
\caption{中国科学院大学}
77+
\label{UCAS}
78+
\end{figure}
79+
\end{verbatim}
80+
81+
\subsection{插入文本框}
82+
本模板定义了一个圆角灰底的文本框,使用简化命令\verb|\tbox{}|即可,如果你不喜欢,可以前往 \texttt{UCASReport.sty}对其进行修改。
83+
84+
\tbox{
85+
这是一个圆角灰底的文本框
86+
}
87+
88+
\subsection{插入表格}
89+
本模板文件如\autoref{doc}所示。
90+
\begin{table}[!htbp]
91+
\centering
92+
\begin{tabular}{l | l}
93+
\hline
94+
文件名 & 说明 \\
95+
\hline
96+
\texttt{main.tex} & 主文件 \\
97+
\texttt{reference.bib} & 参考文献 \\
98+
\texttt{UCASReport.sty} & 文档格式控制\\
99+
\texttt{figures} & 图片文件夹 \\
100+
\hline
101+
\end{tabular}
102+
\caption{本模板文件组成}
103+
\label{doc}
104+
\end{table}
105+
106+
%\section{定理环境}
107+
%\begin{Theorem}
108+
%\end{Theorem}
109+
%
110+
%\begin{Lemma}
111+
%\end{Lemma}
112+
%
113+
%\begin{Corollary}
114+
%\end{Corollary}
115+
%
116+
%\begin{Proposition}
117+
%\end{Proposition}
118+
%
119+
%\begin{Definition}
120+
%\end{Definition}
121+
%
122+
%\begin{Example}
123+
%\end{Example}
124+
%
125+
%\begin{proof}
126+
%\end{proof}
127+
128+
\subsection{插入参考文献}
129+
直接使用\verb|\cite{}|即可。
130+
131+
例如:
132+
133+
134+
\textit{ 此处引用了文献\cite{0Isaac}。此处引用了文献\cite{2016The}}
135+
136+
137+
引用过的文献会自动出现在参考文献中。
138+
139+
\section{写在最后}
140+
\subsection{发布地址}
141+
\begin{itemize}
142+
\item Github: \url{https://github.com/jweihe/UCAS_Latex_Template}
143+
\item Overleaf: \url{https://www.overleaf.com/latex/templates/UCASke-cheng-lun-wen-mo-ban/bcwvxncqffkw}
144+
\end{itemize}
145+
146+
%%----------- 参考文献 -------------------%%
147+
%在reference.bib文件中填写参考文献,此处自动生成
148+
149+
\reference
150+
151+
152+
\end{document}

reference.bib

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
\usepackage[style=alphabetic,maxnames=4,minnames=3,maxbibnames=99]{biblatex}
2+
3+
@article{0Isaac,
4+
title={Isaac Newton: the Last Sorcerer},
5+
author={ White, M. },
6+
journal={Macmillan},
7+
}
8+
9+
@article{2016The,
10+
title={The Cambridge Companion to Newton || A brief introduction to the mathematical work of Isaac Newton},
11+
author={ Iliffe, Rob and Smith, George E. },
12+
volume={10.1017/CCO9781139058568},
13+
number={9},
14+
pages={382-420},
15+
year={2016},
16+
}
17+
18+
@MISC{noauthor_undated-qy,
19+
howpublished = "\url{https://www.britannica.com/summary/Isaac-Newton.}",
20+
note = "Accessed: 2023-3-26"
21+
}
22+

0 commit comments

Comments
 (0)