write all definitions of theorems to aux file at end of document
This commit is contained in:
parent
32daab8d20
commit
f878e66cdf
1 changed files with 51 additions and 16 deletions
|
@ -851,6 +851,16 @@
|
|||
{
|
||||
\tl_log:n { Declaring ~ thmtools ~ theorem ~ #2 }
|
||||
\declaretheorem [ #1 ] { #2 }
|
||||
\bool_if:NT \g_@@_cache_bool
|
||||
{
|
||||
\hook_gput_code:nnn { enddocument / afterlastpage } { groupthm }
|
||||
{
|
||||
\iow_now:cn { @auxout }
|
||||
{
|
||||
\declaretheorem [ #1 ] { #2 }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
\cs_generate_variant:Nn \@@_thmtools_declare_theorem:nn { V n }
|
||||
% \end{macrocode}
|
||||
|
@ -858,6 +868,7 @@
|
|||
%
|
||||
%
|
||||
%
|
||||
%
|
||||
% It also comes in handy to have a stronger version of the
|
||||
% hook role setting mechanism:
|
||||
% \begin{macro}{\@@_hook_gset_rule_foreach:nNnn}
|
||||
|
@ -2676,6 +2687,30 @@
|
|||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
% \begin{macro}{\@@_fake_declare_theorem:w}
|
||||
% \begin{syntax}
|
||||
%
|
||||
% \end{syntax}
|
||||
%
|
||||
% This is a fake version of the \cs{declaretheorem} macro
|
||||
% that accepts the arguments but does nothing.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\NewDocumentCommand { \@@_fake_declare_theorem:w }{ o m }
|
||||
{
|
||||
\relax
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\hook_gput_code:nnn { enddocument / afterlastpage } { groupthm }
|
||||
{
|
||||
\let \declaretheorem \@@_fake_declare_theorem:w
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
% \begin{macrocode}
|
||||
|
|
Loading…
Reference in a new issue