add theorem group parent implemented
This commit is contained in:
parent
b934e14708
commit
7f1132b898
2 changed files with 50 additions and 0 deletions
|
@ -1842,6 +1842,46 @@
|
|||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\groupthm_add_parent:nn}
|
||||
% \begin{syntax}
|
||||
% \cs{groupthm_add_parent:nn}\marg{theorem group_1}\marg{theorem group_2}
|
||||
% \end{syntax}
|
||||
%
|
||||
% Declares \meta{theorem group_2} as a parent of \meta{theorem group_1}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \groupthm_add_parent:nn #1 #2
|
||||
{
|
||||
\@@_ensure_group_exists:n { #1 }
|
||||
\@@_ensure_group_exists:n { #2 }
|
||||
\clist_gput_left:cn { g_@@_parents_group__#1__clist } { #2 }
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\AddTheoremGroupParent}
|
||||
% \begin{syntax}
|
||||
% \cs{AddTheoremGroupParent}\marg{theorem group_1}\marg{theorem group_2}
|
||||
% \end{syntax}
|
||||
%
|
||||
% Document command version of \cs{groupthm_add_parent:nn}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\NewDocumentCommand { \AddTheoremGroupParent } { m m }
|
||||
{
|
||||
\groupthm_add_parent:nn { #1 } { #2 }
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsection{Iterating over powersets}
|
||||
% For generating the different variants of a theorem family,
|
||||
% we need to iterate over over the powerset of some list.
|
||||
|
|
|
@ -369,6 +369,16 @@
|
|||
{
|
||||
\groupthm_declare_group_rule:nnnn {#1} {#2} {#3} {#4}
|
||||
}
|
||||
\cs_new:Npn \groupthm_add_parent:nn #1 #2
|
||||
{
|
||||
\__groupthm_ensure_group_exists:n { #1 }
|
||||
\__groupthm_ensure_group_exists:n { #2 }
|
||||
\clist_gput_left:cn { g__groupthm_parents_group__#1__clist } { #2 }
|
||||
}
|
||||
\NewDocumentCommand { \AddTheoremGroupParent } { m m }
|
||||
{
|
||||
\groupthm_add_parent:nn { #1 } { #2 }
|
||||
}
|
||||
\clist_new:N \l__powerset_copied_clist
|
||||
\seq_new:N \l__powerset_saved_seq
|
||||
\cs_generate_variant:Nn \clist_remove_all:Nn { N V }
|
||||
|
|
Loading…
Reference in a new issue