From 9cb5f5ed2f3bd69bc6b0cd4c9696346bae4a41a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 16 Jan 2022 22:41:36 +0100 Subject: [PATCH] add new theorem variant parser command --- src/environments/groupthm.pysty3 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/environments/groupthm.pysty3 b/src/environments/groupthm.pysty3 index 7f86396..c47dee9 100644 --- a/src/environments/groupthm.pysty3 +++ b/src/environments/groupthm.pysty3 @@ -348,6 +348,23 @@ __HEADER__(Grouping theorems for easier customization.) } } +\cs_new:Npn \new_theorem_variant_parser:nnn #1 #2 #3 +{ + \NewDocumentEnvironment{#1}{#2} + { + \clist_clear:N \l_groupthm_groups_clist + #3 + \__sort_group_names: + \begin{__#1__groups_\clist_use:Nn \l_groupthm_groups_clist{_}} + } + { + \clist_clear:N \l_groupthm_groups_clist + #3 + \__sort_group_names: + \end{__#1__groups_\clist_use:Nn \l_groupthm_groups_clist{_}} + } +} + % envname, name, thmtools \cs_new:Npn \declare_theorem_variants:nnn #1 #2 #3 {