From a8cca1cbc6c2b3ef0818edf5c51a239b9f50a9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 16 Jan 2022 18:03:43 +0100 Subject: [PATCH] use expl3 interface of hooks instead --- src/environments/groupthm.pysty3 | 48 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/environments/groupthm.pysty3 b/src/environments/groupthm.pysty3 index 79db9a1..7c9b389 100644 --- a/src/environments/groupthm.pysty3 +++ b/src/environments/groupthm.pysty3 @@ -6,10 +6,10 @@ __HEADER__(Grouping theorems for easier customization.) \RequirePackage{amsthm} \RequirePackage{thmtools} -\NewHook { groupthm / prename } -\NewHook { groupthm / postname } -\NewHook { groupthm / mapname } -\NewHook { groupthm / thmtools } +\hook_new:n { groupthm / prename } +\hook_new:n { groupthm / postname } +\hook_new:n { groupthm / mapname } +\hook_new:n { groupthm / thmtools } \newcounter{indocument} @@ -88,22 +88,22 @@ __HEADER__(Grouping theorems for easier customization.) { \cs_new:cpn { group_use_#1: } { - \AddToHook { groupthm / prename } [ #1 ] - { - \tl_put_left:Nx \l_groupthm_prename_tl { #2 } - } - \AddToHook { groupthm / postname } [ #1 ] - { - \tl_put_right:Nx \l_groupthm_postname_tl { #3 } - } - \AddToHook { groupthm / mapname } [ #1 ] - { - \clist_put_right:Nn \l_groupthm_mapname_clist { #4 } - } - \AddToHook { groupthm / thmtools } [ #1 ] - { - \clist_put_right:Nn \l_groupthm_thmtools_clist { #5 } - } + \hook_gput_code:nnn { groupthm / prename } { #1 } + { + \tl_put_left:Nx \l_groupthm_prename_tl { #2 } + } + \hook_gput_code:nnn { groupthm / postname } { #1 } + { + \tl_put_right:Nx \l_groupthm_postname_tl { #3 } + } + \hook_gput_code:nnn { groupthm / mapname } { #1 } + { + \clist_put_right:Nn \l_groupthm_mapname_clist { #4 } + } + \hook_gput_code:nnn { groupthm / thmtools } { #1 } + { + \clist_put_right:Nn \l_groupthm_thmtools_clist { #5 } + } } } \cs_generate_variant:Nn \new_theorem_group:nnnnn { n V V V V } @@ -154,10 +154,10 @@ __HEADER__(Grouping theorems for easier customization.) \clist_clear:N \l_groupthm_mapname_clist \clist_set:Nn \l_groupthm_thmtools_clist { #4 } - \RemoveFromHook { groupthm / prename }[*] - \RemoveFromHook { groupthm / postname }[*] - \RemoveFromHook { groupthm / mapname }[*] - \RemoveFromHook { groupthm / thmtools }[*] + \hook_gremove_code:nn { groupthm / prename }{*} + \hook_gremove_code:nn { groupthm / postname }{*} + \hook_gremove_code:nn { groupthm / mapname }{*} + \hook_gremove_code:nn { groupthm / thmtools }{*} \clist_map_function:nN { #2 } \group_use:n \hook_use:n { groupthm / prename }