document grouped theorem commands latex3 layer properly

This commit is contained in:
Maximilian Keßler 2022-01-18 02:18:10 +01:00
parent df78bdd30d
commit 396005cc44
2 changed files with 200 additions and 40 deletions

View file

@ -694,13 +694,13 @@
%
% \begin{function}
% {
% \groupthm_new_theorem_group_by_keys:nn,
% \groupthm_renew_theorem_group_by_keys:nn,
% \groupthm_provide_theorem_group_by_keys:nn,
% \groupthm_declare_theorem_group_by_keys:nn
% \groupthm_new_theorem_group_from_keys:nn,
% \groupthm_renew_theorem_group_from_keys:nn,
% \groupthm_provide_theorem_group_from_keys:nn,
% \groupthm_declare_theorem_group_from_keys:nn
% }
% \begin{syntax}
% \cs{groupthm_new_theorem_group_by_keys:nn}\ma{keys}\ma{theorem group}
% \cs{groupthm_new_theorem_group_from_keys:nn}\ma{keys}\ma{theorem group}
% \end{syntax}
%
% \LaTeX3 versions of \cs{NewTheoremGroup}, \cs{RenewTheoremGroup},
@ -727,11 +727,14 @@
% \end{syntax}
%
% Non-keyval versions of
% \cs{groupthm_new_theorem_group_by_keys:nn},
% \cs{groupthm_renew_theorem_group_by_keys:nn},
% \cs{groupthm_provide_theorem_group_by_keys:nn}
% \cs{groupthm_new_theorem_group_from_keys:nn},
% \cs{groupthm_renew_theorem_group_from_keys:nn},
% \cs{groupthm_provide_theorem_group_from_keys:nn}
% and
% \cs{groupthm_declare_theorem_group_by_keys:nn}
% \cs{groupthm_declare_theorem_group_from_keys:nn}
%
% These take the individual values of the keyval keys directly, in the order
% indicated by the syntax specification.
%
% \end{function}
%
@ -747,12 +750,11 @@
% \end{function}
%
%
%
%
% \begin{function}{\groupthm_new_grouped_theorem:nnnn, \groupthm_provide_grouped_theorem:nnnn}
% \subsection{Grouped theorems}
%
% \begin{function}{\groupthm_new_grouped_theorem_from_keys:nn, \groupthm_provide_grouped_theorem_from_keys:nn}
% \begin{syntax}
% \cs{groupthm_provide_grouped_theorem:nnnn}\ma{environment name}
% \ma{groups clist}\ma{theorem name}\ma{thmtools keys}
% \cs{groupthm_provide_grouped_theorem_from_keys:nn}\ma{keys}\ma{environment name}
% \end{syntax}
%
% \LaTeX3 version of \cs{NewGroupedTheorem}, \cs{ProvideGroupedTheorem}
@ -762,12 +764,11 @@
%
% \begin{function}
% {
% \groupthm_new_grouped_theorem_star:nnnn,
% \groupthm_provide_grouped_theorem_star:nnnn
% \groupthm_new_grouped_theorem_star_from_keys:nn,
% \groupthm_provide_grouped_theorem_star_from_keys:nn
% }
% \begin{syntax}
% \cs{groupthm_new_grouped_theorem_star:nnnn}\ma{environment name}
% \ma{groups clist}\ma{theorem name}\ma{thmtools keys}
% \cs{groupthm_new_grouped_theorem_star_from_keys:nn}\ma{keys}\ma{environment name}
% \end{syntax}
%
%
@ -778,10 +779,9 @@
%
%
%
% \begin{function}{\groupthm_new_theorem:nnnn, \groupthm_provide_theorem:nnnn}
% \begin{function}{\groupthm_new_theorem_from_keys:nn, \groupthm_provide_theorem_from_keys:nn}
% \begin{syntax}
% \cs{groupthm_provide_theorem:nnnn}\ma{environment name}
% \ma{groups clist}\ma{theorem name}\ma{thmtools keys}
% \cs{groupthm_provide_theorem_from_keys:nn}\ma{keys}\ma{environment name}
% \end{syntax}
%
% \LaTeX3 version of \cs{NewTheorem}, \cs{ProvideTheorem}
@ -789,10 +789,9 @@
%
% \end{function}
%
% \begin{function}{\groupthm_new_theorem_star:nnnn, \groupthm_provide_theorem_star:nnnn}
% \begin{function}{\groupthm_new_theorem_star_from_keys:nn, \groupthm_provide_theorem_star_from_keys:nn}
% \begin{syntax}
% \cs{groupthm_new_theorem_star:nnnn}\ma{environment name}
% \ma{groups clist}\ma{theorem name}\ma{thmtools keys}
% \cs{groupthm_new_theorem_star_from_keys:nn}\ma{keys}\ma{environment name}
% \end{syntax}
%
%
@ -800,6 +799,26 @@
%
%
% \end{function}
%
%
% \begin{function}
% {
% \groupthm_new_grouped_theorem:nnnn,
% \groupthm_provide_grouped_theorem:nnnn
% \groupthm_new_grouped_theorem_star:nnnn,
% \groupthm_provide_grouped_theorem_star:nnnn,
% \groupthm_new_theorem:nnnn,
% \groupthm_provide_theorem:nnnn,
% \groupthm_new_theorem_star:nnnn,
% \groupthm_provide_theorem_star:nnnn
% }
% \begin{syntax}
% \cs{groupthm_new_theorem:nnnn}\ma{keys}\ma{environment name}
% \end{syntax}
%
% Non-keyval versions of above macros.
%
% \end{function}
%
%
%
@ -1425,13 +1444,13 @@
% With the \cs{@@_set_normalized_keys:nnn} macro at hand,
% it is also easy to provide key-value interfaces for these commands:
%
% \begin{macro}{\groupthm_new_theorem_group_by_keys:nn}
% \begin{macro}{\groupthm_new_theorem_group_from_keys:nn}
% \begin{syntax}
% \cs{groupthm_new_theorem_group_by_keys:nn}\ma{keys}\ma{theorem group}
% \cs{groupthm_new_theorem_group_from_keys:nn}\ma{keys}\ma{theorem group}
% \end{syntax}
%
% \begin{macrocode}
\cs_new:Npn \groupthm_new_theorem_group_by_keys:nn #1#2
\cs_new:Npn \groupthm_new_theorem_group_from_keys:nn #1#2
{
\@@_set_normalized_keys:nnn { #1 } { theoremgroup } { #2 }
\groupthm_new_theorem_group:nVVVV { #2 }
@ -1445,13 +1464,13 @@
%
%
%
% \begin{macro}{\groupthm_renew_theorem_group_by_keys:nn}
% \begin{macro}{\groupthm_renew_theorem_group_from_keys:nn}
% \begin{syntax}
% \cs{groupthm_renew_theorem_group_by_keys:nn}\ma{keys}\ma{theorem group}
% \cs{groupthm_renew_theorem_group_from_keys:nn}\ma{keys}\ma{theorem group}
% \end{syntax}
%
% \begin{macrocode}
\cs_new:Npn \groupthm_renew_theorem_group_by_keys:nn #1#2
\cs_new:Npn \groupthm_renew_theorem_group_from_keys:nn #1#2
{
\@@_set_normalized_keys:nnn { #1 } { theoremgroup } { #2 }
\groupthm_renew_theorem_group:nVVVV { #2 }
@ -1465,13 +1484,13 @@
%
%
%
% \begin{macro}{\groupthm_provide_theorem_group_by_keys:nn}
% \begin{macro}{\groupthm_provide_theorem_group_from_keys:nn}
% \begin{syntax}
% \cs{groupthm_provide_theorem_group_by_keys:nn}\ma{keys}\ma{theorem group}
% \cs{groupthm_provide_theorem_group_from_keys:nn}\ma{keys}\ma{theorem group}
% \end{syntax}
%
% \begin{macrocode}
\cs_new:Npn \groupthm_provide_theorem_group_by_keys:nn #1#2
\cs_new:Npn \groupthm_provide_theorem_group_from_keys:nn #1#2
{
\@@_set_normalized_keys:nnn { #1 } { theoremgroup } { #2 }
\groupthm_provide_theorem_group:nVVVV { #2 }
@ -1485,13 +1504,13 @@
%
%
%
% \begin{macro}{\groupthm_declare_theorem_group_by_keys:nn}
% \begin{macro}{\groupthm_declare_theorem_group_from_keys:nn}
% \begin{syntax}
% \cs{groupthm_declare_theorem_group_by_keys:nn}\ma{keys}\ma{theorem group}
% \cs{groupthm_declare_theorem_group_from_keys:nn}\ma{keys}\ma{theorem group}
% \end{syntax}
%
% \begin{macrocode}
\cs_new:Npn \groupthm_declare_theorem_group_by_keys:nn #1#2
\cs_new:Npn \groupthm_declare_theorem_group_from_keys:nn #1#2
{
\@@_set_normalized_keys:nnn { #1 } { theoremgroup } { #2 }
\groupthm_declare_theorem_group:nVVVV { #2 }
@ -1512,7 +1531,7 @@
% \begin{macrocode}
\NewDocumentCommand{\NewTheoremGroup}{ O{} m }
{
\groupthm_new_theorem_group_by_keys:nn { #1 } { #2 }
\groupthm_new_theorem_group_from_keys:nn { #1 } { #2 }
}
% \end{macrocode}
% \end{macro}
@ -1524,7 +1543,7 @@
% \begin{macrocode}
\NewDocumentCommand{\RenewTheoremGroup}{ O{} m }
{
\groupthm_renew_theorem_group_by_keys:nn { #1 } { #2 }
\groupthm_renew_theorem_group_from_keys:nn { #1 } { #2 }
}
% \end{macrocode}
% \end{macro}
@ -1536,7 +1555,7 @@
% \begin{macrocode}
\NewDocumentCommand{\ProvideTheoremGroup}{ O{} m }
{
\groupthm_provide_theorem_group_by_keys:nn { #1 } { #2 }
\groupthm_provide_theorem_group_from_keys:nn { #1 } { #2 }
}
% \end{macrocode}
% \end{macro}
@ -1548,7 +1567,7 @@
% \begin{macrocode}
\NewDocumentCommand{\DeclareTheoremGroup}{ O{} m }
{
\groupthm_declare_theorem_group_by_keys:nn { #1 } { #2 }
\groupthm_declare_theorem_group_from_keys:nn { #1 } { #2 }
}
% \end{macrocode}
% \end{macro}
@ -1953,6 +1972,147 @@
% \end{macro}
%
% We now provide the corresponding key-valued interfaces around these.
% All of these work in the same way:
% We set the normalized keys, and then pass these by value to the
% previously defined macros
%
%
% \begin{macro}{\groupthm_new_grouped_theorem_from_keys:nn}
% \begin{macrocode}
\cs_new:Npn \groupthm_new_grouped_theorem_from_keys:nn #1 #2
{
\@@_set_normalized_keys { #2 } { groupedtheorem } { #1 }
\groupthm_new_grouped_theorem:nVVV
{ #1 }
\l_@@_key_group_clist
\l_@@_name_tl
\l_@@_key_thmtools_clist
}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\groupthm_provide_grouped_theorem_from_keys:nn}
% \begin{macrocode}
\cs_new:Npn \groupthm_provide_grouped_theorem_from_keys:nn #1 #2
{
\@@_set_normalized_keys { #2 } { groupedtheorem } { #1 }
\groupthm_provide_grouped_theorem:nVVV
{ #1 }
\l_@@_key_group_clist
\l_@@_name_tl
\l_@@_key_thmtools_clist
}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\groupthm_new_grouped_theorem_star_from_keys:nn}
% \begin{macrocode}
\cs_new:Npn \groupthm_new_grouped_theorem_star_from_keys:nn #1 #2
{
\@@_set_normalized_keys { #2 } { groupedtheorem } { #1 }
\groupthm_new_grouped_theorem_star:nVVV
{ #1 }
\l_@@_key_group_clist
\l_@@_name_tl
\l_@@_key_thmtools_clist
}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\groupthm_provide_grouped_theorem_star_from_keys:nn}
% \begin{macrocode}
\cs_new:Npn \groupthm_provide_grouped_theorem_star_from_keys:nn #1 #2
{
\@@_set_normalized_keys { #2 } { groupedtheorem } { #1 }
\groupthm_provide_grouped_theorem_star:nVVV
{ #1 }
\l_@@_key_group_clist
\l_@@_name_tl
\l_@@_key_thmtools_clist
}
% \end{macrocode}
% \end{macro}
%
%
%
% \begin{macro}{\groupthm_new_theorem_from_keys:nn}
% \begin{macrocode}
\cs_new:Npn \groupthm_new_theorem_from_keys:nn #1 #2
{
\@@_set_normalized_keys { #2 } { groupedtheorem } { #1 }
\groupthm_new_theorem:nVVV
{ #1 }
\l_@@_key_group_clist
\l_@@_name_tl
\l_@@_key_thmtools_clist
}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\groupthm_provide_theorem_from_keys:nn}
% \begin{macrocode}
\cs_new:Npn \groupthm_provide_theorem_from_keys:nn #1 #2
{
\@@_set_normalized_keys { #2 } { groupedtheorem } { #1 }
\groupthm_provide_theorem:nVVV
{ #1 }
\l_@@_key_group_clist
\l_@@_name_tl
\l_@@_key_thmtools_clist
}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\groupthm_new_theorem_star_from_keys:nn}
% \begin{macrocode}
\cs_new:Npn \groupthm_new_theorem_star_from_keys:nn #1 #2
{
\@@_set_normalized_keys { #2 } { groupedtheorem } { #1 }
\groupthm_new_theorem_star:nVVV
{ #1 }
\l_@@_key_group_clist
\l_@@_name_tl
\l_@@_key_thmtools_clist
}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\groupthm_provide_theorem_star_from_keys:nn}
% \begin{macrocode}
\cs_new:Npn \groupthm_provide_theorem_star_from_keys:nn #1 #2
{
\@@_set_normalized_keys { #2 } { groupedtheorem } { #1 }
\groupthm_provide_theorem_star:nVVV
{ #1 }
\l_@@_key_group_clist
\l_@@_name_tl
\l_@@_key_thmtools_clist
}
% \end{macrocode}
% \end{macro}
%
%
%
%
%
%
%
%
%
%
%
%

Binary file not shown.