| 1 |
\usepackage{expl3,etoolbox,ifthen,xstring} |
| 2 |
\usepackage{xltxtra,mflogo,texnames,fontawesome} |
| 3 |
%\usepackage{amstext} |
| 4 |
\usepackage[zihao=-4]{ctex} |
| 5 |
\ctexset{today=old} |
| 6 |
\let\kaiti=\kaishu |
| 7 |
\usepackage{xeCJKfntef} |
| 8 |
%\setmainfont{CMU Serif} |
| 9 |
\usepackage{fontspec} |
| 10 |
%\usepackage{tgpagella} |
| 11 |
\setmainfont[Ligatures=TeX]{TeX Gyre Pagella} |
| 12 |
\setsansfont[Ligatures=TeX]{TeX Gyre Pagella} |
| 13 |
\setmonofont[Ligatures=TeX]{TeX Gyre Pagella} |
| 14 |
%\usepackage{unicode-math} |
| 15 |
%\setmathfont[math-style=ISO,bold-style=ISO]{TeX Gyre Pagella Math} |
| 16 |
|
| 17 |
%\setmainfont{CMU Serif} |
| 18 |
\IfFileExists{SourceHanSerifSC-Regular.otf} |
| 19 |
{\setCJKmainfont[BoldFont=SourceHanSansSC-Regular.otf, ItalicFont=simkai.ttf]{SourceHanSerifSC-Regular.otf}}{} |
| 20 |
|
| 21 |
\usepackage[dvipsnames]{xcolor} |
| 22 |
\colorlet{examplefill}{yellow!80!black} |
| 23 |
\definecolor{graphicbackground}{rgb}{0.96,0.96,0.8} |
| 24 |
\definecolor{codebackground}{rgb}{0.9,0.9,1} |
| 25 |
\definecolor{gbsteelblue}{RGB}{70,130,180} |
| 26 |
\definecolor{gborange}{RGB}{255,138,88} |
| 27 |
\definecolor{gbblue}{RGB}{23,74,117} |
| 28 |
\definecolor{gbforestgreen}{RGB}{21,122,81} |
| 29 |
\definecolor{gbyellow}{RGB}{255,185,88} |
| 30 |
\definecolor{gbgrey}{RGB}{200,200,200} |
| 31 |
\colorlet{gblabelcolor}{violet} |
| 32 |
\colorlet{gbemphcolor}{blue!60!black} |
| 33 |
%\colorlet{gbemphcolor}{violet} |
| 34 |
|
| 35 |
%定义版面,showframe, |
| 36 |
\usepackage[paperwidth=210mm,paperheight=290mm,left=40mm,right=15mm,top=25mm,head=16pt, bottom=20mm,showcrop]{geometry}%,showframe |
| 37 |
\renewcommand{\baselinestretch}{1.35} |
| 38 |
%页面布局的标尺 |
| 39 |
\usepackage[type=none]{fgruler} |
| 40 |
%[unit=cm,type=lowerleft,showframe=true,hshift=3cm,vshift=2cm] |
| 41 |
\rulerparams{}{}{gray!10}{}{0.2pt} |
| 42 |
\fgrulerdefnum{}\fgrulercaptioncm{}%fgruler加数字后,导致基线对齐出现问题,所以这里去掉 |
| 43 |
|
| 44 |
\newlength{\skipheadrule} |
| 45 |
\deflength{\skipheadrule}{3.5pt} |
| 46 |
\newlength{\skipfootrule} |
| 47 |
\deflength{\skipfootrule}{5.5pt} |
| 48 |
\newlength{\ruletotalen} |
| 49 |
\deflength{\ruletotalen}{\textheight} |
| 50 |
\newlength{\ruleraised} |
| 51 |
\deflength{\ruleraised}{\headsep+\textheight} |
| 52 |
\usepackage{fancyhdr} |
| 53 |
\fancyhf{} |
| 54 |
%\fancyhead[LO]{% |
| 55 |
%\raisebox{-\skipheadrule}{% |
| 56 |
%\raisebox{-\headsep}[0pt][0pt]{\makebox[0pt][l]{\ruler{rightup}{\linewidth}}}% |
| 57 |
%\raisebox{-\ruleraised}[0pt][0pt]{\makebox[0pt][r]{\ruler{upleft}{\ruletotalen}}}% |
| 58 |
%}%HEAD LEFT% |
| 59 |
%} |
| 60 |
%\fancyhead[LE]{% |
| 61 |
%\raisebox{-\skipheadrule}{% |
| 62 |
%\raisebox{-\headsep}[0pt][0pt]{\makebox[0pt][l]{\ruler{rightup}{\linewidth}}}% |
| 63 |
%\raisebox{-\ruleraised}[0pt][0pt]{\makebox[0pt][r]{\ruler{upleft}{\ruletotalen}}}% |
| 64 |
%}\leftmark%HEAD LEFT% |
| 65 |
%} |
| 66 |
%\fancyhead[RO]{% |
| 67 |
%%HEAD RIGHT% |
| 68 |
%\raisebox{-\skipheadrule}{% |
| 69 |
%\hfill\makebox[0pt][l]{\raisebox{-\ruleraised}[0pt][0pt]{\ruler{downright}{\ruletotalen}}\hss}% |
| 70 |
%}} |
| 71 |
%\fancyhead[RE]{% |
| 72 |
%\rightmark%HEAD RIGHT% |
| 73 |
%\raisebox{-\skipheadrule}{% |
| 74 |
%\hfill\makebox[0pt][l]{\raisebox{-\ruleraised}[0pt][0pt]{\ruler{downright}{\ruletotalen}}\hss}% |
| 75 |
%}} |
| 76 |
\fancyhead[CO]{% |
| 77 |
符合GB/T 7714-2015标准的biblatex参考文献样式%HEAD CENTER |
| 78 |
} |
| 79 |
%\fancyfoot[L]{% |
| 80 |
%\raisebox{-\skipfootrule}{% |
| 81 |
%\raisebox{\footskip}[0pt][0pt]{\makebox[0pt][l]{\ruler{rightdown}{\linewidth}}} |
| 82 |
%}%FOOT LEFT |
| 83 |
%} |
| 84 |
\fancyfoot[C]{% |
| 85 |
\thepage%FOOT CENTER |
| 86 |
} |
| 87 |
\fancyfoot[R]{% |
| 88 |
%FOOT RIGHT |
| 89 |
} |
| 90 |
\renewcommand{\headrulewidth}{0.4pt} |
| 91 |
\renewcommand{\footrulewidth}{0pt} |
| 92 |
\pagestyle{fancy} |
| 93 |
|
| 94 |
|
| 95 |
%超链接书签功能,选项去掉链接红色方框 |
| 96 |
\usepackage[colorlinks=true,% |
| 97 |
pdfstartview=FitH,allcolors=gbemphcolor, |
| 98 |
bookmarksopenlevel=4,% |
| 99 |
bookmarksnumbered=true, |
| 100 |
bookmarksopen=true, |
| 101 |
bookmarksdepth=4,]{hyperref} |
| 102 |
%linkcolor=gbblue,anchorcolor=gbblue,citecolor=gbblue |
| 103 |
%linkcolor=black,linkcolor=green,blue,red,cyan, magenta, |
| 104 |
%yellow, black, gray,white, darkgray, lightgray, brown, |
| 105 |
%lime, olive, orange, red,purple, teal, violet. |
| 106 |
%CJKbookmarks,bookmarksnumbered=true, |
| 107 |
\usepackage{titleref} %标题引用 |
| 108 |
|
| 109 |
%标题格式设置 |
| 110 |
\usepackage{titlesec} |
| 111 |
%\titlespacing*{hcommandi}{hlefti}{hbefore-sepi}{hafter-sepi}[hright-sepi] |
| 112 |
\titlespacing*{\section}{0pt}{\baselineskip}{0.5\baselineskip} |
| 113 |
\titlespacing*{\subsection}{0pt}{0.5\baselineskip}{0.5\baselineskip} |
| 114 |
\titlespacing*{\subsubsection}{0pt}{0.5\baselineskip}{0pt} |
| 115 |
\titlespacing{\paragraph}{2em}{0.5\baselineskip}{1em} |
| 116 |
%这里利用titleformat*简单做设置,也可以利用titleformat做详细设置 |
| 117 |
\titleformat*{\section}{\zihao{-3}\bfseries\heiti} |
| 118 |
\titleformat*{\subsection}{\zihao{4}\bfseries\heiti} |
| 119 |
\titleformat*{\subsubsection}{\zihao{-4}\bfseries\kaiti} |
| 120 |
|
| 121 |
%参考文献 |
| 122 |
\usepackage[backend=biber,style=gb7714-2015,gbalign=center,gbfootbib=true%,gbtype=true% |
| 123 |
]{biblatex}%,backref=true% |
| 124 |
\addbibresource[location=local]{example.bib} |
| 125 |
\setlength{\bibitemsep}{1pt} |
| 126 |
%\defbibheading{bibliography}[\bibname]{% |
| 127 |
%%\phantomsection%解决链接指引出错的问题,相当于加入了一个引导点 |
| 128 |
%%\addcontentsline{toc}{subsection}{#1} |
| 129 |
% \centering\subsubsection*{#1}}% |
| 130 |
|
| 131 |
|
| 132 |
%目录,图/表/例目录,图表题注 |
| 133 |
\usepackage[bf]{subfigure} |
| 134 |
\usepackage[subfigure]{tocloft} %注意其与titletoc共用时分页会有问题 |
| 135 |
\usepackage{ccaption} |
| 136 |
\captiondelim{. } %图序图题中间的间隔符号 |
| 137 |
\captionnamefont{\zihao{-5}\heiti} %图序样式 |
| 138 |
\captiontitlefont{\zihao{-5}\heiti} %图题样式 |
| 139 |
\captionwidth{0.8\linewidth} %标题宽度 |
| 140 |
\changecaptionwidth |
| 141 |
\captionstyle{\centering} %\captionstyle{<style>} style are: \centering, \raggedleft or \raggedright |
| 142 |
%\precaption{\rule{\linewidth}{0.4pt}\par} |
| 143 |
%\postcaption{\vspace{-1cm}} |
| 144 |
\setlength{\belowcaptionskip}{2pt}%设置caption上下间距 |
| 145 |
\setlength{\abovecaptionskip}{0pt} |
| 146 |
%\setlength{\abovelegendskip}{0pt} %设置legend上下间距 |
| 147 |
%\setlength{\belowlegendskip}{0pt} |
| 148 |
%新的浮动体设置,\centerline{} |
| 149 |
\newcommand{\listegcodename}{\zihao{4}示~~例\thispagestyle{plain}}%listegcodename,新环境目录的标题 |
| 150 |
\newcommand{\egcodename}{例}%egcodename,新环境标题的图序 |
| 151 |
\newfloatlist{egcode}{loc}{\listegcodename}{\egcodename}%loc,写入条目的文件的扩展名 |
| 152 |
\newfixedcaption{\codecaption}{egcode}%egcode,环境名 |
| 153 |
\newfixedcaption{\fixtabcaption}{table}%egcode,环境名 |
| 154 |
|
| 155 |
%目录命令 |
| 156 |
\setlength{\cftbeforetoctitleskip}{\baselineskip} |
| 157 |
\setlength{\cftaftertoctitleskip}{0.5\baselineskip} |
| 158 |
\setlength{\cftbeforeloftitleskip}{\baselineskip} |
| 159 |
\setlength{\cftafterloftitleskip}{0.5\baselineskip} |
| 160 |
\setlength{\cftbeforelottitleskip}{\baselineskip} |
| 161 |
\setlength{\cftafterlottitleskip}{0.5\baselineskip} |
| 162 |
\setlength{\cftbeforeloctitleskip}{\baselineskip} |
| 163 |
\setlength{\cftafterloctitleskip}{0.5\baselineskip} |
| 164 |
%\renewcommand\contentsname{\hfill 目~~ 录 \hfill \hspace{1cm}} %用这一句也是一样的。 |
| 165 |
\renewcommand{\cfttoctitlefont}{\heiti} |
| 166 |
\renewcommand{\cftaftertoctitle}{} |
| 167 |
\renewcommand{\cftloftitlefont}{\heiti} |
| 168 |
\renewcommand{\cftafterloftitle}{} |
| 169 |
\renewcommand{\cftlottitlefont}{\heiti} |
| 170 |
\renewcommand{\cftafterlottitle}{} |
| 171 |
\renewcommand{\cftloctitlefont}{\heiti} |
| 172 |
\renewcommand{\cftafterloctitle}{} |
| 173 |
\renewcommand{\contentsname}{\zihao{4}目~~录} |
| 174 |
\renewcommand{\listfigurename}{\zihao{4}图~~片} |
| 175 |
\renewcommand{\listtablename}{\zihao{4}表~~格} |
| 176 |
\renewcommand{\cftsecfont}{\zihao{5}\heiti} %条目样式 |
| 177 |
\renewcommand{\cftsubsecfont}{\zihao{-5}\songti} %条目样式\fangsong |
| 178 |
\renewcommand{\cftsubsubsecfont}{\zihao{-5}\kaiti} %条目样式 |
| 179 |
\renewcommand{\cftsecpagefont}{\bfseries\zihao{5}} %页码的样式 |
| 180 |
\renewcommand{\cftsubsecpagefont}{\bfseries\zihao{-5}} %页码的样式 |
| 181 |
\renewcommand{\cftsubsubsecpagefont}{\bfseries\zihao{-5}} %页码的样式 |
| 182 |
%−−−−−−−−−−设置egcode条目样式−−−−−−−−−−−−−−−−−−−−−− |
| 183 |
%\renewcommand{\cftegcodeleader}{\leaders\hbox to 1em{\hss.\hss}\hfill} |
| 184 |
\setlength{\cftbeforeegcodeskip}{0.1ex} %条目前的间距 |
| 185 |
\setlength{\cftegcodeindent}{0em} %条目缩进 |
| 186 |
\setlength{\cftegcodenumwidth}{2.5em} %条目标签宽度 |
| 187 |
\renewcommand{\cftegcodefont}{\color{gbemphcolor}\zihao{-5}}%条目样式\fangsong |
| 188 |
\renewcommand{\cftegcodepresnum}{例} |
| 189 |
\renewcommand{\cftegcodeaftersnum}{ } |
| 190 |
\renewcommand{\cftegcodeaftersnumb}{~} |
| 191 |
%\cftsetindents{egcode}{0em}{3em} |
| 192 |
\renewcommand{\cftegcodepagefont}{\bfseries\zihao{-5}} |
| 193 |
%−−−−−−−−−−设置figure条目样式−−−−−−−−−−−−−−−−−−−−−− |
| 194 |
%\newcommand{\cftfigfill}{\renewcommand{\cftdot}{$\diamond$}\cftdotfill{\cftdotsep}} |
| 195 |
\setlength{\cftbeforefigskip}{0.1ex} %条目前的间距 |
| 196 |
\setlength{\cftfigindent}{0em} %条目缩进 |
| 197 |
\setlength{\cftfignumwidth}{2.5em} %条目标签宽度 |
| 198 |
\renewcommand{\cftfigfont}{\color{gbemphcolor}\zihao{-5}} %条目样式\heiti |
| 199 |
\renewcommand{\cftfigpresnum}{图} %条目数字前的内容 |
| 200 |
\renewcommand{\cftfigaftersnum}{ } %条目数字后的内容 |
| 201 |
\renewcommand{\cftfigaftersnumb}{~} %条目数字后的第二个内容 |
| 202 |
%\renewcommand{\cftfigdotsep}{\cftdotsep} %连接符之间的宽度 |
| 203 |
%\renewcommand{\cftfigleader}{\bfseries\cftfigfill} %连接符粘连团 |
| 204 |
%\renewcommand{\cftfigpagefont}{\color{red}\zihao{-5}$\diamond$\itshape} %页码的样式 |
| 205 |
%\renewcommand{\cftfigafterpnum}{\color{red}$\diamond$} %页码后内容 |
| 206 |
\renewcommand{\cftfigpagefont}{\bfseries\zihao{-5}} %页码的样式 |
| 207 |
%−−−−−−−−−−设置table条目样式−−−−−−−−−−−−−−−−−−−−−− |
| 208 |
%\newcommand{\cfttabfill}{\renewcommand{\cftdot}{$\infty$}\cftdotfill{\cftdotsep}} |
| 209 |
\setlength{\cftbeforetabskip}{0.1ex} %条目前的间距 |
| 210 |
\setlength{\cfttabindent}{0em} %条目缩进 |
| 211 |
\setlength{\cfttabnumwidth}{2.5em} %条目标签宽度 |
| 212 |
\renewcommand{\cfttabfont}{\color{gbemphcolor}\zihao{-5}} %条目样式 |
| 213 |
\renewcommand{\cfttabpresnum}{表} %条目数字前的内容 |
| 214 |
\renewcommand{\cfttabaftersnum}{ } %条目数字后的内容 |
| 215 |
\renewcommand{\cfttabaftersnumb}{~} %条目数字后的第二个内容 |
| 216 |
%\renewcommand{\cfttabdotsep}{\cftdotsep} %连接符之间的宽度 |
| 217 |
%\renewcommand{\cfttableader}{\bfseries\cfttabfill} %连接符粘连团 |
| 218 |
%\renewcommand{\cfttabpagefont}{\color{red}\zihao{-5}$\infty$\itshape} %页码的样式 |
| 219 |
%\renewcommand{\cfttabafterpnum}{\color{red}$\infty$} %页码后内容 |
| 220 |
\renewcommand{\cfttabpagefont}{\bfseries\zihao{-5}} %页码的样式 |
| 221 |
|
| 222 |
\usepackage{pdfpages}%直接插入pdf文件页 |
| 223 |
%\graphicspath{{egfigure/}{example/}} |
| 224 |
|
| 225 |
%代码环境设置 |
| 226 |
\usepackage{listings} |
| 227 |
\usepackage{tikz,pgf} |
| 228 |
\usetikzlibrary{calc} |
| 229 |
|
| 230 |
\lstset{breaklines,basicstyle=\ttfamily} |
| 231 |
|
| 232 |
\newenvironment{example}[3][{\footnotesize\faFileCodeO}]% |
| 233 |
{\list{}{\begingroup\codecaption{#2}\label{#3}\endgroup |
| 234 |
\setlength{\topsep}{0pt} |
| 235 |
\setlength{\partopsep}{0pt} |
| 236 |
\setlength{\itemsep}{0pt} |
| 237 |
\setlength{\parsep}{0pt} |
| 238 |
\setlength{\leftmargin}{0pt}% |
| 239 |
\setlength{\itemindent}{0pt}% |
| 240 |
%\renewcommand*{\makelabel}[1]{\hss\llap{\footnotesize\color{orange}\bfseries##1}} |
| 241 |
}\item[\footnotesize\color{gblabelcolor}\bfseries#1]\relax} |
| 242 |
{\endlist} |
| 243 |
|
| 244 |
\lstnewenvironment{texlist}% |
| 245 |
{\lstset{% general command to set parameter(s) |
| 246 |
%name=#1, |
| 247 |
%label=#2, |
| 248 |
%caption=\lstname, |
| 249 |
linewidth=\linewidth, |
| 250 |
breaklines=true, |
| 251 |
%showspaces=true, |
| 252 |
extendedchars=false, |
| 253 |
columns=fullflexible,%flexible, |
| 254 |
%aboveskip=2pt, |
| 255 |
boxpos=t, |
| 256 |
rulesep=0pt, |
| 257 |
frame=t, |
| 258 |
framesep=0pt, |
| 259 |
rulecolor=\color{gblabelcolor}, |
| 260 |
fontadjust=true, |
| 261 |
language=[LaTeX]TeX, |
| 262 |
backgroundcolor=\color{gbyellow!3},%\color{yellow}, %背景颜色 |
| 263 |
%numbers=left, |
| 264 |
numberstyle=\tiny\color{gblabelcolor}, |
| 265 |
basicstyle=\footnotesize\ttfamily, % print whole listing small |
| 266 |
keywordstyle=\bfseries\color{gbemphcolor},%\underbar, |
| 267 |
% underlined bold black keywords |
| 268 |
identifierstyle=, % nothing happens |
| 269 |
commentstyle=\color{OliveGreen}, % white comments |
| 270 |
stringstyle=\ttfamily\color{purple!50}, % typewriter type for strings |
| 271 |
showstringspaces=false}% no special string spaces |
| 272 |
} |
| 273 |
{} |
| 274 |
|
| 275 |
%定理环境设置 |
| 276 |
\usepackage[listings,theorems,most]{tcolorbox} |
| 277 |
\tcbuselibrary{breakable} |
| 278 |
\newcounter{myprop}\def\themyprop{\arabic{myprop}} |
| 279 |
%一个强调显示 |
| 280 |
\newcommand{\bibliofmt}[1]{\medskip\textcolor{gbforestgreen}{\heiti#1}} |
| 281 |
|
| 282 |
%序号如果带章节的话可以改为比如:\thesection.\arabic{myprop} |
| 283 |
\newtcbtheorem{property}{方法} |
| 284 |
{enhanced jigsaw,breakable,pad at break*=1mm,left=2em,boxsep=0pt, |
| 285 |
%colback=gray!5,colframe=gbforestgreen, |
| 286 |
colback=gray!5,boxrule=0pt,frame hidden,coltitle=gborange, |
| 287 |
borderline west={1.5mm}{-2mm}{gbforestgreen}, |
| 288 |
theorem style=plain,fonttitle=\bfseries\heiti,arc=0mm, |
| 289 |
%separator sign={\ $\blacktriangleright$},breakable, |
| 290 |
%theorem style=plain,fonttitle=\bfseries\upshape, fontupper=\slshape,boxrule=0mm,arc=0mm, |
| 291 |
%coltitle=black,colback=green!50!yellow!15!white,colframe=blue!50,% |
| 292 |
%description delimiters={}{}, |
| 293 |
%terminator sign={\ } |
| 294 |
}{pp} |
| 295 |
%最后一个必须参数是prefix用来做label比如这里是pp:加上给出的标签名 |
| 296 |
|
| 297 |
\newtcbtheorem[]{refentry}{条目类型} |
| 298 |
{breakable,pad at break*=1mm,enhanced jigsaw,left=2em,boxsep=0pt, |
| 299 |
colback=yellow!10!white,boxrule=0pt,frame hidden, |
| 300 |
borderline west={1.5mm}{-2mm}{gbforestgreen}, |
| 301 |
separator sign={\ $\blacktriangleright$},terminator sign={\ }, |
| 302 |
theorem style=plain,fonttitle=\bfseries\heiti,coltitle=gbforestgreen |
| 303 |
%fontupper=\normalsize,boxrule=0mm,arc=0mm,breakable, |
| 304 |
%coltitle=green!35!black,colbacktitle=green!15!white, |
| 305 |
%colback=green!50!yellow!15!white,terminator sign={\ } |
| 306 |
}{rfeg} |
| 307 |
%最后一个必须参数是prefix用来做label比如这里是rfeg:加上给出的标签名 |
| 308 |
|
| 309 |
|
| 310 |
%标题区命令设置 |
| 311 |
\newcommand{\titleformanual}[1]{\def\biaotiudf{#1}} |
| 312 |
\newcommand{\authorformanual}[1]{\def\zuozheudf{#1}} |
| 313 |
\newcommand{\dateformanual}[1]{\def\riqiudf{#1}} |
| 314 |
%\ifthenelse{\equal{\youwuudf}{\temp}}{true}{false} |
| 315 |
\def\temp{} |
| 316 |
\makeatletter |
| 317 |
\newcommand{\titleandauthor}{ |
| 318 |
\begin{center} |
| 319 |
\def\@makefnmark{\hbox{\@textsuperscript{\small\@thefnmark}}} |
| 320 |
{\setlength{\baselineskip}{40pt}\renewcommand{\thefootnote}{\fnsymbol{footnote}} |
| 321 |
\heiti{\zihao{-2}{\biaotiudf}}\par}% |
| 322 |
%注意这里\par要放在花括号内才有效 |
| 323 |
\setlength{\baselineskip}{0.1cm} |
| 324 |
\rule{0pt}{0.5cm}\par |
| 325 |
{\renewcommand{\thefootnote}{\arabic{footnote}} |
| 326 |
\kaishu{\zihao{4}{\zuozheudf}}\par} |
| 327 |
\rule{0pt}{0.3cm}\par |
| 328 |
{\songti{\zihao{-4}{\riqiudf}}\par} |
| 329 |
\end{center} |
| 330 |
} |
| 331 |
\makeatother |
| 332 |
%脚注的数字带圈使用gb7714-2015中的重定义实现 |
| 333 |
%\renewcommand{\thefootnote}{\textcircled{\tiny\arabic{footnote}}} |
| 334 |
|
| 335 |
|
| 336 |
%--------------列表环境--------------------------------------------- |
| 337 |
\usepackage[inline]{enumitem} %重设list环境 |
| 338 |
\setlist[enumerate]{label=\textbf{(\arabic*)},topsep=2pt,partopsep=0pt,parsep=0pt,% |
| 339 |
align=left,leftmargin=0em,itemsep=0.5em,labelwidth=0.1em,itemindent=2.6em,listparindent=2em}%label=$\triangleright$,itemindent=1em |
| 340 |
\setlist[itemize]{topsep=2pt,partopsep=0pt,parsep=0pt,% |
| 341 |
leftmargin=3em,itemindent=0em} |
| 342 |
\setlist[description]{font=\bfseries\textcolor{gblabelcolor},align=right,topsep=5pt,partopsep=0pt,parsep=0pt,% |
| 343 |
itemsep=0pt,leftmargin=0em,itemindent=0em}%注意,font或format中的最后一个命令自动提取标签为其参数 |
| 344 |
|
| 345 |
\usepackage{longtable} |
| 346 |
|
| 347 |
%自定义下划红线和背景颜色 |
| 348 |
\usepackage{ulem} |
| 349 |
\newcommand\yellowback{\bgroup\markoverwith |
| 350 |
{\textcolor{yellow}{\rule[-0.5ex]{2pt}{2.5ex}}}\ULon} |
| 351 |
\newcommand\reduline{\bgroup\markoverwith |
| 352 |
{\textcolor{red}{\rule[-0.5ex]{2pt}{0.4pt}}}\ULon} |
| 353 |
|
| 354 |
%一些字符串格式化命令 |
| 355 |
\newcommand*{\verbatimfont}{\ttfamily} |
| 356 |
\newrobustcmd*{\cnt}[1]{\mbox{\verbatimfont#1}} |
| 357 |
\newrobustcmd*{\bibfield}[1]{\mbox{\verbatimfont#1}} |
| 358 |
\newrobustcmd*{\opt}[1]{\mbox{\verbatimfont#1}} |
| 359 |
\newrobustcmd*{\prm}[1]{% |
| 360 |
\ifblank{#1} |
| 361 |
{} |
| 362 |
{\mbox{% |
| 363 |
\ensuremath\langle |
| 364 |
\normalfont\textit{#1}% |
| 365 |
\ensuremath\rangle}}} |
| 366 |
|
| 367 |
\usepackage{amssymb} |
| 368 |
|
| 369 |
\newcommand{\HandRight}{$\bigstar$} |
| 370 |
\newcommand{\zhongdian}[1]{\textcolor{gbemphcolor}{\HandRight\small\heiti#1}} |
| 371 |
\newcommand{\pz}[1]{%定义pz为旁注命令 |
| 372 |
\marginpar[\flushright\small\youyuan\color{gbemphcolor}\footnotesize #1]{\kaiti\color{gbemphcolor}\small #1}} |
| 373 |
\newcommand{\PZ}[1]{%定义pz为旁注命令 |
| 374 |
\marginpar[\flushright\small\youyuan\color{gbemphcolor}\footnotesize #1]{\kaiti\color{gbemphcolor}\small #1}} |
| 375 |
\newcommand{\qd}[1]{%定义qd为强调命令 |
| 376 |
\begin{quote} |
| 377 |
\fangsong\color{gbemphcolor}#1%blue!50!black\fangsong |
| 378 |
\end{quote}} |
| 379 |
\newcommand{\QD}[1]{%定义qd为强调命令 |
| 380 |
\begin{quote} |
| 381 |
\fangsong\color{gbemphcolor}#1 |
| 382 |
\end{quote}} |
| 383 |
|
| 384 |
\long\def\bc#1{%定义补充信息 |
| 385 |
{\kaiti\color{gbemphcolor}#1}} %orange,brown,purple,teal,gbblue,olive,cyan |
| 386 |
\long\def\BC#1{%定义补充信息 |
| 387 |
{\youyuan\color{gbemphcolor}#1}} |
| 388 |
\newcommand{\zd}[1]{%定义补充信息 |
| 389 |
{\kaiti\color{gbemphcolor}#1}} %orange,brown,purple,teal,gbblue,olive,cyan |
| 390 |
\newcommand{\ZD}[1]{%定义补充信息 |
| 391 |
{\kaiti\color{gbemphcolor}#1}} |
| 392 |
|
| 393 |
|
| 394 |
\newenvironment*{marglist} |
| 395 |
{\list{}{\setlength{\topsep}{0pt} |
| 396 |
\setlength{\partopsep}{0pt} |
| 397 |
\setlength{\itemsep}{0pt} |
| 398 |
\setlength{\parsep}{0pt} |
| 399 |
\setlength{\leftmargin}{0pt}% |
| 400 |
\setlength{\itemindent}{0pt}% |
| 401 |
\renewcommand*{\makelabel}[1]{\hss\llap{\footnotesize\color{gblabelcolor}\bfseries##1}}}} |
| 402 |
{\endlist} |
| 403 |
|
| 404 |
\makeatletter |
| 405 |
\newcommand{\updateinfo}[2][\@empty]{% |
| 406 |
\par\small\addvspace{2ex plus 1ex}% |
| 407 |
\noindent{\color{gblabelcolor}\rule{\linewidth}{2pt}} |
| 408 |
\vskip -\parskip |
| 409 |
\ifx\@empty#1 \begin{marglist} \item #2\end{marglist} |
| 410 |
\else \begin{marglist} \item[#1] #2\end{marglist} \fi} |
| 411 |
\makeatother |
| 412 |
|
| 413 |
%\usepackage{filecontents} |
| 414 |
|
| 415 |
%% 问答环境参考文献 |
| 416 |
%\NewDocumentEnvironment { reference } { } |
| 417 |
% { |
| 418 |
% \skip_vertical:n { 2 ex } |
| 419 |
% \small |
| 420 |
% \noindent \textsf{ 参考文献 } \marginpar { \raggedleft \faBook } |
| 421 |
% \enumerate [ topsep = 0pt ] |
| 422 |
% % \ignorespaces |
| 423 |
% } |
| 424 |
% { \endenumerate } |
| 425 |
% |
| 426 |
%\NewDocumentEnvironment { note } { } |
| 427 |
% { |
| 428 |
% \skip_vertical:n { 2 ex } |
| 429 |
% \small |
| 430 |
% \noindent \textsf{ 注意 } \marginpar { \raggedleft \faWarning } |
| 431 |
% \par |
| 432 |
% % \ignorespaces |
| 433 |
% } |
| 434 |
% { } |
| 435 |
|