-
Notifications
You must be signed in to change notification settings - Fork 7
/
ustcsetup.tex
99 lines (83 loc) · 3.18 KB
/
ustcsetup.tex
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
\ustcsetup{
title = {中国科学技术大学\\学位论文模板示例文档 \ustcthesisversion},
title* = {An example of thesis template for University of Science
and Technology of China \ustcthesisversion},
author = {李泽平},
author* = {Li Zeping},
speciality = {数学与应用数学},
speciality* = {Mathematics and Applied Mathematics},
supervisor = {XXX~教授, XXX~教授},
supervisor* = {Prof. XXX, Prof. XXX},
% date = {2017-05-01}, % 默认为今日
% professional-type = {专业学位类型},
% professional-type* = {Professional degree type},
% department = {数学科学学院}, % 院系,本科生需要填写
% student-id = {PB11001000}, % 学号,本科生需要填写
% secret-level = {秘密}, % 绝密|机密|秘密|控阅,注释本行则公开
% secret-level* = {Secret}, % Top secret | Highly secret | Secret
% secret-year = {10}, % 保密/控阅期限
%
% 数学字体
% math-style = GB, % 可选:GB, TeX, ISO
math-font = xits, % 可选:stix, xits, libertinus
}
% 加载宏包
% 插图
\usepackage{graphicx}
% 三线表
\usepackage{booktabs}
% 跨页表格
\usepackage{longtable}
% SI 量和单位
\usepackage{siunitx}
% 参考文献使用 BibTeX + natbib 宏包
% 顺序编码制
\usepackage[sort]{natbib}
\bibliographystyle{ustcthesis-numerical}
% 著者-出版年制
% \usepackage{natbib}
% \bibliographystyle{ustcthesis-authoryear}
% 本科生参考文献的著录格式
% \usepackage[sort]{natbib}
% \bibliographystyle{ustcthesis-bachelor}
% 参考文献使用 BibLaTeX 宏包
% \usepackage[style=ustcthesis-numeric]{biblatex}
% \usepackage[bibstyle=ustcthesis-numeric,citestyle=ustcthesis-inline]{biblatex}
% \usepackage[style=ustcthesis-authoryear]{biblatex}
% \usepackage[style=ustcthesis-bachelor]{biblatex}
% 声明 BibLaTeX 的数据库
% \addbibresource{bib/ustc.bib}
% 配置图片的默认目录
\graphicspath{{figures/}}
% 用于写文档的命令
\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
\DeclareRobustCommand\pkg{\textsf}
\DeclareRobustCommand\file{\nolinkurl}
%%图、表的格式化引用
\newrefformat{fig}{\hyperref[#1]{图\ref*{#1}\,}}
\newrefformat{eq}{\hyperref[#1]{式\ref*{#1}\,}}
\newrefformat{tab}{\hyperref[#1]{表\ref*{#1}\,}}
%%listings设置
\usepackage{listings}
\usepackage{xcolor}
\lstset{
tabsize=4, %
frame=shadowbox, %把代码用带有阴影的框圈起来
commentstyle=\color{red!50!green!50!blue!50},%浅灰色的注释
rulesepcolor=\color{red!20!green!20!blue!20},%代码块边框为淡青色
keywordstyle=\color{blue!90}\bfseries, %代码关键字的颜色为蓝色,粗体
showstringspaces=false,%不显示代码字符串中间的空格标记
stringstyle=\ttfamily, % 代码字符串的特殊格式
keepspaces=true, %
breakindent=22pt, %
basicstyle=\footnotesize, %
showspaces=false, %
flexiblecolumns=true, %
breaklines=true,%对过长的代码自动换行
breakautoindent=true,%
breakindent=4em,%
texcl=true,
aboveskip=1em %代码块边框
}
% hyperref 宏包在最后调用
\usepackage{hyperref}