From 47449c57cba8fb88e34a93f1427d697895039fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 9 Jan 2022 20:20:56 +0100 Subject: [PATCH] fix infinite recursion bug in claim counter. fix some spacing --- src/wip/refproof.pysty | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/wip/refproof.pysty b/src/wip/refproof.pysty index 9fefbde..1db7bdd 100644 --- a/src/wip/refproof.pysty +++ b/src/wip/refproof.pysty @@ -83,28 +83,27 @@ __END_OPTIONS_X__ \ifcsdef{the__PACKAGE_PREFIX__#2@save@claim}{ \setcounter{claim}{\value{__PACKAGE_PREFIX__#2@save@claim}} \def__PACKAGE_MACRO__(proofprefix){ - \IfBooleanTF{#1}{ - \translate{Continuation of proof* of} - }{ - \translate{Continuation of proof of} + \IfBooleanTF{#1}{% + \translate{Continuation of proof* of}% + }{% + \translate{Continuation of proof of}% } } }{ \newcounter{__PACKAGE_PREFIX__#2@save@claim} \setcounter{claim}{0} - \def__PACKAGE_MACRO__(proofprefix){ - \IfBooleanTF{#1}{ - \translate{Proof* of} - }{ - \translate{Proof of} + \def__PACKAGE_MACRO__(proofprefix){% + \IfBooleanTF{#1}{% + \translate{Proof* of}% + }{% + \translate{Proof of}% } } } % Set up counter number printing as subindexed by numbering of the reference - \let__PACKAGE_MACRO__(theoldclaim)\theclaim - \def\theclaim{\getrefnumber{#2}.__PACKAGE_MACRO__(theoldclaim)} + \def\theclaim{\getrefnumber{#2}.\arabic{claim}} % Now, start the actual proof - __PACKAGE_MACRO__(saved@proof)[ + __PACKAGE_MACRO__(saved@proof)[% __PACKAGE_MACRO__(proofprefix)\space__PACKAGE_MACRO__(autoref){#2}% \IfValueT{#3}{\space(#3)}% ]