latex-packages/tests/environments/groupthm/test3.tex

69 lines
1.1 KiB
TeX

\documentclass{article}
\usepackage[enable-debug]{expl3}
\usepackage{groupthm}
\ExplSyntaxOn
\AppendToTheoremGroup[prefix = n]{all}
\AppendToTheoremGroup[suffix = n]{all}
\DeclareTheoremGroupRule[suffix]{all}{higher}{dagger}
\DeclareTheoremGroupRule[suffix]{all}{higher}{star}
\NewTheoremGroup [ suffix = { * } ] { star }
\NewTheoremGroup [ suffix = { $^{\dagger}$ } ] { dagger }
\NewGroupedTheorem*[group = {star, dagger} ]{theorem}
\NewGroupedTheoremFamily[ group = { dagger, star }, starred ~ version = false] {example}
\NewGroupedTheoremFamilyOptions{example} { s t+ }
{
\IfBooleanT { #1 }
{
\AddTheoremToGroup { star }
}
\IfBooleanT { #2 }
{
\AddTheoremToGroup { dagger }
}
}
\RenewGroupedTheoremFamilyOptions{example} { s t+ } {}
\ExplSyntaxOff
\begin{document}
\begin{theorem}
test
\end{theorem}
\begin{theorem*}
test
\end{theorem*}
\begin{example}
test
\end{example}
\begin{example}*+
test
\end{example}
\begin{example}*
\end{example}
\begin{example}+
test
\end{example}
\end{document}