provide proper proofdepth macro. fix subproof
This commit is contained in:
parent
0011cb2270
commit
eb06eb8fbc
2 changed files with 9 additions and 8 deletions
|
@ -75,7 +75,7 @@ __END_OPTIONS_X__
|
|||
\end__PACKAGE_PREFIX__saved@subproof
|
||||
{
|
||||
|
||||
\NewDocumentEnvironment{refproof}{s m o}
|
||||
\NewDocumentEnvironment{refproof}{s m !o}
|
||||
{
|
||||
\stepcounter{__PACKAGE_PREFIX__proofdepth}
|
||||
%Save the current claim counter
|
||||
|
@ -124,7 +124,7 @@ __END_OPTIONS_X__
|
|||
|
||||
%%% A 'smart' proof environment
|
||||
\AtBeginDocument{
|
||||
\RenewDocumentEnvironment{proof}{s o}
|
||||
\RenewDocumentEnvironment{proof}{!s !o}
|
||||
{
|
||||
\stepcounter{__PACKAGE_PREFIX__proofdepth}
|
||||
%Save the current claim counter
|
||||
|
@ -160,11 +160,12 @@ __END_OPTIONS_X__
|
|||
}
|
||||
}
|
||||
|
||||
\NewDocumentEnvironment{subproof}{s o}
|
||||
\NewDocumentEnvironment{subproof}{!s !o}
|
||||
{
|
||||
\stepcounter{__PACKAGE_PREFIX__proofdepth}
|
||||
%Save the current claim counter
|
||||
\setcounter{__PACKAGE_PREFIX__save@claim}{\value{claim}}
|
||||
\protected@edef__PACKAGE_MACRO__(dummy@expand){\arabic{claim}}
|
||||
\FSPush{__PACKAGE_PREFIX__save@claim}{__PACKAGE_MACRO__(dummy@expand)}
|
||||
\setcounter{claim}{0}
|
||||
\def\theclaim{\arabic{claim}}
|
||||
__PACKAGE_MACRO__(saved@subproof)[%
|
||||
|
@ -179,6 +180,9 @@ __END_OPTIONS_X__
|
|||
{
|
||||
__PACKAGE_MACRO__(saved@endproof)
|
||||
%Restore previous claim counter
|
||||
\setcounter{claim}{\value{__PACKAGE_PREFIX__save@claim}}
|
||||
\setcounter{claim}{\FSTop{__PACKAGE_PREFIX__save@claim}}
|
||||
\FSPop{__PACKAGE_PREFIX__save@claim}
|
||||
\addtocounter{__PACKAGE_PREFIX__proofdepth}{-1}
|
||||
}
|
||||
|
||||
\newcommand\proofdepth{\arabic{__PACKAGE_PREFIX__proofdepth}}
|
||||
|
|
|
@ -35,14 +35,11 @@
|
|||
\end{claim}
|
||||
|
||||
\begin{proof}
|
||||
\proofdepth
|
||||
\begin{claim}
|
||||
hi
|
||||
\end{claim}
|
||||
\begin{proof}
|
||||
\proofdepth
|
||||
\end{proof}
|
||||
\proofdepth
|
||||
\begin{claim}
|
||||
|
||||
\end{claim}
|
||||
|
|
Loading…
Reference in a new issue