diff --git a/doc/environments/groupthm/groupthm.dtx b/doc/environments/groupthm/groupthm.dtx index 9476826..66314b5 100644 --- a/doc/environments/groupthm/groupthm.dtx +++ b/doc/environments/groupthm/groupthm.dtx @@ -714,8 +714,8 @@ % { % \groupthm_new_group:nn, % \groupthm_renew_group:nn, -% \groupthm_provide_theorem_group:nn, -% \groupthm_declare_theorem_group:nn +% \groupthm_provide_group:nn, +% \groupthm_declare_group:nn % } % \begin{syntax} % \cs{groupthm_new_group:nn}\marg{keys}\marg{theorem group} @@ -747,9 +747,9 @@ % Non-keyval versions of % \cs{groupthm_new_group:nn}, % \cs{groupthm_renew_group:nn}, -% \cs{groupthm_provide_theorem_group:nn} +% \cs{groupthm_provide_group:nn} % and -% \cs{groupthm_declare_theorem_group:nn} +% \cs{groupthm_declare_group:nn} % % These take the individual values of the keyval keys directly, in the order % indicated by the syntax specification. @@ -757,9 +757,9 @@ % \end{function} % % -% \begin{function}{\groupthm_declare_theorem_group_rule:nnnn} +% \begin{function}{\groupthm_declare_group_rule:nnnn} % \begin{syntax} -% \cs{groupthm_declare_theorem_group_rule:nnnn}\marg{keyname}\marg{theorem group 1} +% \cs{groupthm_declare_group_rule:nnnn}\marg{keyname}\marg{theorem group 1} % \marg{relation}\marg{theorem group 2} % \end{syntax} % @@ -1147,12 +1147,12 @@ % % % -% \begin{variable}{\g_@@_defined_theorem_groups_clist} +% \begin{variable}{\g_@@_defined_groups_clist} % % This variable will hold a global list of declared theorem groups % % \begin{macrocode} -\clist_new:N \g_@@_defined_theorem_groups_clist +\clist_new:N \g_@@_defined_groups_clist % \end{macrocode} % \end{variable} % @@ -1279,19 +1279,19 @@ % Once there is such a proper mechanism, the author will likely update this to proper % string sorting. % -% \begin{macro}{\@@_add_to_theorem_group_ordering:n} +% \begin{macro}{\@@_add_to_group_ordering:n} % \begin{syntax} -% \cs{@@_add_to_theorem_group_ordering:n}\marg{theorem group} +% \cs{@@_add_to_group_ordering:n}\marg{theorem group} % \end{syntax} % % Sets hook relations for this group and all already defined theorem groups. % % \begin{macrocode} -\cs_new:Npn \@@_add_to_theorem_group_ordering:n #1 +\cs_new:Npn \@@_add_to_group_ordering:n #1 { \@@_hook_gset_rule_foreach:nNnn { @@/groupsort } - \g_@@_defined_theorem_groups_clist + \g_@@_defined_groups_clist { before } { #1 } } @@ -1300,19 +1300,19 @@ % % % -% \begin{macro}{\@@_remove_from_theorem_group_ordering:n} +% \begin{macro}{\@@_remove_from_group_ordering:n} % \begin{syntax} -% \cs{@@_remove_from_theorem_group_ordering:n}\marg{theorem group} +% \cs{@@_remove_from_group_ordering:n}\marg{theorem group} % \end{syntax} % % Removes all relations of this theorem group with the currently defined theorem groups. % % \begin{macrocode} -\cs_new:Npn \@@_remove_from_theorem_group_ordering:n #1 +\cs_new:Npn \@@_remove_from_group_ordering:n #1 { \@@_hook_gset_rule_foreach:nNnn { @@/groupsort } - \g_@@_defined_theorem_groups_clist + \g_@@_defined_groups_clist { unrelated } { #1 } } @@ -1343,7 +1343,7 @@ % \end{macro} % % -% \begin{macro}{\@@_sort_theorem_group_names:} +% \begin{macro}{\@@_sort_group_names:} % % As explained briefly before, we first insert all theorems % into the hook, clear the list, and then use the hook again. @@ -1352,7 +1352,7 @@ % which is also assumed to hold only defined theorem group names. % % \begin{macrocode} -\cs_new:Npn \@@_sort_theorem_group_names: +\cs_new:Npn \@@_sort_group_names: { \hook_gremove_code:nn { @@/groupsort }{*} \clist_map_function:NN \l_@@_group_clist \@@_add_to_sort_hook:n @@ -1413,13 +1413,13 @@ % This ensures the ordering hacks explained before. % % \begin{macrocode} - \@@_add_to_theorem_group_ordering:n { #1 } + \@@_add_to_group_ordering:n { #1 } % \end{macrocode} % % Add defined group to corresponding list % % \begin{macrocode} - \clist_gput_left:Nn \g_@@_defined_theorem_groups_clist { #1 } + \clist_gput_left:Nn \g_@@_defined_groups_clist { #1 } } % \end{macrocode} % \end{macro} @@ -1457,7 +1457,7 @@ % Remove theorem group from list of defined theorems % % \begin{macrocode} - \clist_gremove_all:Nn \g_@@_defined_theorem_groups_clist { #1 } + \clist_gremove_all:Nn \g_@@_defined_groups_clist { #1 } % \end{macrocode} % % Now, unset all relations with all defined theorem groups in the internal hooks. @@ -1465,27 +1465,27 @@ % \begin{macrocode} \@@_hook_gset_rule_foreach:nNnn { ?? } - \g_@@_defined_theorem_groups_clist + \g_@@_defined_groups_clist { unrelated } { #1 } \@@_hook_gset_rule_foreach:nNnn { @@/prefix } - \g_@@_defined_theorem_groups_clist + \g_@@_defined_groups_clist { unrelated } { #1 } \@@_hook_gset_rule_foreach:nNnn { @@/suffix } - \g_@@_defined_theorem_groups_clist + \g_@@_defined_groups_clist { unrelated } { #1 } \@@_hook_gset_rule_foreach:nNnn { @@/mapname } - \g_@@_defined_theorem_groups_clist + \g_@@_defined_groups_clist { unrelated } { #1 } \@@_hook_gset_rule_foreach:nNnn { @@/thmtools } - \g_@@_defined_theorem_groups_clist + \g_@@_defined_groups_clist { unrelated } { #1 } % \end{macrocode} @@ -1493,7 +1493,7 @@ % Also clear all sorting relations % % \begin{macrocode} - \@@_remove_from_theorem_group_ordering:n { #1 } + \@@_remove_from_group_ordering:n { #1 } } % \end{macrocode} % \end{macro} @@ -1735,8 +1735,6 @@ % \end{macrocode} % \end{macro} % -% \end{macro} -% % % Finally, we provide \LaTeX2e wrappers as document commands for these. % @@ -1785,9 +1783,9 @@ % We also provide the interface for declaring the precedence rules for theorem groups. % % -% \begin{macro}{\groupthm_declare_theorem_group_rule:nnnn} +% \begin{macro}{\groupthm_declare_group_rule:nnnn} % \begin{syntax} -% \cs{groupthm_declare_theorem_group_rule:nnnn}\marg{keyname}\marg{theorem group 1} +% \cs{groupthm_declare_group_rule:nnnn}\marg{keyname}\marg{theorem group 1} % \marg{relation}\marg{theorem group 2} % \end{syntax} % @@ -1797,7 +1795,7 @@ % in case it is not the general hook \enquote{\texttt{??}}. % % \begin{macrocode} -\cs_new:Npn \groupthm_declare_theorem_group_rule:nnnn #1 #2 #3 #4 +\cs_new:Npn \groupthm_declare_group_rule:nnnn #1 #2 #3 #4 { \str_set:Nx \l_tmpa_str { \tl_trim_spaces:n { #3 } } \str_if_eq:VnT \l_tmpa_str { higher } @@ -1828,7 +1826,7 @@ % \begin{macrocode} \NewDocumentCommand { \DeclareTheoremGroupRule } { O{??} m m m } { - \groupthm_declare_theorem_group_rule:nnnn {#1} {#2} {#3} {#4} + \groupthm_declare_group_rule:nnnn {#1} {#2} {#3} {#4} } % \end{macrocode} % \end{macro} @@ -2456,7 +2454,7 @@ % This sorting is necessary so that for each theorem family and set of groups, % the generated name will be unique: % \begin{macrocode} - \@@_sort_theorem_group_names: + \@@_sort_group_names: % \end{macrocode} % Now just declare the grouped theorem, passing the corresponding arguments and using % specified \texttt{\#6} as backend. @@ -2996,7 +2994,7 @@ % environment that has been generated by a \cs{NewGroupedTheoremFamily} command % or similar. % \begin{macrocode} - \@@_sort_theorem_group_names: + \@@_sort_group_names: \cs_if_exist:cTF { __#1__groups_ \clist_use:Nn \l_@@_group_clist { _ } } { \begin { __#1__groups_ \clist_use:Nn \l_@@_group_clist { _ } } @@ -3019,7 +3017,7 @@ % \end{macrocode} % End the corresponding environment. % \begin{macrocode} - \@@_sort_theorem_group_names: + \@@_sort_group_names: \end { __#1__groups_ \clist_use:Nn \l_@@_group_clist { _ } } } } diff --git a/doc/environments/groupthm/groupthm.sty b/doc/environments/groupthm/groupthm.sty index a9d7c27..2bd03ad 100644 --- a/doc/environments/groupthm/groupthm.sty +++ b/doc/environments/groupthm/groupthm.sty @@ -84,7 +84,7 @@ \clist_new:N \l__groupthm_mapname_clist \clist_new:N \l__groupthm_thmtools_clist \clist_new:N \l__groupthm_group_clist -\clist_new:N \g__groupthm_defined_theorem_groups_clist +\clist_new:N \g__groupthm_defined_groups_clist \bool_new:N \l__groupthm_in_family_options_environment_bool \keys_define:nn { groupthm } { @@ -130,19 +130,19 @@ \clist_set_eq:NN \l__groupthm_mapname_clist \l__groupthm_key_mapname_clist \clist_set_eq:NN \l__groupthm_thmtools_clist \l__groupthm_key_thmtools_clist } -\cs_new:Npn \__groupthm_add_to_theorem_group_ordering:n #1 +\cs_new:Npn \__groupthm_add_to_group_ordering:n #1 { \__groupthm_hook_gset_rule_foreach:nNnn { __groupthm/groupsort } - \g__groupthm_defined_theorem_groups_clist + \g__groupthm_defined_groups_clist { before } { #1 } } -\cs_new:Npn \__groupthm_remove_from_theorem_group_ordering:n #1 +\cs_new:Npn \__groupthm_remove_from_group_ordering:n #1 { \__groupthm_hook_gset_rule_foreach:nNnn { __groupthm/groupsort } - \g__groupthm_defined_theorem_groups_clist + \g__groupthm_defined_groups_clist { unrelated } { #1 } } @@ -154,7 +154,7 @@ \clist_put_left:Nn \l__groupthm_group_clist { #1 } } } -\cs_new:Npn \__groupthm_sort_theorem_group_names: +\cs_new:Npn \__groupthm_sort_group_names: { \hook_gremove_code:nn { __groupthm/groupsort }{*} \clist_map_function:NN \l__groupthm_group_clist \__groupthm_add_to_sort_hook:n @@ -182,8 +182,8 @@ \clist_put_right:Nn \l__groupthm_thmtools_clist { #5 } } } - \__groupthm_add_to_theorem_group_ordering:n { #1 } - \clist_gput_left:Nn \g__groupthm_defined_theorem_groups_clist { #1 } + \__groupthm_add_to_group_ordering:n { #1 } + \clist_gput_left:Nn \g__groupthm_defined_groups_clist { #1 } } \cs_new:Npn \__groupthm_undefine_group:n #1 { @@ -193,33 +193,33 @@ \hook_gremove_code:nn { __groupthm/suffix } { #1 } \hook_gremove_code:nn { __groupthm/mapname } { #1 } \hook_gremove_code:nn { __groupthm/thmtools } { #1 } - \clist_gremove_all:Nn \g__groupthm_defined_theorem_groups_clist { #1 } + \clist_gremove_all:Nn \g__groupthm_defined_groups_clist { #1 } \__groupthm_hook_gset_rule_foreach:nNnn { ?? } - \g__groupthm_defined_theorem_groups_clist + \g__groupthm_defined_groups_clist { unrelated } { #1 } \__groupthm_hook_gset_rule_foreach:nNnn { __groupthm/prefix } - \g__groupthm_defined_theorem_groups_clist + \g__groupthm_defined_groups_clist { unrelated } { #1 } \__groupthm_hook_gset_rule_foreach:nNnn { __groupthm/suffix } - \g__groupthm_defined_theorem_groups_clist + \g__groupthm_defined_groups_clist { unrelated } { #1 } \__groupthm_hook_gset_rule_foreach:nNnn { __groupthm/mapname } - \g__groupthm_defined_theorem_groups_clist + \g__groupthm_defined_groups_clist { unrelated } { #1 } \__groupthm_hook_gset_rule_foreach:nNnn { __groupthm/thmtools } - \g__groupthm_defined_theorem_groups_clist + \g__groupthm_defined_groups_clist { unrelated } { #1 } - \__groupthm_remove_from_theorem_group_ordering:n { #1 } + \__groupthm_remove_from_group_ordering:n { #1 } } \cs_new:Npn \__groupthm_define:nnnNNNn #1 #2 #3 #4 #5 #6 #7 { @@ -343,7 +343,7 @@ { \use:c { groupthm_ \declarator _group:nn } { ##1 } { ##2 } } -\cs_new:Npn \groupthm_declare_theorem_group_rule:nnnn #1 #2 #3 #4 +\cs_new:Npn \groupthm_declare_group_rule:nnnn #1 #2 #3 #4 { \str_set:Nx \l_tmpa_str { \tl_trim_spaces:n { #3 } } \str_if_eq:VnT \l_tmpa_str { higher } @@ -365,7 +365,7 @@ \NewDocumentCommand { \DeclareTheoremGroupRule } { O{??} m m m } { - \groupthm_declare_theorem_group_rule:nnnn {#1} {#2} {#3} {#4} + \groupthm_declare_group_rule:nnnn {#1} {#2} {#3} {#4} } % \subsection{Iterating over powersets} \clist_new:N \l__powerset_copied_clist @@ -631,7 +631,7 @@ { \clist_set_eq:NN \l__groupthm_group_clist \l_tmpa_clist \clist_put_right:Nn \l__groupthm_group_clist { #5 } - \__groupthm_sort_theorem_group_names: + \__groupthm_sort_group_names: \use:c{groupthm_#6_grouped_theorem:xVnn} {__#1__groups_\clist_use:Nn \l__groupthm_group_clist {_}} \l__groupthm_group_clist @@ -824,7 +824,7 @@ #3 \bool_set_false:N \l__groupthm_in_family_options_environment_bool \clist_put_right:Nn \l__groupthm_group_clist { #4 } - \__groupthm_sort_theorem_group_names: + \__groupthm_sort_group_names: \cs_if_exist:cTF { __#1__groups_ \clist_use:Nn \l__groupthm_group_clist { _ } } { \begin { __#1__groups_ \clist_use:Nn \l__groupthm_group_clist { _ } } @@ -841,7 +841,7 @@ #3 \bool_set_false:N \l__groupthm_in_family_options_environment_bool \clist_put_right:Nn \l__groupthm_group_clist { #4 } - \__groupthm_sort_theorem_group_names: + \__groupthm_sort_group_names: \end { __#1__groups_ \clist_use:Nn \l__groupthm_group_clist { _ } } } }