implement mapname
This commit is contained in:
parent
a19f905598
commit
73d473b25d
1 changed files with 12 additions and 5 deletions
|
@ -76,8 +76,8 @@ __HEADER__(Grouping theorems for easier customization.)
|
||||||
mapname .groups:n = { theoremgroup },
|
mapname .groups:n = { theoremgroup },
|
||||||
thmtools .clist_set:N = \l_groupthm_thmtools_clist,
|
thmtools .clist_set:N = \l_groupthm_thmtools_clist,
|
||||||
thmtools .default:n = {},
|
thmtools .default:n = {},
|
||||||
thmtools .groups:n = { theoremgroup, groupedtheorem, theoremvariants }%,
|
thmtools .groups:n = { theoremgroup, groupedtheorem, theoremvariants },
|
||||||
% unknown .code:n = \msg_error:nnn { groupthm } { unknown ~ group } { \l_keys_key_str }
|
unknown .code:n = \msg_error:nnn { groupthm } { unknown ~ group } { \l_keys_key_str }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -136,6 +136,14 @@ __HEADER__(Grouping theorems for easier customization.)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\cs_new:Npn \map_use_on_name:n #1
|
||||||
|
{
|
||||||
|
\tl_set:Nx \l_groupthm_name_tl
|
||||||
|
{
|
||||||
|
#1 { \tl_use:N \l_groupthm_name_tl }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
% envname, groups, name, thmtools
|
% envname, groups, name, thmtools
|
||||||
\cs_new:Npn \new_grouped_theorem:nnnn #1 #2 #3 #4
|
\cs_new:Npn \new_grouped_theorem:nnnn #1 #2 #3 #4
|
||||||
{
|
{
|
||||||
|
@ -152,14 +160,13 @@ __HEADER__(Grouping theorems for easier customization.)
|
||||||
\RemoveFromHook { groupthm / thmtools }[*]
|
\RemoveFromHook { groupthm / thmtools }[*]
|
||||||
|
|
||||||
\clist_map_function:nN { #2 } \group_use:n
|
\clist_map_function:nN { #2 } \group_use:n
|
||||||
|
|
||||||
|
|
||||||
\hook_use:n { groupthm / prename }
|
\hook_use:n { groupthm / prename }
|
||||||
\hook_use:n { groupthm / postname }
|
\hook_use:n { groupthm / postname }
|
||||||
\hook_use:n { groupthm / mapname }
|
\hook_use:n { groupthm / mapname }
|
||||||
%% this next line fails somehow
|
|
||||||
\hook_use:n { groupthm / thmtools }
|
\hook_use:n { groupthm / thmtools }
|
||||||
|
|
||||||
|
\clist_map_function:NN \l_groupthm_mapname_clist \map_use_on_name:n
|
||||||
|
|
||||||
\clist_put_right:Nx \l_groupthm_thmtools_clist
|
\clist_put_right:Nx \l_groupthm_thmtools_clist
|
||||||
{
|
{
|
||||||
name = \tl_use:N \l_groupthm_prename_tl
|
name = \tl_use:N \l_groupthm_prename_tl
|
||||||
|
|
Loading…
Reference in a new issue