forked from secmobi/amatutor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamatutor-cn.sty
53 lines (44 loc) · 1.26 KB
/
amatutor-cn.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
%!TEX encoding = UTF-8 Unicode
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
% 颜色,图像
\usepackage{color, graphicx}
\usepackage{booktabs}
% 参考文献,按照被引先后排序
\bibliographystyle{unsrt}
% 索引
\usepackage{makeidx}
\makeindex
% 使用Courier New作为等宽字体
\renewcommand\ttdefault{pcr}
% 源码高亮环境
\definecolor{gray}{RGB}{230, 230, 230}
\definecolor{darkgreen}{RGB}{47, 79, 47}
\newfontfamily{\lstfamily}[Scale=.85]{Monaco}
\usepackage{listings}
\lstset{
basicstyle=\lstfamily,
keywordstyle=\color{blue},
commentstyle=\color{darkgreen},
stringstyle=\color{red},
backgroundcolor=\color{gray},
numbers=left,
numberstyle=\lstfamily\tiny,
stepnumber=1,
tabsize=2,
breaklines=true,
%title=\lstname,
extendedchars=false, % 必须如此,否则和hyperref冲突,出错。
escapechar=~,
}
\renewcommand*{\lstlistingname}{代码}
% 内部引用超链接
\usepackage[xetex,unicode,colorlinks=true,urlcolor=blue,linkcolor=blue,citecolor=blue]{hyperref}
% ltxtable = tabularx换行表格 + longtable换页表格
% filecontents 使表格在同一文件内
\usepackage{ltxtable, filecontents}
% 页眉页脚控制
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{试读版}
\rhead{\today }
\cfoot{\thepage}