fix many typos
This commit is contained in:
parent
7baf1a01a1
commit
39b1aa88b3
2 changed files with 201 additions and 201 deletions
|
@ -35,27 +35,6 @@
|
|||
%
|
||||
% \maketitle
|
||||
%
|
||||
%
|
||||
% \NewDocumentCommand{\kw}{m}
|
||||
% {%
|
||||
% \texttt{#1}%
|
||||
% }
|
||||
%
|
||||
% \NewDocumentCommand{\vocab}{m}
|
||||
% {%
|
||||
% \emph{#1}%
|
||||
% }
|
||||
%
|
||||
% \ExplSyntaxOn
|
||||
% \NewDocumentCommand { \mymeta } { O{} m }
|
||||
% {
|
||||
% \meta{#2}
|
||||
% \__codedoc_special_index_module:nnnnN { #2 } { #2 } { meta } { usage } { \c_false_bool}
|
||||
% }
|
||||
% \ExplSyntaxOff
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{documentation}
|
||||
%
|
||||
% \tableofcontents
|
||||
|
@ -78,14 +57,14 @@
|
|||
% for almost all needs, it is pretty time-consuming to largely change
|
||||
% the behavior of environments, or have small variants of these.
|
||||
%
|
||||
% This package aims at both providing a versatile mechanism, \mymeta{theorem group}s,
|
||||
% This package aims at both providing a versatile mechanism, \meta{theorem group}s,
|
||||
% to structure theorems into groups that can subsequently easily altered,
|
||||
% as well as a mechanism for easily generating \mymeta{theorem families}.
|
||||
% as well as a mechanism for easily generating \meta{theorem families}.
|
||||
%
|
||||
% As the author is of the opinion that of the mentioned theorem controlling packages
|
||||
% \pkg{thmtools} provides the most versatile interface, the \pkg{groupthm}
|
||||
% will be working on top of \pkg{thmtools} and use this as a backend for declaring
|
||||
% the \mymeta{theorem}s themselves.
|
||||
% the \meta{theorem}s themselves.
|
||||
%
|
||||
% Thus, any styles supported by \pkg{thmtools} will be supported by \pkg{groupthm}
|
||||
% as well, by passing them to \pkg{thmtools}.
|
||||
|
@ -94,46 +73,46 @@
|
|||
%
|
||||
% \subsection{Theorem groups}
|
||||
% \label{sec:theorem-groups}
|
||||
% A \mymeta{theorem group} is some named group holding some properties for
|
||||
% the \mymeta{theorem}s that are contained in this group.
|
||||
% Each \mymeta{theorem} can, when declared, be part of arbitrarily many \mymeta{theorem group}s,
|
||||
% A \meta{theorem group} is some named group holding some properties for
|
||||
% the \meta{theorem}s that are contained in this group.
|
||||
% Each \meta{theorem} can, when declared, be part of arbitrarily many \meta{theorem group}s,
|
||||
% and will be subject to the styles these groups defined.
|
||||
%
|
||||
% This enables to group similar \mymeta{theorem}s and alter them at a late stage of
|
||||
% This enables to group similar \meta{theorem}s and alter them at a late stage of
|
||||
% document development in a unique manner, by only having to change the
|
||||
% definition of the \mymeta{theorem group}, and not all \mymeta{theorem}s separately.
|
||||
% definition of the \meta{theorem group}, and not all \meta{theorem}s separately.
|
||||
%
|
||||
% The properties. Such a \mymeta{theorem group} can hold are as follows
|
||||
% The properties. Such a \meta{theorem group} can hold are as follows
|
||||
%
|
||||
%
|
||||
% \begin{description}
|
||||
% \item[\kw{prefix}] A prefix (any \mymeta{token list}) that will be inserted
|
||||
% before the theorem name of each member of this \mymeta{theorem group}.
|
||||
% \item[\kw{suffix}] A suffix (any \mymeta{token list}) that will be
|
||||
% inserted before the theorem name for each member of this \mymeta{theorem group}.
|
||||
% \item[\texttt{prefix}] A prefix (any \meta{token list}) that will be inserted
|
||||
% before the theorem name of each member of this \meta{theorem group}.
|
||||
% \item[\texttt{suffix}] A suffix (any \meta{token list}) that will be
|
||||
% inserted before the theorem name for each member of this \meta{theorem group}.
|
||||
% This could be e.g.~some \enquote{$\star$} appended to the name to indicate
|
||||
% variants of environments.
|
||||
% \item[\kw{mapname}] A \mymeta{function} (some macro that takes exactly one argument)
|
||||
% that is applied to the \kw{name}.
|
||||
% \item[\kw{thmtools}] A \mymeta{clist} of key-value pairs that are passed to the underlying
|
||||
% \pkg{thmtools} backend of the \mymeta{theorem}.
|
||||
% This allows e.g.~to set the \kw{topskip} of a certain class of \mymeta{theorem}s.
|
||||
% \item[\texttt{mapname}] A \meta{function} (some macro that takes exactly one argument)
|
||||
% that is applied to the \texttt{name}.
|
||||
% \item[\texttt{thmtools}] A \meta{clist} of key-value pairs that are passed to the underlying
|
||||
% \pkg{thmtools} backend of the \meta{theorem}.
|
||||
% This allows e.g.~to set the \texttt{topskip} of a certain class of \meta{theorem}s.
|
||||
% \end{description}
|
||||
%
|
||||
% The most versatile key here is certainly the \kw{thmtools} key,
|
||||
% The most versatile key here is certainly the \texttt{thmtools} key,
|
||||
% providing the most customization to an end user (like you).
|
||||
%
|
||||
% As mentioned, each \mymeta{theorem} can be member of arbitrary many \mymeta{theorem group}s,
|
||||
% As mentioned, each \meta{theorem} can be member of arbitrary many \meta{theorem group}s,
|
||||
% and will posses their corresponding properties.
|
||||
%
|
||||
% To adjust finer controlling of these \mymeta{theorem group}s, \mymeta{theorem group}s can inherit from each other, and \mymeta{theorem group}s are subject to a hierarchy that controls precedence in case
|
||||
% of conflicting properties of different \mymeta{theorem group}s a \mymeta{theorem} may be part of.
|
||||
% To adjust finer controlling of these \meta{theorem group}s, \meta{theorem group}s can inherit from each other, and \meta{theorem group}s are subject to a hierarchy that controls precedence in case
|
||||
% of conflicting properties of different \meta{theorem group}s a \meta{theorem} may be part of.
|
||||
%
|
||||
% This hierarchy can of course be controlled by the user.
|
||||
%
|
||||
% \subsection{Grouped theorems}
|
||||
%
|
||||
% A \mymeta{grouped theorem} is just a theorem that is a member of
|
||||
% A \meta{grouped theorem} is just a theorem that is a member of
|
||||
% a given set of groups (possibly empty).
|
||||
% It behaves just a regular theorem, except that by changing the definition of
|
||||
% its theorem groups, we can alter its behavior.
|
||||
|
@ -144,8 +123,8 @@
|
|||
% although in fact we mean \enquote{grouped theorems}.
|
||||
%
|
||||
% \subsection{Theorem families}
|
||||
% Often, one needs some small \mymeta{theorem variant}s of some \mymeta{theorem}, the most typical
|
||||
% example being \vocab{starred} version of \mymeta{theorem}s that are not numbered
|
||||
% Often, one needs some small \meta{theorem variant}s of some \meta{theorem}, the most typical
|
||||
% example being \texttt{starred} version of \meta{theorem}s that are not numbered
|
||||
% in contrast to their counterparts.
|
||||
%
|
||||
% \begin{verbatim}
|
||||
|
@ -161,12 +140,12 @@
|
|||
% \todo{insert code example output}
|
||||
%
|
||||
% \pkg{groupthm} extends this idea and provides a versatile mechanism to define a
|
||||
% \mymeta{theorem family}, which is based on some \mymeta{theorem name} and
|
||||
% parses additional arguments / syntax to control the \mymeta{theorem groups}
|
||||
% \meta{theorem family}, which is based on some \meta{theorem name} and
|
||||
% parses additional arguments / syntax to control the \meta{theorem groups}
|
||||
% that this environment is a part of.
|
||||
%
|
||||
% So, in addition the name of a \mymeta{theorem}, the corresponding environment will
|
||||
% accept some options and toggle the membership of certain \mymeta{theorem groups},
|
||||
% So, in addition the name of a \meta{theorem}, the corresponding environment will
|
||||
% accept some options and toggle the membership of certain \meta{theorem groups},
|
||||
% thus further customizing its appearance.
|
||||
%
|
||||
% This can lead e.g.~to usages like the following:
|
||||
|
@ -179,10 +158,10 @@
|
|||
% \todo{code}
|
||||
%
|
||||
% Providing this consists of two parts:
|
||||
% declaring the \mymeta{theorem family} by listing the groups that can be toggled
|
||||
% by this \mymeta{theorem family}, and declaring the actual option parsing
|
||||
% of the \mymeta{theorem family}, which then controls the membership in these groups
|
||||
% (and of course prior to this the definition of the desired \mymeta{theorem group}s).
|
||||
% declaring the \meta{theorem family} by listing the groups that can be toggled
|
||||
% by this \meta{theorem family}, and declaring the actual option parsing
|
||||
% of the \meta{theorem family}, which then controls the membership in these groups
|
||||
% (and of course prior to this the definition of the desired \meta{theorem group}s).
|
||||
%
|
||||
%
|
||||
%
|
||||
|
@ -193,7 +172,7 @@
|
|||
% Then the documentation will look like
|
||||
% %
|
||||
% \begin{function}{\NewFoo, \RenewFoo, \ProvideFoo, \DeclareFoo}
|
||||
% Defines some \kw{foo} \ldots
|
||||
% Defines some \texttt{foo} \ldots
|
||||
% \end{function}
|
||||
% %
|
||||
% and will not mention anything about the variants.
|
||||
|
@ -203,23 +182,23 @@
|
|||
% \begin{description}
|
||||
% \item[\cs{NewFoo}]
|
||||
%
|
||||
% Defines \kw{foo} if not defined already.
|
||||
% Defines \texttt{foo} if not defined already.
|
||||
% This emits an error in case it has been defined yet.
|
||||
%
|
||||
% \item[\cs{RenewFoo}]
|
||||
%
|
||||
% Redefines \kw{foo} if defined already.
|
||||
% Redefines \texttt{foo} if defined already.
|
||||
% This emits an error in case it has \emph{not} been defined yet.
|
||||
%
|
||||
% \item[\cs{ProvideFoo}]
|
||||
%
|
||||
% Defines \kw{foo} if it is not defined already.
|
||||
% This does not emit an error if \kw{foo} is already defined
|
||||
% Defines \texttt{foo} if it is not defined already.
|
||||
% This does not emit an error if \texttt{foo} is already defined
|
||||
% (and has no effect in this case).
|
||||
%
|
||||
% \item[\cs{DeclareFoo}]
|
||||
%
|
||||
% Defines \kw{foo} in disregard of any
|
||||
% Defines \texttt{foo} in disregard of any
|
||||
% existing definitions. Any old definition will be overwritten (if present).
|
||||
% \end{description}
|
||||
% %
|
||||
|
@ -245,38 +224,38 @@
|
|||
% \cs{NewTheoremGroup}\oarg{key=value list}\marg{theorem group}
|
||||
% \end{syntax}
|
||||
%
|
||||
% This introduces a new \mymeta{theorem group} with the given name.
|
||||
% The \mymeta{key=value list} available are the same as introduced in \autoref{sec:theorem-groups}:
|
||||
% This introduces a new \meta{theorem group} with the given name.
|
||||
% The \meta{key=value list} available are the same as introduced in \autoref{sec:theorem-groups}:
|
||||
%
|
||||
% \begin{description}
|
||||
% \item
|
||||
%
|
||||
% \kw{prefix} = \mymeta{token list}.
|
||||
% Insert the \mymeta{token list} in front of the theorem name.
|
||||
% \texttt{prefix} = \meta{token list}.
|
||||
% Insert the \meta{token list} in front of the theorem name.
|
||||
%
|
||||
% \item
|
||||
%
|
||||
% \kw{suffix} = \mymeta{token list}.
|
||||
% Insert the \mymeta{token list} after the theorem name.
|
||||
% \texttt{suffix} = \meta{token list}.
|
||||
% Insert the \meta{token list} after the theorem name.
|
||||
%
|
||||
% \item
|
||||
%
|
||||
% \kw{mapname} = \mymeta{function}.
|
||||
% Apply this \mymeta{function} to the theorem name.
|
||||
% \texttt{mapname} = \meta{function}.
|
||||
% Apply this \meta{function} to the theorem name.
|
||||
%
|
||||
% \item
|
||||
%
|
||||
% \kw{thmtools} = $\{$\mymeta{clist}$\}$.
|
||||
% \texttt{thmtools} = $\{$\meta{clist}$\}$.
|
||||
% Pass these options to \pkg{thmtools}.
|
||||
%
|
||||
% \end{description}
|
||||
%
|
||||
% For uniqueness of the given options, the \mymeta{clist} given to the \kw{thmtools} key
|
||||
% For uniqueness of the given options, the \meta{clist} given to the \texttt{thmtools} key
|
||||
% has to be surrounded by a pair of braces.
|
||||
%
|
||||
% \begin{texnote}
|
||||
% The \kw{mapname} is expected to be a function of \cs{fun:n}.
|
||||
% The function call is subject to an \kw{x}-type expansion prior
|
||||
% The \texttt{mapname} is expected to be a function of \cs{fun:n}.
|
||||
% The function call is subject to an \texttt{x}-type expansion prior
|
||||
% to being passed further to \pkg{thmtools}.
|
||||
% \end{texnote}
|
||||
%
|
||||
|
@ -295,17 +274,17 @@
|
|||
% controlling their order of application in case a theorem is member
|
||||
% of both groups.
|
||||
%
|
||||
% The \mymeta{keyname} can be one of \kw{prefix}, \kw{suffix}, \kw{mapname}, \kw{thmtools}.
|
||||
% The \meta{keyname} can be one of \texttt{prefix}, \texttt{suffix}, \texttt{mapname}, \texttt{thmtools}.
|
||||
% If present, it declares the corresponding relation only for this subkey.
|
||||
% This can lead to \mymeta{theorem group_} overwriting \mymeta{theorem group_2} when given
|
||||
% contradictory \pkg{thmtools} options, but the \kw{prefix} of \mymeta{theorem group_}
|
||||
% being applied after the one of \mymeta{theorem group_2}.
|
||||
% When the \mymeta{keyname} is not given, this applies to all keywords.
|
||||
% This can lead to \meta{theorem group_} overwriting \meta{theorem group_2} when given
|
||||
% contradictory \pkg{thmtools} options, but the \texttt{prefix} of \meta{theorem group_}
|
||||
% being applied after the one of \meta{theorem group_2}.
|
||||
% When the \meta{keyname} is not given, this applies to all keywords.
|
||||
%
|
||||
% \begin{texnote}
|
||||
% The \mymeta{keyname} is just passed to the corresponding argument
|
||||
% of the \kw{lthooks} package.
|
||||
% If the option argument is not present, \kw{??} is used, this has the described effect.
|
||||
% The \meta{keyname} is just passed to the corresponding argument
|
||||
% of the \texttt{lthooks} package.
|
||||
% If the option argument is not present, \texttt{??} is used, this has the described effect.
|
||||
% \end{texnote}
|
||||
%
|
||||
% The behavior of the relations is based on the \cs{DeclareHookRule} command
|
||||
|
@ -315,21 +294,21 @@
|
|||
% For us, the following list will suffice:
|
||||
%
|
||||
% \begin{description}
|
||||
% \item[\kw{higher} or \kw{after} or \kw{\string>}]
|
||||
% \item[\texttt{higher} or \texttt{after} or \texttt{\string>}]
|
||||
%
|
||||
% \mymeta{theorem group_1} takes precedence over \mymeta{theorem group_2}.
|
||||
% Its \kw{prefix} is applied after the one of \mymeta{theorem group_2}.
|
||||
% \meta{theorem group_1} takes precedence over \meta{theorem group_2}.
|
||||
% Its \texttt{prefix} is applied after the one of \meta{theorem group_2}.
|
||||
%
|
||||
% \item[\kw{lower} or \kw{before} or \kw{\string<}]
|
||||
% \item[\texttt{lower} or \texttt{before} or \texttt{\string<}]
|
||||
%
|
||||
% \mymeta{theorem group_2} takes precedence over \mymeta{theorem group_1}.
|
||||
% Its \kw{prefix} is applied after the one of \mymeta{theorem group_1}.
|
||||
% \meta{theorem group_2} takes precedence over \meta{theorem group_1}.
|
||||
% Its \texttt{prefix} is applied after the one of \meta{theorem group_1}.
|
||||
%
|
||||
% \end{description}
|
||||
%
|
||||
% \begin{texnote}
|
||||
% The \mymeta{relation} is first stripped,
|
||||
% then checked if it matches either \kw{higher} or \kw{lower}
|
||||
% The \meta{relation} is first stripped,
|
||||
% then checked if it matches either \texttt{higher} or \texttt{lower}
|
||||
% and in this case replaced by the corresponding \pkg{lthooks} variant
|
||||
% of the relation.
|
||||
% The rest is passed as is to \pkg{lthooks} and thus subject to the usual
|
||||
|
@ -344,23 +323,23 @@
|
|||
% \begin{syntax}
|
||||
% \cs{AddTheoremGroupParent}\marg{theorem group_1}\marg{theorem group_2}
|
||||
% \end{syntax}
|
||||
% Declares \mymeta{theorem group_1} to \enquote{inherit} all properties
|
||||
% of \mymeta{theorem group_2}.
|
||||
% In other words, \mymeta{theorem group_2} is a parent of \mymeta{theorem group_1}
|
||||
% Declares \meta{theorem group_1} to \enquote{inherit} all properties
|
||||
% of \meta{theorem group_2}.
|
||||
% In other words, \meta{theorem group_2} is a parent of \meta{theorem group_1}
|
||||
% in a usual inheritance graph.
|
||||
%
|
||||
% The definitions of the groups themselves are unchanged,
|
||||
% but each new theorem defined with \mymeta{theorem group_1} will also
|
||||
% have the properties of \mymeta{theorem group_2}.
|
||||
% but each new theorem defined with \meta{theorem group_1} will also
|
||||
% have the properties of \meta{theorem group_2}.
|
||||
%
|
||||
% Inheritance is transitive, when defining a new theorem, we just flatten out the
|
||||
% inheritance graph and apply all properties.
|
||||
%
|
||||
% Inheritance is subject to the usual theorem group hierarchies as discussed in
|
||||
% \autoref{subsec:theorem-group-precedence}.
|
||||
% This can even yield situations, where \mymeta{theorem group_1} inherits
|
||||
% from \mymeta{theorem group_2}, but \mymeta{theorem group_2} overwrites
|
||||
% \mymeta{theorem group_1}.
|
||||
% This can even yield situations, where \meta{theorem group_1} inherits
|
||||
% from \meta{theorem group_2}, but \meta{theorem group_2} overwrites
|
||||
% \meta{theorem group_1}.
|
||||
% \end{function}
|
||||
%
|
||||
% \subsection{Appending to theorem groups}
|
||||
|
@ -368,8 +347,8 @@
|
|||
% \begin{syntax}
|
||||
% \cs{AppendToTheoremGroup}\oarg{key=value list}\marg{theorem group}
|
||||
% \end{syntax}
|
||||
% Adds the properties given as \mymeta{key=value list} to the theorem group.
|
||||
% The syntax for the \mymeta{key=value list} is the same as in \cs{NewTheoremGroup}.
|
||||
% Adds the properties given as \meta{key=value list} to the theorem group.
|
||||
% The syntax for the \meta{key=value list} is the same as in \cs{NewTheoremGroup}.
|
||||
% \end{function}
|
||||
%
|
||||
% \subsection{Default theorem groups}
|
||||
|
@ -411,8 +390,8 @@
|
|||
% with which it has no relation.
|
||||
% \end{function}
|
||||
%
|
||||
% The reason for the two groups \kw{starred} and \kw{unnumbered}
|
||||
% to both exist is that the \kw{starred} group is \emph{meant} to be applied
|
||||
% The reason for the two groups \texttt{starred} and \texttt{unnumbered}
|
||||
% to both exist is that the \texttt{starred} group is \emph{meant} to be applied
|
||||
% to theorems that were called with a \enquote{*} in their name (thus the name),
|
||||
% whereas the \enquote{unnumbered} group \emph{means} that the environment
|
||||
% is 'just unnumbered'.
|
||||
|
@ -421,9 +400,9 @@
|
|||
% First, this enables more fine-tuning of the behavior of the theorems in post-processing
|
||||
% of a document.
|
||||
% Second, more importantly, this distinguishes semantically between the environments
|
||||
% \kw{theorem} and \kw{theorem*}, even if \kw{theorem} is in the \kw{unnumbered} group.
|
||||
% \texttt{theorem} and \texttt{theorem*}, even if \texttt{theorem} is in the \texttt{unnumbered} group.
|
||||
%
|
||||
% So assuming that \kw{theorem} is member of the \kw{unnumbered} group, both calls
|
||||
% So assuming that \texttt{theorem} is member of the \texttt{unnumbered} group, both calls
|
||||
%
|
||||
% \begin{verbatim}
|
||||
% \begin{theorem}
|
||||
|
@ -435,7 +414,7 @@
|
|||
% \end{verbatim}
|
||||
%
|
||||
% are defined and will produce the same result by default, but we could still
|
||||
% change the definition of the \kw{starred} group later to do anything we want.
|
||||
% change the definition of the \texttt{starred} group later to do anything we want.
|
||||
%
|
||||
% \begin{texnote}
|
||||
% The mentioned hierarchies are kept intact for newly defined theorem groups,
|
||||
|
@ -450,21 +429,21 @@
|
|||
% \begin{syntax}
|
||||
% \cs{NewGroupedTheorem}\oarg{key=value list}\marg{grouped theorem}
|
||||
% \end{syntax}
|
||||
% This defines \mymeta{grouped theorem} and \meta{grouped theorem*} as new theorem environments.
|
||||
% This defines \meta{grouped theorem} and \meta{grouped theorem*} as new theorem environments.
|
||||
% Its properties can be set by the following keys:
|
||||
%
|
||||
% \begin{description}
|
||||
%
|
||||
% \item
|
||||
%
|
||||
% \kw{name} $=$ \mymeta{displayed name}.
|
||||
% \texttt{name} $=$ \meta{displayed name}.
|
||||
% If given, this is the displayed name of the environment in the document.
|
||||
% If not present, the \mymeta{grouped theorem} is also used as the \mymeta{displayed name}
|
||||
% If not present, the \meta{grouped theorem} is also used as the \meta{displayed name}
|
||||
% in capitalized form.
|
||||
%
|
||||
% \item
|
||||
%
|
||||
% \kw{group} $=$ \marg{clist}
|
||||
% \texttt{group} $=$ \marg{clist}
|
||||
%
|
||||
% Makes this theorem a member of the listed groups.
|
||||
% It will inherit all respective properties of these groups.
|
||||
|
@ -473,7 +452,7 @@
|
|||
%
|
||||
% \item
|
||||
%
|
||||
% \kw{thmtools} = \marg{clist}
|
||||
% \texttt{thmtools} = \marg{clist}
|
||||
%
|
||||
% Passes these option to the \pkg{thmtools} environment that is declared internally.
|
||||
%
|
||||
|
@ -497,11 +476,11 @@
|
|||
% \cs{NewGroupedTheorem*}\oarg{key=value list}\marg{grouped theorem}
|
||||
% \end{syntax}
|
||||
% Behaves the same as \cs{NewGroupedTheorem},
|
||||
% but also adds the theorem(s) to the default \kw{unnumbered} group,
|
||||
% but also adds the theorem(s) to the default \texttt{unnumbered} group,
|
||||
% thus resulting in the environment not being numbered.
|
||||
%
|
||||
% This is thus equivalent to using \cs{NewGroupedTheorem} and adding the
|
||||
% \kw{unnumbered} group.
|
||||
% \texttt{unnumbered} group.
|
||||
% \end{function}
|
||||
%
|
||||
%
|
||||
|
@ -510,17 +489,17 @@
|
|||
%
|
||||
% \begin{function}{\NewGroupedTheoremFamily, \ProvideGroupedTheoremFamily}
|
||||
% \begin{syntax}
|
||||
% \cs{NewTheoremFamily}\oarg{key=value list}\marg{theorem family}
|
||||
% \cs{NewGroupedTheoremFamily}\oarg{key=value list}\marg{theorem family}
|
||||
% \end{syntax}
|
||||
%
|
||||
% Defines a family of grouped theorems.
|
||||
% The \mymeta{key=value list} accept the same arguments as the \cs{NewGroupedTheorem} macro.
|
||||
% The \meta{key=value list} accept the same arguments as the \cs{NewGroupedTheorem} macro.
|
||||
% However, for each \emph{subset} of the given groups,
|
||||
% a grouped theorem is defined.
|
||||
%
|
||||
% These grouped theorems are not meant to be accessed directly (but could),
|
||||
% so we omit their actual (internal) names here.
|
||||
% To call these, some \kw{GroupedTheoremFamilyOptions} have to specified,
|
||||
% To call these, some \texttt{GroupedTheoremFamilyOptions} have to specified,
|
||||
% see \cs{NewGroupedTheoremFamilyOptions}.
|
||||
%
|
||||
% Also, to the given groups, the \texttt{starred} group is added automatically.
|
||||
|
@ -534,12 +513,12 @@
|
|||
%
|
||||
% \begin{function}{\NewGroupedTheoremFamily*, \ProvideGroupedTheoremFamily*}
|
||||
% Behaves the same as \cs{NewGroupedTheoremFamily}, but also adds each variant
|
||||
% to the default \kw{unnumbered} group, thus resulting in the environments not being
|
||||
% to the default \texttt{unnumbered} group, thus resulting in the environments not being
|
||||
% numbered.
|
||||
%
|
||||
% This is \emph{almost} equivalent to calling \cs{NewGroupedTheoremFamily}
|
||||
% with the \kw{unnumbered} group being present, as it does not generate the variants
|
||||
% where the \kw{unnumbered} group is not present.
|
||||
% with the \texttt{unnumbered} group being present, as it does not generate the variants
|
||||
% where the \texttt{unnumbered} group is not present.
|
||||
% \end{function}
|
||||
%
|
||||
%
|
||||
|
@ -564,33 +543,33 @@
|
|||
% \marg{selection body}
|
||||
% \end{syntax}
|
||||
%
|
||||
% Defines two new environment with options, given by \mymeta{theorem family}
|
||||
% Defines two new environment with options, given by \meta{theorem family}
|
||||
% and \meta{theorem family*}.
|
||||
% The \mymeta{argument specification} can be any valid \pkg{xparse} argument specification.
|
||||
% The \meta{argument specification} can be any valid \pkg{xparse} argument specification.
|
||||
%
|
||||
% The \mymeta{selection body} is there to process the options of
|
||||
% the \mymeta{argument specification} and select which variant of the \mymeta{theorem family}
|
||||
% The \meta{selection body} is there to process the options of
|
||||
% the \meta{argument specification} and select which variant of the \meta{theorem family}
|
||||
% to enter.
|
||||
% The arguments are available as usual with \pkg{xparse} by \kw{\#1}, \kw{\#2}, \ldots
|
||||
% The arguments are available as usual with \pkg{xparse} by \texttt{\#1}, \texttt{\#2}, \ldots
|
||||
%
|
||||
% The body may also call any number of \cs{AddTheoremToGroup} calls,
|
||||
% which the enables the corresponding groups to be toggled.
|
||||
%
|
||||
% When the environment is called within the document, the options are parsed
|
||||
% as with \pkg{xparse} and the \mymeta{selection body} is executed.
|
||||
% Immediately after, the theorem variant of \mymeta{theorem family} with the specified groups
|
||||
% as with \pkg{xparse} and the \meta{selection body} is executed.
|
||||
% Immediately after, the theorem variant of \meta{theorem family} with the specified groups
|
||||
% by \cs{AddTheoremToGroup} is called.
|
||||
%
|
||||
% At the end of the environment, the \mymeta{selection body} is executed again and the
|
||||
% At the end of the environment, the \meta{selection body} is executed again and the
|
||||
% called theorem variant is ended again.
|
||||
%
|
||||
% The possible theorem variants that the newly declared environment will call
|
||||
% \emph{have to be generated subsequently} by a call to the \cs{NewGroupedTheoremFamily}
|
||||
% function.
|
||||
\begin{danger}
|
||||
As always, if you do not wish the \meta{theorem family*} version to be generated,
|
||||
you can pass \texttt{starred version = false} as an additional key.
|
||||
\end{danger}
|
||||
% \begin{danger}
|
||||
% As always, if you do not wish the \meta{theorem family*} version to be generated,
|
||||
% you can pass \texttt{starred version = false} as an additional key.
|
||||
% \end{danger}
|
||||
%
|
||||
% \end{function}
|
||||
%
|
||||
|
@ -605,7 +584,7 @@
|
|||
% \end{syntax}
|
||||
%
|
||||
% Does the same as \cs{NewGroupedTheoremFamilyOptions},
|
||||
% but calls the variants with the additional \kw{unnumbered} group.
|
||||
% but calls the variants with the additional \texttt{unnumbered} group.
|
||||
%
|
||||
% The possible theorem variants have to be generated
|
||||
% with the \cs{NewGroupedTheoremFamily*} command before.
|
||||
|
@ -620,7 +599,12 @@
|
|||
% internal programming interface.
|
||||
%
|
||||
% When building on top of this package, you can also use this interface,
|
||||
% which is possibly easier to use.
|
||||
% which is possibly easier to use in some cases.
|
||||
%
|
||||
% Most of the time, however, the document level commands will provide
|
||||
% a better interface that just accepts more options than the
|
||||
% underlying \LaTeX3 interface does.
|
||||
% Feel free to just use these directly.
|
||||
%
|
||||
% In general, for functions that use key-value syntax, there are typically
|
||||
% three (public) versions of the command, namely
|
||||
|
@ -636,23 +620,10 @@
|
|||
% \item A \LaTeX2e document command. These were documented before,
|
||||
% and these just wrap the second type of command.
|
||||
% \end{itemize}
|
||||
% If the corresponding command would be something like \enquote{new foo},
|
||||
% The syntax will typically be
|
||||
% \begin{itemize}
|
||||
% \item \cs{groupthm_new_foo:mmm}\mymeta{mandatory args}\mymeta{optional args},
|
||||
% where the \mymeta{mandatory args} list the mandatory args of the \LaTeX2e
|
||||
% interface, and the \mymeta{optional args} list the optional args
|
||||
% of the key-value interface, but requiring them mandatory as well.
|
||||
% \item \cs{groupthm_new_foo_from_keys:mmm}\marg{key=value list}\mymeta{mandatory args}
|
||||
% where we pass a \texttt{clist} as the first argument and all mandatory args
|
||||
% as further mandatory arguments.
|
||||
% \item \cs{NewFoo}\oarg{key=value list}\mymeta{mandatory args},
|
||||
% where the keys can be passed optionally.
|
||||
% \end{itemize}
|
||||
%
|
||||
% \subsection{Theorem groups}
|
||||
%
|
||||
%
|
||||
% \subsection{Theorem groups}
|
||||
%
|
||||
% \begin{function}
|
||||
% {
|
||||
% \groupthm_new_group:nn,
|
||||
|
@ -806,7 +777,7 @@
|
|||
% \groupthm_declare_family_options:nnnn,
|
||||
% }
|
||||
% \begin{syntax}
|
||||
% \cs{groupthm_new_family_options}\marg{theorem family}\marg{arg spec}
|
||||
% \cs{groupthm_new_family_options:nnnn}\marg{theorem family}\marg{arg spec}
|
||||
% \marg{selection body}\marg{groups}
|
||||
% \end{syntax}
|
||||
%
|
||||
|
@ -849,7 +820,7 @@
|
|||
%
|
||||
% \begin{macro}{\@@_thmtools_declare_theorem:nn, \@@_thmtools_declare_theorem:Vn}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_thmtools_declare_theorem:nn} \mymeta{theorem name}\mymeta{thmtools keyval args}
|
||||
% \cs{@@_thmtools_declare_theorem:nn} \meta{theorem name}\meta{thmtools keyval args}
|
||||
% \end{syntax}
|
||||
%
|
||||
% This is just a private wrapper around \cs{declaretheorem} of the \pkg{thmtools} package.
|
||||
|
@ -870,7 +841,7 @@
|
|||
% hook role setting mechanism:
|
||||
% \begin{macro}{\@@_hook_gset_rule_foreach:nNnn}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_hook_gset_rule_foreach:nNnn}\marg{hook}\mymeta{clist name}\mymeta{relation}\mymeta{label}
|
||||
% \cs{@@_hook_gset_rule_foreach:nNnn}\marg{hook}\meta{clist name}\meta{relation}\meta{label}
|
||||
% \end{syntax}
|
||||
%
|
||||
% This is a wrapper around the \cs{hook_gset_rule:nnnn} macro
|
||||
|
@ -993,7 +964,7 @@
|
|||
%
|
||||
% \begin{variable}
|
||||
% {
|
||||
% \l_@@_starred_version_bool,
|
||||
% \l_@@_key_starred_version_bool,
|
||||
% \l_@@_key_prefix_tl, \l_@@_key_name_tl, \l_@@_key_suffix_tl,
|
||||
% \l_@@_key_group_clist, \l_@@_key_mapname_clist, \l_@@_key_thmtools_clist
|
||||
% }
|
||||
|
@ -1012,7 +983,7 @@
|
|||
%
|
||||
% \begin{variable}
|
||||
% {
|
||||
% \l_@@_starred_version_bool
|
||||
% \l_@@_starred_version_bool,
|
||||
% \l_@@_prefix_tl,
|
||||
% \l_@@_name_tl,
|
||||
% \l_@@_suffix_tl,
|
||||
|
@ -1141,7 +1112,7 @@
|
|||
% Sets the packages keys and normalizes the retrieved values, that is,
|
||||
% clears old set keys, stores all keys in local variables,
|
||||
% and replaces the \cs{l_@@_name_tl} with the capitalized version of the
|
||||
% \mymeta{fallback name}.
|
||||
% \meta{fallback name}.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_set_normalized_keys:nnn #1 #2 #3
|
||||
|
@ -1555,11 +1526,13 @@
|
|||
%
|
||||
% This is a wrapper around the \cs{@@_define:nnnNNNn} macro.
|
||||
% It is intended to wrap the multiple variants of it into a family of macros indicating
|
||||
% the variant in their name, e.g.~to define \cs{groupthm_new_group}, \cs{groupthm_renew_group},
|
||||
% \cs{groupthm_provide_group} and \cs{groupthm_declare_group} in the same way except for their
|
||||
% the variant in their name, e.g.~to define \cs{groupthm_new_group:nnnnn},
|
||||
% \cs{groupthm_renew_group:nnnnn},
|
||||
% \cs{groupthm_provide_group:nnnnn} and \cs{groupthm_declare_group:nnnnn}
|
||||
% in the same way except for their
|
||||
% indicated declaration behavior, to avoid repetition when defining these.
|
||||
%
|
||||
% The first five arguments work the same way as in \cs{@@_define:nnnNNn},
|
||||
% The first five arguments work the same way as in \cs{@@_define:nnnnNNn},
|
||||
% except that \meta{declarator list} is now a comma separated list.
|
||||
% In \meta{existence cs}, \texttt{\#\#1} is used to denote the \meta{instance}
|
||||
% that has currently been called to define.
|
||||
|
@ -1691,6 +1664,22 @@
|
|||
%
|
||||
% Finally, we provide \LaTeX2e wrappers as document commands for these.
|
||||
%
|
||||
% \begin{macro}{\@@_new_document_command:Nnn, \@@_new_document_command:cnn}
|
||||
%
|
||||
% Private wrappers around \cs{NewDocumentCommand}.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_new_document_command:Nnn #1 #2 #3
|
||||
{
|
||||
\NewDocumentCommand { #1 } { #2 } { #3 }
|
||||
}
|
||||
\cs_generate_variant:Nn \@@_new_document_command:Nnn { c n n }
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_wrap_multiple_document:nnnn}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_wrap_multiple_document:nnnn}\marg{declarator list}\marg{function name}\marg{arg spec}\marg{code}
|
||||
|
@ -1701,16 +1690,11 @@
|
|||
% and upper-case versions of the current declarator.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_new_document_command:Nnn #1 #2 #3
|
||||
{
|
||||
\NewDocumentCommand { #1 } { #2 } { #3 }
|
||||
}
|
||||
\cs_generate_variant:Nn \@@_new_document_command:Nnn { c n n }
|
||||
\cs_new:Npn \@@_wrap_multiple_document:nnnn #1 #2 #3 #4
|
||||
{
|
||||
\cs_set:Npn \@@_map_aux:n ##1
|
||||
{
|
||||
\def \Declarator { \text_titlecase_first:n { ##1 } }
|
||||
\cs_set_eq:Nn \@@_Declarator: { \text_titlecase_first:n { ##1 } }
|
||||
\@@_new_document_command:cnn { #2 } { #3 } { #4 }
|
||||
}
|
||||
\clist_map_function:nN { #1 } \@@_map_aux:n
|
||||
|
@ -1725,7 +1709,7 @@
|
|||
% \begin{macrocode}
|
||||
\@@_wrap_multiple_document:nnnn
|
||||
{ new, renew, provide, declare }
|
||||
{ \Declarator TheoremGroup }
|
||||
{ \@@_Declarator: TheoremGroup }
|
||||
{ O{} m }
|
||||
{
|
||||
\use:c { groupthm_#1 _group:nn } { ##1 } { ##2 }
|
||||
|
@ -1745,7 +1729,7 @@
|
|||
%
|
||||
% We have to normalize the arguments a little bit, namely replacing \texttt{higher}
|
||||
% and \texttt{lower} with \texttt{before} \texttt{after} respectively,
|
||||
% and prefix the \mymeta{keyname} with \texttt{__groupthm}
|
||||
% and prefix the \meta{keyname} with \texttt{__groupthm}
|
||||
% in case it is not the general hook \enquote{\texttt{??}}.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
|
@ -1837,7 +1821,7 @@
|
|||
%
|
||||
% \begin{macro}{\@@_flatten_groups_hierarchy:nN}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_flatten_groups_hierarchy:n}\marg{theorem groups}\marg{clist}
|
||||
% \cs{@@_flatten_groups_hierarchy:nN}\marg{theorem groups}\marg{clist}
|
||||
% \end{syntax}
|
||||
%
|
||||
% Expects a comma separated list of \meta{theorem group}s.
|
||||
|
@ -1926,12 +1910,12 @@
|
|||
%
|
||||
% \begin{macro}{\@@_powerset_clist_foreach:Nn}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_powerset_clist_foreach:Nn}\mymeta{clist}\marg{code}
|
||||
% \cs{@@_powerset_clist_foreach:Nn}\meta{clist}\marg{code}
|
||||
% \end{syntax}
|
||||
%
|
||||
% Executes \mymeta{code} for each subset of the given clist variable.
|
||||
% Executes \meta{code} for each subset of the given clist variable.
|
||||
% The value of the (local) variable is changes throughout the iteration,
|
||||
% and is thus available regularly in \mymeta{code}.
|
||||
% and is thus available regularly in \meta{code}.
|
||||
% Its value is restored at the end of the iteration.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
|
@ -2001,7 +1985,7 @@
|
|||
%
|
||||
% \begin{macro}{\@@_use_group:n}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_use_group:n}\mymeta{theorem group}
|
||||
% \cs{@@_use_group:n}\meta{theorem group}
|
||||
% \end{syntax}
|
||||
%
|
||||
% Uses this theorem group, i.e.~applies its definition by writing
|
||||
|
@ -2021,10 +2005,10 @@
|
|||
%
|
||||
% \begin{macro}{\@@_use_function_on_name:n}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_use_function_on_name:n}\mymeta{function}
|
||||
% \cs{@@_use_function_on_name:n}\meta{function}
|
||||
% \end{syntax}
|
||||
%
|
||||
% The \mymeta{function} is expected to be of type \texttt{:n},
|
||||
% The \meta{function} is expected to be of type \texttt{:n},
|
||||
% This applies the function to the \cs{l_@@_name_tl}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
|
@ -2210,7 +2194,7 @@
|
|||
% \begin{macrocode}
|
||||
\@@_wrap_multiple_document:nnnn
|
||||
{ new, provide }
|
||||
{ \Declarator GroupedTheorem }
|
||||
{ \@@_Declarator: GroupedTheorem }
|
||||
{ s O{} m }
|
||||
{
|
||||
\use:c { groupthm_#1_theorem:nnn }
|
||||
|
@ -2231,24 +2215,24 @@
|
|||
% As a backend, we use the following auxiliary function
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_define_family:nnnnnn}
|
||||
% \begin{macro}{\@@_define_family:nnnnn}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_define_family:nnnnnn}\marg{family name}\marg{groups clist}
|
||||
% \cs{@@_define_family:nnnnn}\marg{family name}\marg{groups clist}
|
||||
% \marg{name}\marg{thmtools clist}\marg{extra groups clist}
|
||||
% \end{syntax}
|
||||
%
|
||||
% This will generate a new grouped theorem for each union of a subset of \mymeta{groups clist}
|
||||
% and the extra set \mymeta{extra groups clist}, with the given properties, that is
|
||||
% the \mymeta{nam} and \mymeta{thmtools clist} will be passed to the grouped theorem.
|
||||
% The \mymeta{theorem name} of the grouped theorem will be an internal name that contains
|
||||
% the \mymeta{family name} and the list of groups of this variant, that will be generated
|
||||
% This will generate a new grouped theorem for each union of a subset of \meta{groups clist}
|
||||
% and the extra set \meta{extra groups clist}, with the given properties, that is
|
||||
% the \meta{nam} and \meta{thmtools clist} will be passed to the grouped theorem.
|
||||
% The \meta{theorem name} of the grouped theorem will be an internal name that contains
|
||||
% the \meta{family name} and the list of groups of this variant, that will be generated
|
||||
% in a unique manner to later retrieve the generated theorems when parsing theorem families.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\cs_new:Npn \@@_define_family:nnnnn #1 #2 #3 #4 #5
|
||||
{
|
||||
% \end{macrocode}
|
||||
% Make a local copy of the \mymeta{groups clist} argument,
|
||||
% Make a local copy of the \meta{groups clist} argument,
|
||||
% and iterate over its powerset
|
||||
% \begin{macrocode}
|
||||
\clist_set:Nn \l_tmpa_clist { #2 }
|
||||
|
@ -2288,7 +2272,7 @@
|
|||
%
|
||||
% \begin{macro}{\groupthm_new_family:nnnnn,\groupthm_new_family:nVVVV}
|
||||
% \begin{syntax}
|
||||
% \cs{groupthm_new_theorem_family:nnnnn}\marg{theorem family}
|
||||
% \cs{groupthm_new_family:nnnnn}\marg{theorem family}
|
||||
% \marg{groups_1}\marg{name}\marg{thmtools clist}\marg{groups_2}
|
||||
% \end{syntax}
|
||||
%
|
||||
|
@ -2308,7 +2292,7 @@
|
|||
% \end{macro}
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\groupthm_new_family:nnn}
|
||||
% \begin{macro}{\groupthm_new_family:nnn, \groupthm_provide_family:nnn}
|
||||
% \begin{syntax}
|
||||
% \cs{groupthm_new_family:nnn}\marg{key=value list}\marg{theorem family}\marg{bool}
|
||||
% \end{syntax}
|
||||
|
@ -2360,7 +2344,7 @@
|
|||
% \begin{macrocode}
|
||||
\@@_wrap_multiple_document:nnnn
|
||||
{ new, provide }
|
||||
{ \Declarator GroupedTheoremFamily }
|
||||
{ \@@_Declarator: GroupedTheoremFamily }
|
||||
{ s O{} m }
|
||||
{
|
||||
\use:c { groupthm_#1_family:nnn }
|
||||
|
@ -2388,7 +2372,7 @@
|
|||
{
|
||||
% \end{macrocode}
|
||||
% As mentioned earlier, this bool will indicate whether we are
|
||||
% executing a \mymeta{selection body} from some family options.
|
||||
% executing a \meta{selection body} from some family options.
|
||||
% If used outside, we emit an error message.
|
||||
% \begin{macrocode}
|
||||
\bool_if:NTF \l_@@_in_family_options_environment_bool
|
||||
|
@ -2420,19 +2404,19 @@
|
|||
%
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_define_family_options::nnnn}
|
||||
% \begin{macro}{\@@_define_family_options:nnnn}
|
||||
% \begin{syntax}
|
||||
% \cs{@@_define_family_options::nnnn}\marg{theorem family}
|
||||
% \cs{@@_define_family_options:nnnn}\marg{theorem family}
|
||||
% \marg{argument specification}\marg{selection body}\marg{extra groups}
|
||||
% \end{syntax}
|
||||
%
|
||||
% This declares a new theorem variant option parser, i.e.~ introduces the environment
|
||||
% \mymeta{theorem family} with signature \marg{argument specification}.
|
||||
% \meta{theorem family} with signature \marg{argument specification}.
|
||||
%
|
||||
% The \mymeta{selection body} will be executed and selects some groups the environment shall have.
|
||||
% The \mymeta{extra groups} will be added regardless of the arguments given
|
||||
% to the \mymeta{theorem family}
|
||||
% The \mymeta{declaring backend} is one of \texttt{New}, \texttt{Renew}, \texttt{Provide}
|
||||
% The \meta{selection body} will be executed and selects some groups the environment shall have.
|
||||
% The \meta{extra groups} will be added regardless of the arguments given
|
||||
% to the \meta{theorem family}
|
||||
% The \meta{declaring backend} is one of \texttt{New}, \texttt{Renew}, \texttt{Provide}
|
||||
% and \texttt{Declare} and is given to the \texttt{DocumentEnvironment} command from \pkg{xpars}.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
|
@ -2443,7 +2427,7 @@
|
|||
{ #2 }
|
||||
{
|
||||
% \end{macrocode}
|
||||
% We can now clear the group list and execute the \mymeta{selection body}
|
||||
% We can now clear the group list and execute the \meta{selection body}
|
||||
% that populates this list again.
|
||||
% Additionally, we add the groups that should always be present and activate the
|
||||
% \cs{AddTheoremToGroup} macro by setting the bool.
|
||||
|
@ -2490,7 +2474,7 @@
|
|||
%
|
||||
%
|
||||
% All other macros are now essentially wrappers around this aux macro,
|
||||
% passing different \mymeta{extra groups} to them
|
||||
% passing different \meta{extra groups} to them
|
||||
%
|
||||
% \begin{macro}
|
||||
% {
|
||||
|
@ -2524,7 +2508,17 @@
|
|||
% It remains to wrap these into document commands
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\NewGroupedTheoremFamilyOptions, \NewGroupedTheoremFamilyOptions*}
|
||||
% \begin{macro}
|
||||
% {
|
||||
% \NewGroupedTheoremFamilyOptions,
|
||||
% \NewGroupedTheoremFamilyOptions*,
|
||||
% \RenewGroupedTheoremFamilyOptions,
|
||||
% \RenewGroupedTheoremFamilyOptions*,
|
||||
% \ProvideGroupedTheoremFamilyOptions,
|
||||
% \ProvideGroupedTheoremFamilyOptions*,
|
||||
% \DeclareGroupedTheoremFamilyOptions,
|
||||
% \DeclareGroupedTheoremFamilyOptions*,
|
||||
% }
|
||||
% \begin{syntax}
|
||||
% \cs{NewGroupedTheoremFamilyOptions}\marg{family name}\marg{signature}
|
||||
% \marg{selection body}
|
||||
|
@ -2533,7 +2527,7 @@
|
|||
% \begin{macrocode}
|
||||
\@@_wrap_multiple_document:nnnn
|
||||
{ new, renew, provide, declare }
|
||||
{ \Declarator GroupedTheoremFamilyOptions }
|
||||
{ \@@_Declarator: GroupedTheoremFamilyOptions }
|
||||
{ s O{} m m m }
|
||||
{
|
||||
\keys_set:nn { groupthm / theorem ~ family ~ options } { starred ~ version }
|
||||
|
@ -2584,3 +2578,4 @@
|
|||
% \ExplSyntaxOff
|
||||
%
|
||||
% \newpage
|
||||
% \PrintIndex
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
%% in the same archive or directory.)
|
||||
%% File: groupthm.dtx
|
||||
\ProvidesExplPackage{groupthm}{2022/01/17}{0.0.1}{Grouped theorems.}
|
||||
|
||||
{
|
||||
\groupthm_new_family:nnnnn, \groupthm_provide_family:nnnnn,
|
||||
\groupthm_new_family:nVVVV, \groupthm_provide_family:nVVVV
|
||||
}
|
||||
\RequirePackage{amsthm}
|
||||
\RequirePackage{thmtools}
|
||||
\cs_new:Npn \__groupthm_thmtools_declare_theorem:nn #1 #2
|
||||
|
@ -367,22 +372,22 @@
|
|||
}
|
||||
\cs_generate_variant:Nn \groupthm_new_group:nn { n x }
|
||||
\cs_new:Npn \__groupthm_new_document_command:Nnn #1 #2 #3
|
||||
{
|
||||
\NewDocumentCommand { #1 } { #2 } { #3 }
|
||||
}
|
||||
{
|
||||
\NewDocumentCommand { #1 } { #2 } { #3 }
|
||||
}
|
||||
\cs_generate_variant:Nn \__groupthm_new_document_command:Nnn { c n n }
|
||||
\cs_new:Npn \__groupthm_wrap_multiple_document:nnnn #1 #2 #3 #4
|
||||
{
|
||||
\cs_set:Npn \__groupthm_map_aux:n ##1
|
||||
{
|
||||
\def \Declarator { \text_titlecase_first:n { ##1 } }
|
||||
\cs_set_eq:Nn \__groupthm_Declarator: { \text_titlecase_first:n { ##1 } }
|
||||
\__groupthm_new_document_command:cnn { #2 } { #3 } { #4 }
|
||||
}
|
||||
\clist_map_function:nN { #1 } \__groupthm_map_aux:n
|
||||
}
|
||||
\__groupthm_wrap_multiple_document:nnnn
|
||||
{ new, renew, provide, declare }
|
||||
{ \Declarator TheoremGroup }
|
||||
{ \__groupthm_Declarator: TheoremGroup }
|
||||
{ O{} m }
|
||||
{
|
||||
\use:c { groupthm_#1 _group:nn } { ##1 } { ##2 }
|
||||
|
@ -587,7 +592,7 @@
|
|||
}
|
||||
\__groupthm_wrap_multiple_document:nnnn
|
||||
{ new, provide }
|
||||
{ \Declarator GroupedTheorem }
|
||||
{ \__groupthm_Declarator: GroupedTheorem }
|
||||
{ s O{} m }
|
||||
{
|
||||
\use:c { groupthm_#1_theorem:nnn }
|
||||
|
@ -649,7 +654,7 @@
|
|||
}
|
||||
\__groupthm_wrap_multiple_document:nnnn
|
||||
{ new, provide }
|
||||
{ \Declarator GroupedTheoremFamily }
|
||||
{ \__groupthm_Declarator: GroupedTheoremFamily }
|
||||
{ s O{} m }
|
||||
{
|
||||
\use:c { groupthm_#1_family:nnn }
|
||||
|
@ -717,7 +722,7 @@
|
|||
\cs_generate_variant:Nn \groupthm_declare_family_options:nnnn { n n n V }
|
||||
\__groupthm_wrap_multiple_document:nnnn
|
||||
{ new, renew, provide, declare }
|
||||
{ \Declarator GroupedTheoremFamilyOptions }
|
||||
{ \__groupthm_Declarator: GroupedTheoremFamilyOptions }
|
||||
{ s O{} m m m }
|
||||
{
|
||||
\keys_set:nn { groupthm / theorem ~ family ~ options } { starred ~ version }
|
||||
|
|
Loading…
Reference in a new issue