fix infinite recursion bug in claim counter. fix some spacing

This commit is contained in:
Maximilian Keßler 2022-01-09 20:20:56 +01:00
parent f4d079796a
commit 47449c57cb

View file

@ -83,28 +83,27 @@ __END_OPTIONS_X__
\ifcsdef{the__PACKAGE_PREFIX__#2@save@claim}{ \ifcsdef{the__PACKAGE_PREFIX__#2@save@claim}{
\setcounter{claim}{\value{__PACKAGE_PREFIX__#2@save@claim}} \setcounter{claim}{\value{__PACKAGE_PREFIX__#2@save@claim}}
\def__PACKAGE_MACRO__(proofprefix){ \def__PACKAGE_MACRO__(proofprefix){
\IfBooleanTF{#1}{ \IfBooleanTF{#1}{%
\translate{Continuation of proof* of} \translate{Continuation of proof* of}%
}{ }{%
\translate{Continuation of proof of} \translate{Continuation of proof of}%
} }
} }
}{ }{
\newcounter{__PACKAGE_PREFIX__#2@save@claim} \newcounter{__PACKAGE_PREFIX__#2@save@claim}
\setcounter{claim}{0} \setcounter{claim}{0}
\def__PACKAGE_MACRO__(proofprefix){ \def__PACKAGE_MACRO__(proofprefix){%
\IfBooleanTF{#1}{ \IfBooleanTF{#1}{%
\translate{Proof* of} \translate{Proof* of}%
}{ }{%
\translate{Proof of} \translate{Proof of}%
} }
} }
} }
% Set up counter number printing as subindexed by numbering of the reference % Set up counter number printing as subindexed by numbering of the reference
\let__PACKAGE_MACRO__(theoldclaim)\theclaim \def\theclaim{\getrefnumber{#2}.\arabic{claim}}
\def\theclaim{\getrefnumber{#2}.__PACKAGE_MACRO__(theoldclaim)}
% Now, start the actual proof % Now, start the actual proof
__PACKAGE_MACRO__(saved@proof)[ __PACKAGE_MACRO__(saved@proof)[%
__PACKAGE_MACRO__(proofprefix)\space__PACKAGE_MACRO__(autoref){#2}% __PACKAGE_MACRO__(proofprefix)\space__PACKAGE_MACRO__(autoref){#2}%
\IfValueT{#3}{\space(#3)}% \IfValueT{#3}{\space(#3)}%
] ]