From 83ba0942030309ceb32b44576f20a1d17d216048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sat, 22 Jan 2022 14:09:40 +0100 Subject: [PATCH] redesign some interfaces --- doc/environments/groupthm/groupthm.dtx | 58 +++++++++++++++++++------- doc/environments/groupthm/groupthm.sty | 1 + 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/doc/environments/groupthm/groupthm.dtx b/doc/environments/groupthm/groupthm.dtx index 0a3abcc..d2936ab 100644 --- a/doc/environments/groupthm/groupthm.dtx +++ b/doc/environments/groupthm/groupthm.dtx @@ -49,7 +49,7 @@ % \ExplSyntaxOn % \NewDocumentCommand { \mymeta } { O{} m } % { -% \meta[#1]{#2} +% \meta{#2} % \__codedoc_special_index_module:nnnnN { #2 } { #2 } { meta } { usage } { \c_false_bool} % } % \ExplSyntaxOff @@ -969,10 +969,10 @@ % % \begin{macrocode} \cs_new:Npn \@@_thmtools_declare_theorem:nn #1 #2 -{ - \tl_log:n { Declaring ~ thmtools ~ theorem ~ #2 } - \declaretheorem [ #1 ] { #2 } -} + { + \tl_log:n { Declaring ~ thmtools ~ theorem ~ #2 } + \declaretheorem [ #1 ] { #2 } + } \cs_generate_variant:Nn \@@_thmtools_declare_theorem:nn { V n } % \end{macrocode} % \end{macro} @@ -1832,7 +1832,7 @@ % \begin{macro}{\DeclareTheoremGroupRule} % \begin{syntax} % \cs{DeclareTheoremGroupRule}\oarg{keyname}% -% \marg{theorem group 1}\marg{relation}\marg{theorem group 2} +% \marg{theorem group_1}\marg{relation}\marg{theorem group_2} % \end{syntax} % % \begin{macrocode} @@ -1878,7 +1878,18 @@ % \end{macrocode} % \end{macro} % -% +% +% \begin{macro}{\@@_push_tmpa_seq:n} +% \begin{syntax} +% \cs{@@_push_tmpa_seq:n}\marg{balanced text} +% \end{syntax} +% +% +% +% \begin{macrocode} + +% \end{macrocode} +% \end{macro} % % \begin{macro}{\@@_flatten_groups_hierarchy:nN} % \begin{syntax} @@ -2120,12 +2131,12 @@ % % \begin{macro} % { -% \groupthm_new_grouped_theorem:nnnn, -% \groupthm_new_grouped_theorem:nVVV, -% \groupthm_new_grouped_theorem:xVnn -% \groupthm_provide_grouped_theorem:nnnn, -% \groupthm_provide_grouped_theorem:nVVV, -% \groupthm_provide_grouped_theorem:xVnn +% \groupthm_new_theorem:nnnn, +% \groupthm_new_theorem:nVVV, +% \groupthm_new_theorem:xVnn +% \groupthm_provide_theorem:nnnn, +% \groupthm_provide_theorem:nVVV, +% \groupthm_provide_theorem:xVnn % } % \begin{syntax} % \cs{groupthm_new_grouped_theorem:nnnn}\marg{environment name} @@ -2137,9 +2148,9 @@ { new, provide } { grouped ~ theorem } { ##1 } - \error + \@@_error: \@@_define_theorem:nnnn - { groupthm_#1_grouped_theorem:nnnn } + { groupthm_#1_theorem_:nnnn } { { ##1 } { ##2 } { ##3 } { ##4 } } \cs_generate_variant:Nn \groupthm_new_grouped_theorem:nnnn { n V V V } % \end{macrocode} @@ -2150,6 +2161,22 @@ % \end{macro} % % +% \begin{macro}{\groupthm_new_theorem:nnnnnn} +% \begin{syntax} +% \cs{groupthm_new_theorem:nnnnnn}\marg{key=value list}\marg{grouped theorem} +% \marg{bool} +% \end{syntax} +% +% +% The third argument indicates whether the generated theorem(s) will be added to the +% \texttt{unnumbered} group +% +% \begin{macrocode} + +% \end{macrocode} +% \end{macro} +% +% % The star variants of these that add the \texttt{unnumbered} group % are straightforward: % @@ -3515,4 +3542,3 @@ % \ExplSyntaxOff % % \newpage -% \PrintIndex diff --git a/doc/environments/groupthm/groupthm.sty b/doc/environments/groupthm/groupthm.sty index f65811f..fdab3f1 100644 --- a/doc/environments/groupthm/groupthm.sty +++ b/doc/environments/groupthm/groupthm.sty @@ -380,6 +380,7 @@ { \groupthm_add_parent:nn { #1 } { #2 } } + \cs_new:Npn \__groupthm_push_tmpa_seq:n #1 { \seq_push:Nn \l_tmpa_seq { #1 }