|
1 | 1 | % safe参数解决与\!在内的多个冲突 |
2 | 2 | % \sups命令可能被重定义,xeCJK放在tipa后 |
3 | 3 | \RequirePackage[safe]{tipa} |
| 4 | + |
4 | 5 | \documentclass[a4paper, zihao=-4, linespread=1]{ctexrep} |
5 | 6 | \usepackage{amsmath} |
6 | | - \xeCJKsetup{CJKmath=true} |
7 | 7 | \renewcommand{\CTEXthechapter}{\thechapter} |
8 | 8 | % 最小行间间距设定 |
9 | 9 | \setlength{\lineskiplimit}{3pt} |
10 | 10 | \setlength{\lineskip}{3pt} |
11 | 11 |
|
12 | 12 | % 中文支持 |
13 | | -% \iffalse与\fi可以实现“多行注释” |
14 | | -\iffalse |
15 | | -\usepackage[slantfont,boldfont]{xeCJK} |
16 | | - \setCJKmainfont[BoldFont=SimHei,ItalicFont=KaiTi]{SimSun} |
17 | | - \setCJKmathfont{STXinwei} |
18 | | -\usepackage{indentfirst} |
19 | | -\fi |
20 | | -\setCJKmathfont{KaiTi} |
21 | | -\newCJKfontfamily[zhxinwei]\xinwei{STXinwei} |
| 13 | +\setCJKmainfont[BoldFont=SourceHanSerifCN-Bold.otf]{SourceHanSerifCN-Regular.otf} |
| 14 | + \xeCJKsetup{CJKmath=true} |
| 15 | + \setCJKmathfont{KaiTi} % 数学环境中使用楷体 |
| 16 | +\newCJKfontfamily[zhxinwei]\xinwei{STXinwei} % 定义新字体 |
22 | 17 |
|
| 18 | +% 颜色 |
23 | 19 | \usepackage[table]{xcolor} |
24 | 20 | \newcommand{\scol}[1]{\colorbox{#1}{\rule{0em}{1ex}}\,#1} |
| 21 | + |
25 | 22 | % 首字下沉 |
26 | 23 | \usepackage{lettrine} |
| 24 | + |
27 | 25 | % 分栏 |
28 | 26 | \usepackage{multicol} |
29 | | -\setlength{\columnsep}{20pt} |
30 | | -\setlength{\columnseprule}{0.4pt} |
| 27 | + \setlength{\columnsep}{20pt} |
| 28 | + \setlength{\columnseprule}{0.4pt} |
31 | 29 |
|
32 | 30 | % 数学环境 |
33 | 31 | \newcommand{\ue}{\mathrm{e}} |
34 | | - \newcommand{\ud}{\mathop{}\negthinspace\mathrm{d}} |
| 32 | + \newcommand{\ud}{\mathop{}\negthinspace\mathrm{d}} % 微分号 |
35 | 33 | \usepackage{amssymb} |
36 | 34 | \usepackage{mathrsfs} % 线性代数字体 |
37 | | - % overline的替代命令 |
| 35 | +% overline的替代命令 |
38 | 36 | \newcommand{\closure}[2][3]{{}\mkern#1mu\overline{\mkern-#1mu#2}} |
39 | | -\usepackage{yhmath} % \wideparen命令 |
| 37 | +\usepackage{yhmath} % \wideparen命令:弧AB |
40 | 38 | \usepackage{mathdots} % 数学省略号 |
41 | 39 | \usepackage{mathtools} % dcases环境,prescript命令 |
42 | 40 | \usepackage{amsthm} % 定理环境 |
43 | 41 | \theoremstyle{definition}\newtheorem{laws}{Law}[section] |
44 | 42 | \theoremstyle{plain}\newtheorem{ju}[laws]{Jury} |
45 | 43 | \theoremstyle{remark}\newtheorem*{marg}{Margaret} |
46 | 44 | \usepackage{esint} % 多重积分,需放在amsmath后 |
47 | | -% 中括号类二项式 |
| 45 | +% 箭头与长等号 |
| 46 | +\usepackage{extarrows} |
| 47 | +% 中括号的类二项式命令 |
48 | 48 | \newcommand{\Bfrac}[2]{\genfrac{[}{]}{0pt}{}{#1}{#2}} |
49 | 49 |
|
50 | 50 | % 下划线宏包 |
51 | | -\usepackage{ulem} |
| 51 | +\usepackage[normalem]{ulem} |
52 | 52 | % LaTeX符号宏包 |
53 | 53 | \usepackage{hologo} |
54 | 54 | \newcommand{\xelatex}{\Hologo{XeLaTeX}} |
|
66 | 66 | \usepackage{lastpage} |
67 | 67 |
|
68 | 68 | % 奇怪的小定义 |
69 | | -\newcommand{\dpar}{\\ \mbox{}} % 空两行 |
70 | | -\newcommand{\qd}[1]{{\bfseries{#1}}} % 强调 |
71 | | -\newcommand{\co}[1]{{\bfseries{#1}}} % Style of concept |
| 69 | +\newcommand{\dpar}{\\ \mbox{}} % 空两行 |
| 70 | +\newcommand{\qd}[1]{{\bfseries{#1}}} % 强调 |
| 71 | +\newcommand{\co}[1]{{\bfseries{#1}}} % Style of concept |
72 | 72 | \newcommand{\RED}[1]{{\color{cyan}{#1}}} |
73 | 73 | \newcommand{\cmmd}[1]{\fbox{\texttt{\char92{}#1}}} |
74 | 74 | \newcommand{\charef}[1]{第\ref{#1}章} |
|
124 | 124 | {\fontsize{60}{60}\selectfont\thechapter}} |
125 | 125 | \titleformat{\chapter}[block]{\hfill\LARGE\sffamily}{}{0pt}{\chaformat}[\vspace{2.5pc}\normalsize |
126 | 126 | \startcontents\setlength{\lineskiplimit}{0pt}\printcontents{}{1}{\setcounter{tocdepth}{2}\songti}] |
127 | | -%\titleclass{\section}{top} |
128 | | -%\titleformat{\section}{\Large\bfseries}{\thesection}{0.5em}{} |
129 | 127 | \titleformat*{\section}{\centering\Large\bfseries} |
130 | 128 | \titleformat{\subsubsection}[hang]{\bfseries\large}{\rule{1.5ex}{1.5ex}}{0.5em}{} |
131 | 129 | % 扩展章节 |
|
153 | 151 | \usepackage{caption,subcaption} |
154 | 152 | \captionsetup[sub]{labelformat=simple} |
155 | 153 | \renewcommand{\thesubtable}{(\alph{subtable})} |
| 154 | +% 三线表 |
| 155 | +\usepackage{booktabs} |
| 156 | + |
156 | 157 | % 页面修正宏包 |
157 | 158 | \usepackage{geometry} |
158 | | -\geometry{vmargin = 1in} |
| 159 | + \geometry{vmargin = 1in} |
159 | 160 |
|
160 | | -% 代码环境(ver1.4以前的,For TikZ) |
| 161 | +% 代码环境 |
161 | 162 | \usepackage{listings} |
162 | | -% Avoid copy line numbers of the listing code (Invalid for SumatraPDF Reader) |
| 163 | +% 复制代码时不复制行号 |
163 | 164 | \usepackage{accsupp} |
164 | 165 | \newcommand{\emptyaccsupp}[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}} |
165 | | - |
166 | | -% 代码环境(ver1.4以后的,For LaTeX source code) |
167 | 166 | \usepackage{tcolorbox} |
168 | 167 | \tcbuselibrary{listings,skins,breakable} |
169 | 168 |
|
|
216 | 215 | emptylines=1,escapeinside=``} |
217 | 216 | } |
218 | 217 |
|
219 | | -% Color |
220 | | -% \definecolor{commentcolor}{RGB}{85,139,78} |
221 | | -% \definecolor{numbercolor}{RGB}{166,206,168} |
222 | | -% \definecolor{stringcolor}{RGB}{206,145,108} |
223 | | -% \definecolor{keywordcolor}{RGB}{34,34,250} |
224 | | -% \definecolor{backcolor}{RGB}{220,220,220} |
225 | | -% \definecolor{packagecolor}{RGB}{0,128,0} |
226 | | -% \definecolor{envicolor}{RGB}{185,70,15} |
227 | | -
|
228 | | -
|
229 | | -% LaTeX Code Style |
230 | | -%\lstset{language=[LaTeX]TeX, |
231 | | -% basicstyle=\small\ttfamily, |
232 | | -% commentstyle=\color{commentcolor}, |
233 | | -% keywordstyle=\color{keywordcolor}, |
234 | | -% stringstyle=\color{stringcolor}, |
235 | | -% showstringspaces=false, |
236 | | -% % Package/Tikz-Lib Using |
237 | | -% classoffset=0, |
238 | | -% morekeywords={begin,end,usetikzlibrary}, |
239 | | -% keywordstyle=\color{keywordcolor}, |
240 | | -% classoffset=1, |
241 | | -% morekeywords={article,report,book, |
242 | | -% xeCJK,tikz, |
243 | | -% calc}, |
244 | | -% keywordstyle=\color{packagecolor}, |
245 | | -% classoffset=2, |
246 | | -% morekeywords={document,tikzpicture}, |
247 | | -% keywordstyle=\color{envicolor}, |
248 | | -% % Line Number Style |
249 | | -% numbers=left, |
250 | | -% numberstyle=\tiny\emptyaccsupp, |
251 | | -% stepnumber=1, |
252 | | -% % Frame and Background Color |
253 | | -% frame=single, |
254 | | -% framerule=0pt, |
255 | | -% backgroundcolor=\color{backcolor}, |
256 | | -% % Spaces |
257 | | -% % belowskip=\medskipamount, |
258 | | -% emptylines=1, |
259 | | -% escapeinside=``} |
260 | | -
|
261 | | -%\lstnewenvironment{latex}[1]{\lstset{#1}}{} |
262 | | -%\newcommand{\latexline}[1]{{\lstinline[language=TeX,basicstyle=\small\ttfamily]{#1}}} |
263 | | -
|
264 | 218 | % Tikz Code |
265 | 219 | \lstdefinelanguage{tikzlang}{ |
266 | 220 | classoffset=0, % 蓝色的keyword |
|
301 | 255 | % 行号 |
302 | 256 | \usepackage{lineno} |
303 | 257 |
|
304 | | -% 代码输入环境 |
305 | | -%\usepackage{verbatim,xcolor} |
306 | | -%\newbox\savedlines |
307 | | -%\newtoks\savedtokens |
308 | | -%\makeatletter |
309 | | -%\def\codeshow{% |
310 | | -%\global\savedtokens={}% |
311 | | -%\def\verbatim@processline{% |
312 | | -%{\setbox0=\hbox{\the\verbatim@line}% |
313 | | -%\hsize=\wd0 |
314 | | -%\the\verbatim@line\par}% |
315 | | -%\global\savedtokens=\expandafter{\the\expandafter\savedtokens\the\verbatim@line^^J}}% |
316 | | -%\@tempswatrue |
317 | | -%\setbox0=\vbox\bgroup\parskip=0pt\topsep=0pt\partopsep=0pt |
318 | | -%\verbatim} |
319 | | -%\def\endcodeshow{\endverbatim% |
320 | | -%\unskip\setbox0=\lastbox\egroup |
321 | | -%\global\setbox\savedlines=\box0 |
322 | | -%\addvspace{1em}\par\noindent% |
323 | | -%\colorbox{lightgray}{% |
324 | | -%\begin{minipage}{.55\textwidth}{\usebox\savedlines}\end{minipage}}% |
325 | | -%\hfill\fbox{\parbox{.40\textwidth}% |
326 | | -%{\scantokens\expandafter{\the\savedtokens\unskip\endinput}}}% |
327 | | -%\par\addvspace{1em}} |
328 | | -%\makeatother |
329 | | -
|
330 | | -\usepackage{booktabs} |
331 | | -
|
332 | 258 | % 索引与参考文献 |
333 | 259 | \usepackage{imakeidx} |
334 | 260 | \newcommand{\tikzidx}[1]{\index{\char`\\ #1}} |
|
342 | 268 | \usepackage[numindex,numbib]{tocbibind} |
343 | 269 | \usepackage[square,super,sort&compress]{natbib} |
344 | 270 |
|
345 | | -% 为了自动补全支持 |
346 | | -\iffalse |
347 | | - \newcommand{\envi}[1]{def} |
348 | | - \newcommand{\latexline}[1]{def} |
349 | | - \newenvironment{codeshow}{begdef}{enddef} |
350 | | - \newenvironment{codeshowabove}{begdef}{enddef} |
351 | | - \newcommand{\pkg}[1]{这几行实质被注释,只为自动补全支持} |
352 | | -\fi |
353 | | -
|
354 | 271 | % 引用 |
355 | 272 | \usepackage{hyperref} |
356 | 273 | \hypersetup{colorlinks, bookmarksopen = true, bookmarksnumbered = true, pdftitle=LaTeX-cn, pdfauthor=K.L Wu, pdfstartview=FitH} |
0 commit comments