From b934e14708dde33b5024d5ee90d2cc5b91d6b742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Fri, 21 Jan 2022 14:05:29 +0100 Subject: [PATCH] introduce clist to save parents for group --- doc/environments/groupthm/groupthm.dtx | 13 ++++++++++++- doc/environments/groupthm/groupthm.sty | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/environments/groupthm/groupthm.dtx b/doc/environments/groupthm/groupthm.dtx index ced8cfd..8f53e02 100644 --- a/doc/environments/groupthm/groupthm.dtx +++ b/doc/environments/groupthm/groupthm.dtx @@ -1415,7 +1415,13 @@ % \begin{macrocode} \@@_add_to_group_ordering:n { #1 } % \end{macrocode} -% +% \begin{variable}{ \g_@@_parents_group__\meta{theorem group}__clist } +% +% This variable will accumulate the parents of this group: +% \begin{macrocode} + \clist_new:c { g_@@_parents_group__#1__clist } +% \end{macrocode} +% \end{variable} % Add defined group to corresponding list % % \begin{macrocode} @@ -1459,6 +1465,11 @@ % \begin{macrocode} \clist_gremove_all:Nn \g_@@_defined_groups_clist { #1 } % \end{macrocode} +% +% Delete the known parents of this group: +% \begin{macrocode} + \cs_undefine:c { g_@@_parents_group__#1__clist } +% \end{macrocode} % % Now, unset all relations with all defined theorem groups in the internal hooks. % diff --git a/doc/environments/groupthm/groupthm.sty b/doc/environments/groupthm/groupthm.sty index 324416f..349a4af 100644 --- a/doc/environments/groupthm/groupthm.sty +++ b/doc/environments/groupthm/groupthm.sty @@ -183,6 +183,7 @@ } } \__groupthm_add_to_group_ordering:n { #1 } + \clist_new:c { g__groupthm_parents_group__#1__clist } \clist_gput_left:Nn \g__groupthm_defined_groups_clist { #1 } } \cs_new:Npn \__groupthm_undefine_group:n #1 @@ -194,6 +195,7 @@ \hook_gremove_code:nn { __groupthm/mapname } { #1 } \hook_gremove_code:nn { __groupthm/thmtools } { #1 } \clist_gremove_all:Nn \g__groupthm_defined_groups_clist { #1 } + \cs_undefine:c { g__groupthm_parents_group__#1__clist } \__groupthm_hook_gset_rule_foreach:nNnn { ?? } \g__groupthm_defined_groups_clist