From 11d13efe629b1f4b20e441690f7baf0fe9d12c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Tue, 1 Feb 2022 11:59:17 +0100 Subject: [PATCH] don't write anything to aux file when not in cache mode --- src/environments/groupthm/groupthm.dtx | 38 +++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/src/environments/groupthm/groupthm.dtx b/src/environments/groupthm/groupthm.dtx index 3b8129c..81385f1 100644 --- a/src/environments/groupthm/groupthm.dtx +++ b/src/environments/groupthm/groupthm.dtx @@ -2581,18 +2581,21 @@ \@@_sort_group_names: \end { __#1__groups_ \clist_use:Nn \l_@@_group_clist { _ } } } - \hook_gput_code:nnn { enddocument / afterlastpage } { groupthm } + \bool_if:NT \g_@@_cache_bool { - \iow_now:cn { @auxout } - { - \ExplSyntaxOn - \hook_gput_code:nnn { @@ / auxfile define cached } { groupthm } - { - \@@_define_family_options:nnnn { #1 } { #2 } { #3 } { #4 } - } - \ExplSyntaxOff + \hook_gput_code:nnn { enddocument / afterlastpage } { groupthm } + { + \iow_now:cn { @auxout } + { + \ExplSyntaxOn + \hook_gput_code:nnn { @@ / auxfile define cached } { groupthm } + { + \@@_define_family_options:nnnn { #1 } { #2 } { #3 } { #4 } + } + \ExplSyntaxOff + } } - } + } } % \end{macrocode} % \end{macro} @@ -2761,14 +2764,17 @@ % query this value in the next run as soon as possible. % % \begin{macrocode} -\hook_gput_code:nnn { enddocument / afterlastpage } { before-groupthm } +\bool_if:NT \g_@@_cache_bool { - \iow_now:cx { @auxout } + \hook_gput_code:nnn { enddocument / afterlastpage } { before-groupthm } { - \token_to_str:N \ExplSyntaxOn - \int_gset:Nn \g_@@_cache_version_aux_int - { \int_use:N \g_@@_cache_version_document_int } - \token_to_str:N \ExplSyntaxOff + \iow_now:cx { @auxout } + { + \token_to_str:N \ExplSyntaxOn + \int_gset:Nn \g_@@_cache_version_aux_int + { \int_use:N \g_@@_cache_version_document_int } + \token_to_str:N \ExplSyntaxOff + } } } \hook_gset_rule:nnnn { enddocument / afterlastpage } { before-groupthm } { before } { groupthm }