From 754278a8079acddc3c8f0cc3cc5b2bd54ae79cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sat, 15 Jan 2022 12:14:22 +0100 Subject: [PATCH] add separate subproof package --- src/wip/subproof.pysty | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/wip/subproof.pysty diff --git a/src/wip/subproof.pysty b/src/wip/subproof.pysty new file mode 100644 index 0000000..a474b12 --- /dev/null +++ b/src/wip/subproof.pysty @@ -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 +}