-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpreamble.tex
More file actions
84 lines (75 loc) · 2.03 KB
/
preamble.tex
File metadata and controls
84 lines (75 loc) · 2.03 KB
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
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{graphbox}
\usepackage{float}
\usepackage{etoolbox}
\makeatletter
\newcounter{savechapter}
\newcounter{apdxchapter}
\renewcommand\appendix{\par
\setcounter{savechapter}{\value{chapter}}%
\setcounter{chapter}{\value{apdxchapter}}%
\setcounter{section}{0}%
\ctexset{
chapter/name={附录},
chapter/number=\Alph{chapter}
}
}
\newcommand\unappendix{\par
\setcounter{apdxchapter}{\value{chapter}}%
\setcounter{chapter}{\value{savechapter}}%
\setcounter{section}{0}%
\ctexset{
chapter/name={第,章},
chapter/number=\chinese{chapter}
}
}
\makeatother
\lstset{basicstyle=\footnotesize\ttfamily,breaklines=true}
\ifcase\rendermode
\or % 1
\usepackage[a4paper, left=2cm, right=2cm, top=0.5cm, bottom=0.5cm]{geometry}
\or % 2
\or % 3
\usepackage[a4paper, left=2cm, right=2cm, top=0.5cm, bottom=0.5cm]{geometry}
\fi
\usepackage{adjustbox}
\adjustboxset{scale=0.666667, max width=\linewidth}
\usepackage[colorlinks]{hyperref}
\hypersetup{
unicode=true,
pdfencoding=unicode,
bookmarksdepth=5,
}
\pdfstringdefDisableCommands{
\def\myind#1{#1}
}
\if\rendermode2
\usepackage{imakeidx}
\makeindex
\NewDocumentCommand{\myind}{m}{#1\index{#1}}
\else
\NewDocumentCommand{\myind}{m}{#1}
\fi
\usepackage{seqsplit}
\newcommand{\trvar}[1]{\texttt{\seqsplit{#1}}}
\input{preambles/unicode}
\input{preambles/skin}
\input{preambles/envs}
\input{preambles/temps}
\input{preambles/schematic}
\input{preambles/terms}
\input{preambles/listing}
\renewcommand{\figureautorefname}{图}
\renewcommand{\tableautorefname}{表}
\renewcommand{\sectionautorefname}{节}
\renewcommand{\subsectionautorefname}{小节}
\renewcommand{\chapterautorefname}{章}
\renewcommand{\algorithmautorefname}{算法}
\renewcommand{\algorithmcfname}{算法}
\newcommand{\probautorefname}{例题}
\renewcommand\thesubfigure{(\alph{subfigure})}
\newcommand{\subfigureautorefname}{\figureautorefname}
\renewcommand\thesubtable{(\alph{subtable})}
\newcommand{\subtableautorefname}{\tableautorefname}