-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathpreamble.tex
86 lines (70 loc) · 2.14 KB
/
preamble.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
% \usepackage[cam,a4,center]{crop}
\usepackage[fontset=fandol, heading=true, UTF8]{ctex}
\usepackage[lotdepth=2, lofdepth=2]{subfig}
\usepackage[toc]{multitoc}
\usepackage[rmdefault,semibold]{sourceserifpro}
\usepackage[sfdefault,semibold]{sourcesanspro}
\usepackage[scale=0.85,semibold]{sourcecodepro}
\usepackage{float,animate,awesomebox}
\usepackage[skins]{tcolorbox}
\definecolor{colortip}{RGB}{81,183,73}
\definecolor{colornote}{RGB}{251,188,5}
\definecolor{colorwarn}{RGB}{255,83,59}
\definecolor{colorinfo}{RGB}{204,204,204}
\tcbset{
colbacktitle=white,
enhanced,
attach boxed title to top center={yshift=-2mm},
colback=white, % 背景色
coltext=black, % 文本色
leftrule=1mm,
rightrule=.25mm,
bottomrule=.25mm,
toprule=.25mm,
boxsep=1pt, % 文字和边框的空隙
arc=1pt % 圆角
}
\newtcolorbox{rmdtip}[1]{
title=#1,
coltitle=colortip,
colframe=colortip, % 边框色
}
\newtcolorbox{rmdnote}[1]{
title=#1,
coltitle=colornote,
colframe=colornote % 边框色
}
\newtcolorbox{rmdwarn}[1]{
title=#1,
coltitle=colorwarn,
colframe=colorwarn % 边框色
}
\newtcolorbox{rmdinfo}{
colframe=colorinfo % 边框色
}
\newenvironment{columns}[1][]{}{}
\newenvironment{column}[1]{\begin{minipage}{#1}\ignorespaces}{%
\end{minipage}
\ifhmode\unskip\fi
\aftergroup\useignorespacesandallpars}
\def\useignorespacesandallpars#1\ignorespaces\fi{%
#1\fi\ignorespacesandallpars}
\makeatletter
\def\ignorespacesandallpars{%
\@ifnextchar\par
{\expandafter\ignorespacesandallpars\@gobble}%
{}%
}
\makeatother
% 添加版权水印
% https://github.com/callegar/LaTeX-draftwatermark
% https://github.com/callegar/LaTeX-everypage
% https://ctan.org/pkg/draftwatermark
% draftwatermark 依赖 everypage
\usepackage[angle=90,text=\textcopyright 黄湘云,color=gray,pos={0.5in,1.5in},scale=0.25]{draftwatermark}
% draftwatermark 和 everypage 由同一个人维护,后者将停止维护
% https://github.com/CTeX-org/ctex-kit/issues/331
\RecustomVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\},formatcom=\xeCJKVerbAddon}
\usepackage{bm,mathrsfs} % \mathcal \mathbb \mathscr \boldsymbol \bm
\usepackage{makeidx}
\makeindex