autodetect proof depth and convert to subproof when using smart proof environment

This commit is contained in:
Maximilian Keßler 2022-01-09 15:35:16 +01:00
parent 23d4b92367
commit 3d6f2501df

View file

@ -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%
__PACKAGE_MACRO__(saved@subproof)[%
\IfBooleanTF{#1}{%
\translate{Subproof*}%
}{%
\translate{Subproof}%
}%
\IfValueT{#2}{\space(#2)}%
]
\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
}
{