autodetect proof depth and convert to subproof when using smart proof environment
This commit is contained in:
parent
23d4b92367
commit
3d6f2501df
1 changed files with 6 additions and 9 deletions
|
@ -74,8 +74,6 @@ __END_OPTIONS_X__
|
||||||
\end__PACKAGE_PREFIX__saved@subproof
|
\end__PACKAGE_PREFIX__saved@subproof
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\NewDocumentEnvironment{refproof}{s m o}
|
\NewDocumentEnvironment{refproof}{s m o}
|
||||||
{
|
{
|
||||||
\stepcounter{__PACKAGE_PREFIX__proofdepth}
|
\stepcounter{__PACKAGE_PREFIX__proofdepth}
|
||||||
|
@ -130,25 +128,24 @@ __END_OPTIONS_X__
|
||||||
\setcounter{__PACKAGE_PREFIX__save@claim}{\value{claim}}
|
\setcounter{__PACKAGE_PREFIX__save@claim}{\value{claim}}
|
||||||
\setcounter{claim}{0}
|
\setcounter{claim}{0}
|
||||||
\def\theclaim{\arabic{claim}}
|
\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}{%
|
\IfBooleanTF{#1}{%
|
||||||
\translate{Subproof*}%
|
\translate{Subproof*}%
|
||||||
}{%
|
}{%
|
||||||
\translate{Subproof}%
|
\translate{Subproof}%
|
||||||
}%
|
}%
|
||||||
\IfValueT{#2}{\space(#2)}%
|
\IfValueT{#2}{\space(#2)}%
|
||||||
|
]
|
||||||
\else%
|
\else%
|
||||||
|
__PACKAGE_MACRO__(saved@proof)[%
|
||||||
\IfBooleanTF{#1}{%
|
\IfBooleanTF{#1}{%
|
||||||
\translate{Proof*}%
|
\translate{Proof*}%
|
||||||
}{%
|
}{%
|
||||||
\translate{Proof}%
|
\translate{Proof}%
|
||||||
}%
|
}%
|
||||||
\IfValueT{#2}{\space(#2)}%
|
\IfValueT{#2}{\space(#2)}%
|
||||||
\fi
|
|
||||||
]
|
]
|
||||||
\ifnum\value{__PACKAGE_PREFIX__proofdepth}>1
|
|
||||||
% \let\mathqed{\blackqed}
|
|
||||||
\fi
|
\fi
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue