summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/stex/tex/etc/stexthm.sty
blob: 5f2071c4feabbf667b6a2c0e3d3708ad66d6396d (plain)
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
\ProvidesExplPackage{stexthm}{2022/02/24}{3.0.0}{Default Typesetting for sTeX Statements}

\RequirePackage{stex}
\RequirePackage{amsthm}
\RequirePackage{thmtools}

\declaretheorem[parent=section]{theorem}
\stexpatchassertion[theorem]
{\ifx\sassertiontitle\@empty\begin{theorem}\else\begin{theorem}[\sassertiontitle]\fi}
{\end{theorem}}    

\declaretheorem[sibling=theorem]{observation}
\stexpatchassertion[observation]
{\ifx\sassertiontitle\@empty\begin{observation}\else\begin{observation}[\sassertiontitle]\fi}
{\end{observation}}

\declaretheorem[sibling=theorem]{corollary}
\stexpatchassertion[corollary]
{\ifx\sassertiontitle\@empty\begin{corollary}\else\begin{corollary}[\sassertiontitle]\fi}
{\end{corollary}}

\declaretheorem[sibling=theorem]{lemma}
\stexpatchassertion[lemma]
{\ifx\sassertiontitle\@empty\begin{lemma}\else\begin{lemma}[\sassertiontitle]\fi}
{\end{lemma}}
  
\declaretheorem[sibling=theorem]{axiom}
\stexpatchassertion[axiom]
{\ifx\sassertiontitle\@empty\begin{axiom}[type=axiom]\else\begin{axiom}[type=axiom,\sassertiontitle]\fi}
{\end{axiom}}

\declaretheorem[sibling=theorem,style=remark]{remark}
\stexpatchassertion[remark]
{\ifx\sassertiontitle\@empty\begin{remark}\else\begin{remark}[\sassertiontitle]\fi}
{\end{remark}}

\declaretheorem[sibling=theorem,style=definition]{example}
\stexpatchexample
{\ifx\sexampletitle\@empty\begin{example}\else\begin{example}[\sexampletitle]\fi}
{\end{example}}

\declaretheorem[sibling=theorem,style=definition]{definition}
\stexpatchdefinition
{\ifx\sdefinitiontitle\@empty\begin{definition}\else\begin{definition}[\sdefinitiontitle]\fi}
    {\end{definition}}