implement lazy declaration at begin of documentation when caching is active

This commit is contained in:
Maximilian Keßler 2022-01-31 19:26:38 +01:00
parent b041d8c990
commit 32daab8d20
2 changed files with 26 additions and 10 deletions

View file

@ -2276,17 +2276,9 @@
{ \@@_Declarator: GroupedTheorem }
{ s O{} m }
{
\bool_if:nTF
\bool_if:NTF \g_@@_cache_bool
{
\g_@@_cache_bool
&&
\int_compare_p:n
{
\g_@@_cache_version_aux_int < \g_@@_cache_version_document_int
}
}
{
\hook_gput_code:nnn {@@/lazy} { groupthm }
\hook_gput_code:nnn {@@/definelazy} { groupthm }
}
{
\use:n
@ -2662,6 +2654,30 @@
%
%
%
%
% \begin{macrocode}
\hook_gput_code:nnn { begindocument } { groupthm }
{
\bool_if:nTF
{
\g_@@_cache_bool
&&
\int_compare_p:n
{
\g_@@_cache_version_aux_int < \g_@@_cache_version_document_int
}
}
{
\hook_use_once:n { @@ / define lazy }
}
{
}
}
% \end{macrocode}
%
%
%
%
% \begin{macrocode}
%</package>
% \end{macrocode}