add separate subproof package

This commit is contained in:
Maximilian Keßler 2022-01-15 12:14:22 +01:00
parent 4b695a6a06
commit 754278a807

40
src/wip/subproof.pysty Normal file
View file

@ -0,0 +1,40 @@
__HEADER__(Subproof environment with black square at end of proof.)
\RequirePackage{amssymb}
\RequirePackage{amsthm}
\RequirePackage{xparse}
\RequirePackage{refcount}
\RequirePackage{translator}
\usedictionary{translator-proof-dictionary}
\DeclareRobustCommand{\blackqed}{%
\ifmmode \mathqed
\else
\leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill
\quad\hbox{$\blacksquare$}%
\fi
}
\DeclareDocumentEnvironment{subproof}{ o }
{
\IfValueTF{#1}
{
\def__PACKAGE_MACRO__(subproof@prefix){#1}
}
{
\def__PACKAGE_MACRO__(subproof@prefix){\translate{Subproof}}
}
\pushQED
{
\blackqed
}%
\normalfont \topsep6\p@\@plus6\p@\relax
\trivlist
\item[\hskip\labelsep
\itshape
__PACKAGE_MACRO__(subproof@prefix)\@addpunct{.}]\ignorespaces
}
{
\popQED\endtrivlist\@endpefalse
}