forked from jokerdawn/GDUTThesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmygdut.sty
38 lines (31 loc) · 1.03 KB
/
mygdut.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
\ProvidesPackage{mygdut}
\RequirePackage{listings}
\RequirePackage{fancyvrb}
\RequirePackage[chapter]{algorithm}
\RequirePackage{algorithmic}
\lstset{
columns=flexible,sensitive=true,lineskip=-3pt,
basicstyle=\small\ttfamily,
keywordstyle=\color{black},
stringstyle=\ttfamily,
numbers=left,
numbersep=0.5em,
numberstyle=\small,
xleftmargin=1.5em,
framexleftmargin=1em,
aboveskip=0.5em,
showstringspaces=false,
breaklines=true,extendedchars=true, %跨行
escapeinside={`}{`}
}
\algsetup{indent=3em}
\floatname{algorithm}{算法}
\renewcommand{\algorithmicrequire}{\textbf{已知:}}
\renewcommand{\algorithmicensure}{\textbf{求:}}
\DefineVerbatimEnvironment{code}{Verbatim}%
{frame=single,framerule=0.3mm,rulecolor=\color{black},%
fillcolor=\color{red!20!green!20!blue!20},framesep=1mm,fontsize=\small}
\newcommand{\ve}[1]{\ensuremath{\bm #1}}
% tabularx 中的 Z 环境,居中自动调整
\newcolumntype{Z}{>{\centering\arraybackslash}X}
\endinput