-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmath.sty
106 lines (90 loc) · 2.72 KB
/
math.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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
% Original author = Kim Marriott
% Fetched from Martin Odersky, Nov 1993
% Many revisions and additions, J. Maraist, Nov 1993-
%
% .sty for math environments
% example - examples
% lemma - lemmas
% prop - propositions
% theorem - theorems
% cor - corollaries
% defn - definitions
% mathitem - general structure of the above.
% Takes one argument, the name of the structure,
% e.g. \begin{mathitem}{Convention}
% namedmathitem - like a mathitem, but with a given name
% rather than a number for a label.
% e.g. \begin{namedmathitem}{Theorem}{FD}
% proof - proofs
% Definitions and proofs are unnumbered,
% examples have their own counter, and the other environments share a counter.
%
\newcounter{Example}[section]
\newcounter{result}[section]
\def\example{
\def\theresult{Example~\thesection.\arabic{result}}
\refstepcounter{result}
\trivlist\item[\hskip
\labelsep{\bf \theresult}]}
\def\endexample{\endtrivlist}
\def\lemmatwo{
\def\theresult{Lemma~\thesection.\arabic{result}}
\refstepcounter{result}
\trivlist\item[\hskip
\labelsep{\bf \theresult}]}
\def\endlemmatwo{\endtrivlist}
\def\proptwo{
\def\theresult{Proposition~\thesection.\arabic{result}}
\refstepcounter{result}
\trivlist\item[\hskip
\labelsep{\bf \theresult}]}
\def\endproptwo{\endtrivlist}
\def\theoremtwo{
\def\theresult{Theorem~\thesection.\arabic{result}}
\refstepcounter{result}
\trivlist\item[\hskip
\labelsep{\bf \theresult}]}
\def\endtheoremtwo{\endtrivlist}
\def\cor{
\def\theresult{Corollary~\thesection.\arabic{result}}
\refstepcounter{result}
\trivlist\item[\hskip
\labelsep{\bf \theresult}]}
\def\endcor{\endtrivlist}
\def\definitiontwo{
\def\theresult{Definition~\thesection.\arabic{result}}
\refstepcounter{result}
\trivlist\item[\hskip
\labelsep{\bf \theresult}]}
\def\enddefinitiontwo{\endtrivlist}
% \def\defntwo{
% \trivlist\item[\hskip
% \labelsep{\bf Definition.}]}
% \def\enddef{\endtrivlist}
% \def\enddefntwo{\endtrivlist}
\newenvironment{mathitem}[1]%
{ \def\theresult{#1~\thesection.\arabic{result}}%
\refstepcounter{result}%
\trivlist\item[\hskip%
\labelsep{\bf\theresult}]%
}%
{\endtrivlist}
\newenvironment{namedmathitem}[2]%{Type}{Name}
{ \def\theresult{#2}%
\addtocounter{result}{-1}%
\refstepcounter{result}%
\trivlist\item[\hskip%
\labelsep{\bf #1:\ {\boldmath #2}.}]%
}%
{\endtrivlist}
\def\prooftwo{
\trivlist\item[\hskip
\labelsep{\em Proof:}]}
\def\endprooftwo{$\Box$ \endtrivlist}
\def\proofsketch{
\trivlist\item[\hskip
\labelsep{\em Proof Sketch:}]}
\def\endproofsketch{$\Box$ \endtrivlist}
\def\prooftwo{{\em Proof:}}
\def\endprooftwo{}
\def\DoProof{{\bf To Be Proven}. $\Box$}