From 3d6f2501dfb445d1cd2b2d55bf370347840406cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 9 Jan 2022 15:35:16 +0100 Subject: [PATCH] autodetect proof depth and convert to subproof when using smart proof environment --- src/wip/refproof.pysty | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/wip/refproof.pysty b/src/wip/refproof.pysty index eabee1b..14c6a1d 100644 --- a/src/wip/refproof.pysty +++ b/src/wip/refproof.pysty @@ -74,8 +74,6 @@ __END_OPTIONS_X__ \end__PACKAGE_PREFIX__saved@subproof { - - \NewDocumentEnvironment{refproof}{s m o} { \stepcounter{__PACKAGE_PREFIX__proofdepth} @@ -130,25 +128,24 @@ __END_OPTIONS_X__ \setcounter{__PACKAGE_PREFIX__save@claim}{\value{claim}} \setcounter{claim}{0} \def\theclaim{\arabic{claim}} - __PACKAGE_MACRO__(saved@proof)[% - \ifnum\value{__PACKAGE_PREFIX__proofdepth}>1% + \ifnum\value{__PACKAGE_PREFIX__proofdepth}>1% + __PACKAGE_MACRO__(saved@subproof)[% \IfBooleanTF{#1}{% \translate{Subproof*}% }{% \translate{Subproof}% }% \IfValueT{#2}{\space(#2)}% - \else% + ] + \else% + __PACKAGE_MACRO__(saved@proof)[% \IfBooleanTF{#1}{% \translate{Proof*}% }{% \translate{Proof}% }% \IfValueT{#2}{\space(#2)}% - \fi - ] - \ifnum\value{__PACKAGE_PREFIX__proofdepth}>1 - % \let\mathqed{\blackqed} + ] \fi } {