add explicit subproof environment
This commit is contained in:
parent
3d6f2501df
commit
f4d079796a
2 changed files with 33 additions and 1 deletions
|
@ -120,6 +120,7 @@ __END_OPTIONS_X__
|
|||
|
||||
\def\proofdepth{Depth:~\the__PACKAGE_PREFIX__proofdepth}
|
||||
|
||||
%%% A 'smart' proof environment
|
||||
\AtBeginDocument{
|
||||
\RenewDocumentEnvironment{proof}{s o}
|
||||
{
|
||||
|
@ -156,3 +157,25 @@ __END_OPTIONS_X__
|
|||
}
|
||||
}
|
||||
|
||||
\NewDocumentEnvironment{subproof}{s o}
|
||||
{
|
||||
\stepcounter{__PACKAGE_PREFIX__proofdepth}
|
||||
%Save the current claim counter
|
||||
\setcounter{__PACKAGE_PREFIX__save@claim}{\value{claim}}
|
||||
\setcounter{claim}{0}
|
||||
\def\theclaim{\arabic{claim}}
|
||||
__PACKAGE_MACRO__(saved@subproof)[%
|
||||
\IfBooleanTF{#1}{%
|
||||
\translate{Subproof*}%
|
||||
}{%
|
||||
\translate{Subproof}%
|
||||
}%
|
||||
\IfValueT{#2}{\space(#2)}%
|
||||
]
|
||||
}
|
||||
{
|
||||
__PACKAGE_MACRO__(saved@endproof)
|
||||
%Restore previous claim counter
|
||||
\setcounter{claim}{\value{__PACKAGE_PREFIX__save@claim}}
|
||||
\addtocounter{__PACKAGE_PREFIX__proofdepth}{-1}
|
||||
}
|
||||
|
|
|
@ -9,9 +9,18 @@
|
|||
\begin{document}
|
||||
\section{test}
|
||||
|
||||
|
||||
\begin{subproof}
|
||||
test
|
||||
\end{subproof}
|
||||
|
||||
\begin{subproof}*[hi]
|
||||
test
|
||||
\end{subproof}
|
||||
|
||||
\begin{proof}
|
||||
Beginn des Beweises:
|
||||
\begin{proof}
|
||||
\begin{proof}*
|
||||
Ein unterbeweis
|
||||
\end{proof}
|
||||
Jetzt sind wir fertig.
|
||||
|
|
Loading…
Reference in a new issue