-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschoolthm.sty
51 lines (44 loc) · 1.39 KB
/
schoolthm.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{schoolthm}[2020/08/09 v0.1 (G Sokolov)]
\PackageInfo{schoolthm}{Additional theorem-like styles.}
\RequirePackage{amsmath}
\RequirePackage{amsthm}
% Theorems.
\newtheorem{lemma}{Lemma}
\newtheorem*{lemma*}{Lemma}
\newtheorem{theorem}{Theorem}
\newtheorem*{theorem*}{Theorem}
\newtheorem{corollary}{Corollary}
\newtheorem*{corollary*}{Corollary}
\newtheorem{proposition}{Proposition}
\newtheorem*{proposition*}{Proposition}
\newtheorem{assumption}{Assumption}
\newtheorem*{assumption*}{Assumption}
\newtheorem{definition}{Definition}
\newtheorem*{definition*}{Definition}
% More.
\newtheorem*{remark*}{Remark}
\newtheorem*{terminology*}{Terminology}
\newtheorem*{notation*}{Notation}
\newtheorem*{convention*}{Convention}
\newenvironment{example*}
{\paragraph*{Example.}\begin{itemize}\item[]}
{\end{itemize}}
\newenvironment{exercise*}
{\paragraph*{Exercise.}\begin{itemize}\item[]}
{\end{itemize}}
\newenvironment{algorithm*}
{\paragraph*{Algorithm.}\begin{itemize}\item[]}
{\end{itemize}}
% https://tex.stackexchange.com/questions/53978/custom-theorem-numbering
\newtheorem{innercustomgeneric}{\customgenericname}
\providecommand{\customgenericname}{}
\newcommand{\newcustomtheorem}[2]{%
\newenvironment{#1}[1]
{%
\renewcommand\customgenericname{#2}%
\renewcommand\theinnercustomgeneric{##1}%
\innercustomgeneric
}
{\endinnercustomgeneric}
}