regroup some stuff. outline future semantics in test document

This commit is contained in:
Maximilian Keßler 2022-01-17 03:13:46 +01:00
parent d609b54aac
commit 9768ba00ee
2 changed files with 92 additions and 25 deletions

View file

@ -19,6 +19,9 @@ __HEADER__(Grouping theorems for easier customization.)
\newcounter{insection}[section] \newcounter{insection}[section]
\newcounter{insubsection}[subsection] \newcounter{insubsection}[subsection]
\renewcommand\theinsection { \thesection.\arabic{insection} }
\newcommand\theinsubection { \thessubection.\arabic{insubsection} }
%%% LaTeX3 Wrappers around external commands %%% LaTeX3 Wrappers around external commands
@ -342,6 +345,7 @@ __HEADER__(Grouping theorems for easier customization.)
\clist_put_left:Nn \l_groupthm_group_clist { #1 } \clist_put_left:Nn \l_groupthm_group_clist { #1 }
} }
% envname, signature, definition, starred?
\cs_new:Npn \__new_theorem_variant_parser_aux:nnnn #1 #2 #3 #4 \cs_new:Npn \__new_theorem_variant_parser_aux:nnnn #1 #2 #3 #4
{ {
\exp_args:Nx\NewDocumentEnvironment \exp_args:Nx\NewDocumentEnvironment
@ -437,6 +441,13 @@ __HEADER__(Grouping theorems for easier customization.)
[ [
]{ all } ]{ all }
\NewTheoremGroup
[
thmtools = { numbered = no }
] { starred }
%%
\NewTheoremGroup \NewTheoremGroup
[ [
thmtools = { sibling = insection } thmtools = { sibling = insection }
@ -444,7 +455,7 @@ __HEADER__(Grouping theorems for easier customization.)
\NewTheoremGroup \NewTheoremGroup
[ [
postname = { $\dagger$ }, postname = { $^{\dagger}$ },
thmtools = { sibling = insubsection } thmtools = { sibling = insubsection }
] { dagger } ] { dagger }
@ -459,10 +470,6 @@ __HEADER__(Grouping theorems for easier customization.)
postname = { * }, postname = { * },
] { star } ] { star }
\NewTheoremGroup
[
thmtools = { numbered = no }
] { starred }
\DeclareTheoremGroupRule { big } { incompatible-error } { small } \DeclareTheoremGroupRule { big } { incompatible-error } { small }
@ -475,5 +482,3 @@ __HEADER__(Grouping theorems for easier customization.)
\DeclareTheoremGroupRule { starred } { higher } { small } \DeclareTheoremGroupRule { starred } { higher } { small }
\DeclareTheoremGroupRule { starred } { higher } { dagger } \DeclareTheoremGroupRule { starred } { higher } { dagger }
\DeclareTheoremGroupRule { starred } { higher } { star } \DeclareTheoremGroupRule { starred } { higher } { star }
\DeclareTheoremGroupRule { starred } { higher } { starred}

View file

@ -1,34 +1,27 @@
\documentclass{article} \documentclass{article}
\usepackage[enable-debug]{expl3} \usepackage[enable-debug]{expl3}
\usepackage[default styles]{mkessler-thmstyle}
\ExplSyntaxOn \ExplSyntaxOn
\debug_on:n { all } \debug_on:n { all }
\ExplSyntaxOff \ExplSyntaxOff
\usepackage[default styles]{mkessler-thmstyle}
\usepackage{mkessler-groupthm} \usepackage{mkessler-groupthm}
\usepackage[ ]{verbatim}
\mdfdefinestyle{green}{
linecolor=green,
linewidth = 2pt,
leftmargin = 0cm,
rightmargin=0cm,
rightline=false,
topline=false,
bottomline=false
}
\declaretheoremstyle[
mdframed={style=green}
]{green}
\GenerateTheoremVariants \GenerateTheoremVariants
[ [
group = {star, dagger}, group = {star, dagger},
thmtools = { style = thmgreenmargin } thmtools = { style = thmgreenmargin },
name = Beispiel
]{example} ]{example}
\GenerateTheoremVariants
[
group = {star, dagger},
thmtools = { style = thmorangemarginandfill }
]{lemma}
\DeclareTheoremVariants{example} { !s !t+ } \DeclareTheoremVariants{example} { !s !t+ }
{ {
\IfBooleanT{#1} \IfBooleanT{#1}
@ -41,8 +34,21 @@
} }
} }
\DeclareTheoremVariants{lemma} { !s !t+ }
{
\IfBooleanT{#1}
{
\AddTheoremToGroup { star }
}
\IfBooleanT{#2}
{
\AddTheoremToGroup { dagger }
}
}
\begin{document} \begin{document}
\section{a}
\begin{example} \begin{example}
test test
@ -56,6 +62,8 @@
test test
\end{example} \end{example}
\section{b}
\begin{example}*+ \begin{example}*+
test test
\end{example} \end{example}
@ -64,5 +72,59 @@
test test
\end{example*} \end{example*}
\begin{lemma}+
test
\end{lemma}
\begin{verbatim}
\NewTheoremGroup[keys]{name}
\ProvideTheoremGroup
\RenewTheoremGroup
\DeclareTheoremGroup
\AppendToTheoremGroup[keys]{name}[before / after ? ]
\NewTheoremFamily
\ProvideTheoremFamily
\DeclareTheoremFamilyOptions
\ProvideTheoremFamilyOptions
\RenewTheoremFamilyOptions
\NewTheoremFamilyOptions
\AddTheoremGroupParent{child}{parent}
\NewTheorem -> starred + unstarred family + options
\ProvideTheorem
\NewFancyTheoremFamily[mdframed = , group, name, thmtools, style = ] wrapped \NewTheoremFamily
\DeclareStandardTheoremFamilyOptions
\ProvideStandardTheoremFamilyOptions
\NewStandardTheoremFamilyOptions
\RenewStandardTheoremFamilyOptions
\NewFancyTheorem[mdframed =, thmtools = , name = , group = ]{name}
\end{verbatim}
\section{TODO}
\begin{itemize}
\item style = parsen
\end{itemize}
\begin{verbatim}
\usepackage
[
big = { document, section, subsection, no },
small = { document, section, subsection, no },
tiny = { document, section, subsection, no },
notheorems
] { fancythm }
\end{verbatim}
\end{document} \end{document}