-
Notifications
You must be signed in to change notification settings - Fork 25
/
cmd-env.tex
76 lines (64 loc) · 2.42 KB
/
cmd-env.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
%修改 proof 证明环境
\makeatletter
\renewcommand\proofname{证明}
\renewenvironment{proof}[1][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@ \labelsep1em\relax
\trivlist
\item[\hskip\labelsep\indent
\bfseries #1]\ignorespaces
}{%
\popQED\endtrivlist\@endpefalse
}
\makeatother
% 例题环境
\newcounter{example}[section]
\renewcommand{\theexample}{\thesection.\arabic{example}}
\newenvironment{example}[1][]{\refstepcounter{example} \textbf{例 \theexample \ #1} \hspace{0.5em}}{\hspace{\stretch{1}} \rule{1ex}{1ex}}
% 习题环境
\newcounter{exercise}[section]
\renewcommand{\theexercise}{\thesection.\arabic{exercise}}
\newenvironment{exercise}[1][]{\refstepcounter{exercise} \textbf{题 \theexercise \ #1} \hspace{0.5em}}{\hspace{\stretch{1}} \rule{1ex}{1ex}}
\newcommand{\exerciseFrom}[1][]{\textbf{题目出处}\hspace{1em}#1}
\newcommand{\exerciseSolvedDate}[1][]{\textbf{解答日期}\hspace{1em}#1}
\newenvironment{exerciseAdditional}{\textbf{补充说明}\hspace{1em}}{}
\newtheorem{definition}{定义}[section]
\newtheorem{property}{性质}[section]
\newtheorem{theorem}{定理}[section]
\newtheorem{inference}{推论}[section]
\newtheorem{axiom}{公理}[section]
\newtheorem{lemma}{引理}[section]
\newtheorem{principle}{原理}[section]
%\newtheorem{exercise}{题目}[section]
\newtheorem{topic}{问题}[section]
\newtheorem{statement}{命题}[section]
% \newtheorem{example}{例}[section]
% 使公式编号与章节关联,命令由 amsmath 宏包提供
\numberwithin{equation}{section}
% 配合 \autoref 命令使引用不只引用编号,也能引用环境命名,如: 定理 3.2.5,来自 hyperref 宏包。
%\newcommand\equationautorefname{式}
%\newcommand\footnoteautorefname{脚注}%
%\newcommand\itemautorefname{项}
\def\figureautorefname{图}
\def\tableautorefname{表}
\def\chapterautorefname{章}
\def\sectionautorefname{节}
\def\subsectionautorefname{小节}
\def\appendixautorefname{附录}
\def\propertyautorefname{性质}
\def\theoremautorefname{定理}
\def\definitionautorefname{定义}
\def\inferenceautorefname{推论}
\def\axiomautorefname{公理}
\def\lemmaautorefname{引理}
\def\principleautorefname{原理}
\def\exerciseautorefname{题目}
\def\topicautorefname{问题}
\def\statementautorefname{命题}
\def\exampleautorefname{例}
\def\equationautorefname{式}
\newcommand{\pair}[2]{\langle #1, #2 \rangle}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "elementary-math-note"
%%% End: