some debugging

This commit is contained in:
Maximilian Keßler 2022-01-16 23:55:29 +01:00
parent 9d5a257aed
commit 22b3e2352f

View file

@ -62,8 +62,7 @@ __HEADER__(Grouping theorems for easier customization.)
\clist_new:N \l_groupthm_group_clist \clist_new:N \l_groupthm_group_clist
\str_new:N \g_groupthm_last_theorem_group_str \clist_new:N \g_groupthm_defined_theorem_groups_clist
%%% Keys %%% Keys
@ -91,8 +90,6 @@ __HEADER__(Grouping theorems for easier customization.)
} }
% groupname, prename, postname, mapname, thmtools % groupname, prename, postname, mapname, thmtools
\cs_new:Npn \new_theorem_group:nnnnn #1#2#3#4#5 \cs_new:Npn \new_theorem_group:nnnnn #1#2#3#4#5
{ {
@ -115,13 +112,17 @@ __HEADER__(Grouping theorems for easier customization.)
\clist_put_right:Nn \l_groupthm_thmtools_clist { #5 } \clist_put_right:Nn \l_groupthm_thmtools_clist { #5 }
} }
} }
\hook_gset_rule:nnnn { groupthm / groupsort }
\g_groupthm_last_theorem_group_str \cs_set:Npn \help:n ##1 {
{ before } \hook_gset_rule:nnnn { groupthm / groupsort }
{ { #1 }
#1 { before }
{ ##1 }
} }
\str_gset:Nn \g_groupthm_last_theorem_group_str { #1 }
\clist_map_function:NN \g_groupthm_defined_theorem_groups_clist \help:n
\clist_gput_left:Nn \g_groupthm_defined_theorem_groups_clist { #1 }
} }
\cs_generate_variant:Nn \new_theorem_group:nnnnn { n V V V V } \cs_generate_variant:Nn \new_theorem_group:nnnnn { n V V V V }
@ -278,10 +279,17 @@ __HEADER__(Grouping theorems for easier customization.)
\cs_new:Npn \__sort_group_names: \cs_new:Npn \__sort_group_names:
{ {
% \tl_show:n { sorting}
% \clist_show:N \l_groupthm_group_clist
\hook_gremove_code:nn { groupthm / groupsort }{*} \hook_gremove_code:nn { groupthm / groupsort }{*}
\clist_map_function:NN \l_groupthm_group_clist \__add_to_sort_hook:n \clist_map_function:NN \l_groupthm_group_clist \__add_to_sort_hook:n
\clist_clear:N \l_groupthm_group_clist \clist_clear:N \l_groupthm_group_clist
% \ShowHook { groupthm / groupsort }
\hook_use:n { groupthm / groupsort } \hook_use:n { groupthm / groupsort }
% \clist_show:N \l_groupthm_group_clist
} }
@ -296,6 +304,10 @@ __HEADER__(Grouping theorems for easier customization.)
\powerset_clist_foreach:Nn \l_groupthm_group_clist \powerset_clist_foreach:Nn \l_groupthm_group_clist
{ {
\__sort_group_names: \__sort_group_names:
% \tl_show:n { Generating new theorem variant }
% \clist_show:N \l_groupthm_group_clist
\new_grouped_theorem:xVnn \new_grouped_theorem:xVnn
{__#1__groups_\clist_use:Nn \l_groupthm_group_clist {_}} {__#1__groups_\clist_use:Nn \l_groupthm_group_clist {_}}
\l_groupthm_group_clist \l_groupthm_group_clist