summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-08-24 19:39:20 +0000
committerKarl Berry <karl@freefriends.org>2022-08-24 19:39:20 +0000
commit5b14d39028b46c692365b5b9523dbf30944c4dc7 (patch)
tree1344035aab7cfd13a02e7171390847ed34516732
parent2f8ba8b7c64228cd5e22bfbe6cfca3155b150af4 (diff)
proof-at-the-end (24aug22)
git-svn-id: svn://tug.org/texlive/trunk@64188 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/proof-at-the-end/README.md3
-rw-r--r--Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end.pdfbin321713 -> 329486 bytes
-rw-r--r--Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.pdfbin121559 -> 133735 bytes
-rw-r--r--Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.tex55
-rw-r--r--Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.dtx130
-rw-r--r--Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.ins2
-rw-r--r--Master/texmf-dist/tex/latex/proof-at-the-end/proof-at-the-end.sty104
7 files changed, 241 insertions, 53 deletions
diff --git a/Master/texmf-dist/doc/latex/proof-at-the-end/README.md b/Master/texmf-dist/doc/latex/proof-at-the-end/README.md
index 9f27306c59a..f1f061c4786 100644
--- a/Master/texmf-dist/doc/latex/proof-at-the-end/README.md
+++ b/Master/texmf-dist/doc/latex/proof-at-the-end/README.md
@@ -22,7 +22,7 @@ NB: This project is hosted on github at [https://github.com/leo-colisson/proof-a
Disclaimer: This package is still in beta and not considered as stable.
-This package is licensed under LPPL v1.3, and the last version of this package on CTAN is 2019/05/21.
+This package is licensed under LPPL v1.3, and the last version of this package on CTAN is 2022/08/24.
## Demo ##
@@ -573,6 +573,7 @@ In anycase, there exists some workarounds, some of the are for instance give in
## Changelog
+- 2022/08/24: Fix the issues on KOMA classes https://github.com/leo-colisson/proof-at-the-end/issues/11
- 2022/02/07:
1. [issue 2](https://github.com/leo-colisson/proof-at-the-end/issues/2) was not really solved in fact... Now, I use a more robust method to detect the current section: I write in an AUX file the label of the proof section. This way, I don't need anymore to use dirty tricks to recover the section label.
2. Change the default text when the appendix is in an external file, and add options like `text link external appendix` to customize the text appearing when the appendix is in an external file. Of course, you can still change it using `text link` directly.
diff --git a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end.pdf b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end.pdf
index 2ab8e9e0675..64cfb5be1bb 100644
--- a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end.pdf
+++ b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.pdf b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.pdf
index 81acbaf753c..7e6e7fd1b84 100644
--- a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.pdf
+++ b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.tex b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.tex
index 26b087cbea9..5ecc5d2c3b9 100644
--- a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.tex
+++ b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.tex
@@ -304,7 +304,6 @@ It should also deal with protected commands: $\mathtt{mathtt}$:
With a normal proof
\end{proofEnd}
-
\section{Section with late theorems}\label{sec:restateafter}
\begin{theoremEnd}[restated before]{thm}
laterrestatable
@@ -313,6 +312,60 @@ It should also deal with protected commands: $\mathtt{mathtt}$:
To state a theorem before the initial definition, use theoremEndRestateBefore environment where you first want to state the theorem, with a unique name in the second mandatory argument, and when you want to insert the theorem for the second time, use the usual theoremProofEnd command with the same unique name as before in place of the theorem definition and the ``restated before'' option.
\end{proofEnd}
+\pratendEnableDebugSynctex{}
+
+\begin{thmE}[My own environment][end]
+ This proof
+
+ should go
+
+ in appendix.
+
+ But to make synctex work
+
+ we can force the environments
+
+ to behave like normal theorems or proofs
+
+ using \texttt{pratendEnableDebugSynctex} and \texttt{pratendDisableDebugSynctex} around the theorem.
+
+ You can try now (note that restate is not compatible with this mode as the restate library is not working with synctex due to a quite \href{https://tex.stackexchange.com/questions/643294/synctex-make-it-work-with-environment-accessing-its-content-e-g-environ-or-xp}{fundamental limitation of LaTeX}).
+\end{thmE}
+\begin{proofED}
+ See
+
+ how this
+
+ long proof works
+
+ with synctex now. And solve \href{https://github.com/leo-colisson/proof-at-the-end/issues/10}{Issue 10}.
+\end{proofED}
+
+
+\pratendDisableDebugSynctex{}
+
+You can also use shortcuts like:
+
+\begin{thmED}[My own environment][end]
+ Here
+
+ Is
+
+ An
+
+ example to test synctex.
+\end{thmED}
+\begin{proofEndDebug}
+ See
+
+ how this
+
+ long proof works
+
+ with synctex now.
+\end{proofEndDebug}
+
+
\section{Section with standard proofs}
% \verbatiminput{defaultcategory}
\printProofs
diff --git a/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.dtx b/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.dtx
index 8fee5c8ecdc..06688d590c7 100644
--- a/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.dtx
+++ b/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.dtx
@@ -1,12 +1,12 @@
%\iffalse
% proof-at-the-end.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
+% -author "Léo Colisson"
% -doc "../doc/proof-at-the-end_doc.tex"
% -src "proof-at-the-end\.sty=>proof-at-the-end.sty"
-% -author "Léo Colisson"
-% -dir "/home/leo/Documents/Informatique/Programmation/LaTeX/proof-at-the-end/"
+% -dir "/tmp/proof-at-the-end/"
% proof-at-the-end
-% Created on 2022/2/7 18:01
+% Created on 2022/8/24 17:25
%\fi
%\iffalse
%<*package>
@@ -39,10 +39,6 @@
%
\documentclass[
]{article}
-\title{Proof-at-the-end, or how to move proofs in appendix in LaTeX}
-\author{Léo Colisson}
-\date{}
-
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
@@ -80,6 +76,7 @@
hidelinks,
pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
+\usepackage[margin=1in]{geometry}
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
@@ -139,6 +136,10 @@
\usepackage{selnolig} % disable illegal ligatures
\fi
+\title{Proof-at-the-end, or how to move proofs in appendix in LaTeX}
+\author{Léo Colisson}
+\date{}
+
\begin{document}
\DocInput{proof-at-the-end.dtx}
\end{document}
@@ -206,7 +207,7 @@
%Disclaimer: This package is still in beta and not considered as stable.
%
%This package is licensed under LPPL v1.3, and the last version of this
-%package on CTAN is 2019/05/21.
+%package on CTAN is 2022/08/24.
%
%\hypertarget{demo}{%
%\section{Demo}\label{demo}}
@@ -1239,6 +1240,9 @@
%\begin{itemize}
%\tightlist
%\item
+% 2022/08/24: Fix the issues on KOMA classes
+% https://github.com/leo-colisson/proof-at-the-end/issues/11
+%\item
% 2022/02/07:
%
% \begin{enumerate}
@@ -1356,7 +1360,7 @@
% \end{macrocode}
%\fi
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{proof-at-the-end}[2022/02/07 A package to move proofs in appendix]
+\ProvidesPackage{proof-at-the-end}[2022/08/24 A package to move proofs in appendix]
\RequirePackage{etoolbox}
\RequirePackage{thmtools}
@@ -1624,7 +1628,7 @@
\end{restatable*}%
}{}
-\NewDocumentEnvironment{theoremEnd}{O{}mO{}+b}{
+\NewDocumentEnvironment{theoremEndOrig}{O{}mO{}+b}{
% The first facultative argument will be the options: type of proof you want, the file to which you want to write...
% The first mandatory option is the type of the theorem (thm,lemma,...)
% The second facultative argument will be the title
@@ -1686,7 +1690,16 @@
\fi%
}{}
-\NewDocumentEnvironment{proofEnd}{O{}+b}{
+
+%% See proofEnableDebugSynctex
+%%% WARNING: if you change this function, change also proofDisableDebugSynctex
+\NewDocumentEnvironment{theoremEnd}{O{}mO{}+b}{%
+ \begin{theoremEndOrig}[#1]{#2}[#3]
+ #4%
+ \end{theoremEndOrig}%
+}{}
+
+\NewDocumentEnvironment{proofEndOrig}{O{}+b}{
\pgfkeys{%
/prAtEnd/.cd,
all defaults,
@@ -1746,6 +1759,42 @@
\fi%
}{}
+%%% WARNING: if you change this function, change also proofDisableDebugSynctex
+\NewDocumentEnvironment{proofEnd}{O{}+b}{%
+ \begin{proofEndOrig}[#1]%
+ #2
+ \end{proofEndOrig}%
+}{}
+
+
+%%%%% For synctex debugging
+%% Turns https://github.com/leo-colisson/proof-at-the-end/issues/10
+\NewDocumentCommand{\pratendEnableDebugSynctex}{}{%
+ \RenewDocumentEnvironment{theoremEnd}{O{}mO{}}{\begin{##2}}{\end{##2}}
+ \RenewDocumentEnvironment{proofEnd}{O{}}{\begin{proof}}{\end{proof}}
+}
+
+%% Turns https://github.com/leo-colisson/proof-at-the-end/issues/10
+\NewDocumentCommand{\pratendDisableDebugSynctex}{}{%
+ \RenewDocumentEnvironment{theoremEnd}{O{}mO{}+b}{%
+ \begin{theoremEndOrig}[##1]{##2}[##3]%
+ ##4%
+ \end{theoremEndOrig}%
+ }{}%
+ \RenewDocumentEnvironment{proofEnd}{O{}+b}{%
+ \begin{proofEndOrig}[##1]%
+ ##2%
+ \end{proofEndOrig}%
+ }{}
+}
+
+\NewDocumentEnvironment{proofEndDebug}{O{}}{%
+ \begin{proof}%
+ }{%
+ \end{proof}%
+}
+\NewDocumentEnvironment{theoremEndDebug}{O{}mO{}}{\begin{#2}}{\end{#2}}
+
%%%%% Text in appendix
@@ -1789,7 +1838,7 @@
%%% Patch sections, chapters...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% We patch the \section, \subsection and \chapter commands to make sure that
-% the text "See proof in Section XX" points to the appropriate section/subsection.
+% the text "See proof in Section XX" points to the appropriate section/subsection (option conf={text link section}).
% We basically maintain a counter counting how many times we saw a section/subsection/... and use it to label
% directly the section afterwards.
\newcounter{pratend@counter@sectionlike}
@@ -1799,7 +1848,7 @@
%% Cool explaination of expandafter, edef, noexpand:
%%% https://www.tug.org/TUGboat/tb09-1/tb20bechtolsheim.pdf
%% The label \pratend@current@sectionlike@label is used later.
- \edef\pratend@current@sectionlike@label{prAtEnd:sectionlike\thepratend@counter@sectionlike}%
+ \xdef\pratend@current@sectionlike@label{prAtEnd:sectionlike\thepratend@counter@sectionlike}%
\expandafter\label{\pratend@current@sectionlike@label}%
\stepcounter{pratend@counter@sectionlike}%
}%
@@ -1816,20 +1865,29 @@
}
\ifpratendOptdisablePatchSection%
\else %
- %% Add the above command to \chapter if the command exists
- \ifdef{\@chapter}{
- \ifpatchable*{\@chapter}{
- \apptocmd{\@chapter}{\pratendAddLabel}{}{}%
- }{\PackageWarning{proof-at-the-end}{Chapters are not patchable.}{}}
- }{}
- %% patch sections/subsections/paragraph/...
- %% https://tex.stackexchange.com/questions/631713/patch-section-command-fails/631717?noredirect=1#comment1575337_631717
- \ifdef{\@sect}{
- % \apptocmd{\section}{\pratendAddLabel}{}{}%
- \ifpatchable*{\@sect}{
- \apptocmd{\@sect}{\pratendAddLabel}{}{}%
- }{\PackageWarning{proof-at-the-end}{Sections are not patchable.}{}}
- }{}
+ %% Add the command \pratendAddLabel to \chapter/sections… if the command exists
+ %% KOMA class need a special treatment
+ \@ifundefined{KOMAClassName}{%
+ % For articles/...
+ \ifdef{\@chapter}{
+ \ifpatchable*{\@chapter}{
+ \apptocmd{\@chapter}{\pratendAddLabel}{}{}%
+ }{\PackageWarning{proof-at-the-end}{Chapters are not patchable.}{}}
+ }{}
+ %% patch sections/subsections/paragraph/...
+ %% https://tex.stackexchange.com/questions/631713/patch-section-command-fails/631717?noredirect=1#comment1575337_631717
+ \ifdef{\@sect}{
+ % \apptocmd{\section}{\pratendAddLabel}{}{}%
+ \ifpatchable*{\@sect}{
+ \apptocmd{\@sect}{\pratendAddLabel}{}{}%
+ }{\PackageWarning{proof-at-the-end}{Sections are not patchable.}{}}
+ }{}%
+ }{%
+ %% For KOMA classes/... or it won't work with scrreport
+ %% \AddtoDoHook{heading/endgroup/chapter} is too specific
+ \AddtoDoHook{heading/endgroup/chapter}{\pratendAddLabel}%
+ \AddtoDoHook{heading/endgroup/section}{\pratendAddLabel}%
+ }%
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1859,6 +1917,13 @@
\NewDocumentEnvironment{#2}{O{}O{}}{%
\begin{theoremEnd}[#1,##2]{#3}[##1]%
}{\end{theoremEnd}}%
+ \NewDocumentEnvironment{#2D}{O{}O{}}{%
+ \bgroup%
+ \pratendEnableDebugSynctex{}%
+ \begin{theoremEnd}[#1,##2]{#3}[##1]%
+ }{\end{theoremEnd}%
+ \egroup%
+ }%
}
% \NewDocumentCommand{\newEndThm}{O{}mm}{%
@@ -1874,15 +1939,20 @@
% }{}
% }
-%% Avoid to manually type \NewDocumentEnvironment...
-%% Usage: \newEndProof[default options]{new proof environment}{old proof environment}
-% E.g.: \newEndProof[]{proofE}{proof}
+%% Avoid to manually type \NewDocumentEnvironment...
+%% Usage: \newEndProof[default options]{new proof environment}{old proof environment}
+% E.g.: \newEndProof[]{proofE}{proof}
\NewDocumentCommand{\newEndProof}{O{}m}{%
\NewDocumentEnvironment{#2}{O{}+b}{%
\begin{proofEnd}[#1,##1]%
##2%
\end{proofEnd}%
}{}%
+ \NewDocumentEnvironment{#2D}{O{}}{%
+ \begin{proofEndDebug}[##1]%
+ }{%
+ \end{proofEndDebug}%
+ }%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.ins b/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.ins
index d3508956ecc..c88dd83f369 100644
--- a/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.ins
+++ b/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.ins
@@ -1,4 +1,4 @@
-% proof-at-the-end.ins generated using makedtx version 1.2 2022/2/7 18:01
+% proof-at-the-end.ins generated using makedtx version 1.2 2022/8/24 17:25
\input docstrip
\preamble
diff --git a/Master/texmf-dist/tex/latex/proof-at-the-end/proof-at-the-end.sty b/Master/texmf-dist/tex/latex/proof-at-the-end/proof-at-the-end.sty
index 7e6015b4188..d83d2d95b65 100644
--- a/Master/texmf-dist/tex/latex/proof-at-the-end/proof-at-the-end.sty
+++ b/Master/texmf-dist/tex/latex/proof-at-the-end/proof-at-the-end.sty
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{proof-at-the-end}[2022/02/07 A package to move proofs in appendix]
+\ProvidesPackage{proof-at-the-end}[2022/08/24 A package to move proofs in appendix]
\RequirePackage{etoolbox}
\RequirePackage{thmtools}
@@ -301,7 +301,7 @@
\end{restatable*}%
}{}
-\NewDocumentEnvironment{theoremEnd}{O{}mO{}+b}{
+\NewDocumentEnvironment{theoremEndOrig}{O{}mO{}+b}{
% The first facultative argument will be the options: type of proof you want, the file to which you want to write...
% The first mandatory option is the type of the theorem (thm,lemma,...)
% The second facultative argument will be the title
@@ -363,7 +363,15 @@
\fi%
}{}
-\NewDocumentEnvironment{proofEnd}{O{}+b}{
+%% See proofEnableDebugSynctex
+%%% WARNING: if you change this function, change also proofDisableDebugSynctex
+\NewDocumentEnvironment{theoremEnd}{O{}mO{}+b}{%
+ \begin{theoremEndOrig}[#1]{#2}[#3]
+ #4%
+ \end{theoremEndOrig}%
+}{}
+
+\NewDocumentEnvironment{proofEndOrig}{O{}+b}{
\pgfkeys{%
/prAtEnd/.cd,
all defaults,
@@ -423,6 +431,41 @@
\fi%
}{}
+%%% WARNING: if you change this function, change also proofDisableDebugSynctex
+\NewDocumentEnvironment{proofEnd}{O{}+b}{%
+ \begin{proofEndOrig}[#1]%
+ #2
+ \end{proofEndOrig}%
+}{}
+
+%%%%% For synctex debugging
+%% Turns https://github.com/leo-colisson/proof-at-the-end/issues/10
+\NewDocumentCommand{\pratendEnableDebugSynctex}{}{%
+ \RenewDocumentEnvironment{theoremEnd}{O{}mO{}}{\begin{##2}}{\end{##2}}
+ \RenewDocumentEnvironment{proofEnd}{O{}}{\begin{proof}}{\end{proof}}
+}
+
+%% Turns https://github.com/leo-colisson/proof-at-the-end/issues/10
+\NewDocumentCommand{\pratendDisableDebugSynctex}{}{%
+ \RenewDocumentEnvironment{theoremEnd}{O{}mO{}+b}{%
+ \begin{theoremEndOrig}[##1]{##2}[##3]%
+ ##4%
+ \end{theoremEndOrig}%
+ }{}%
+ \RenewDocumentEnvironment{proofEnd}{O{}+b}{%
+ \begin{proofEndOrig}[##1]%
+ ##2%
+ \end{proofEndOrig}%
+ }{}
+}
+
+\NewDocumentEnvironment{proofEndDebug}{O{}}{%
+ \begin{proof}%
+ }{%
+ \end{proof}%
+}
+\NewDocumentEnvironment{theoremEndDebug}{O{}mO{}}{\begin{#2}}{\end{#2}}
+
%%%%% Text in appendix
\NewDocumentEnvironment{textAtEnd}{O{}+b}{
@@ -462,7 +505,7 @@
%% Cool explaination of expandafter, edef, noexpand:
%%% https://www.tug.org/TUGboat/tb09-1/tb20bechtolsheim.pdf
%% The label \pratend@current@sectionlike@label is used later.
- \edef\pratend@current@sectionlike@label{prAtEnd:sectionlike\thepratend@counter@sectionlike}%
+ \xdef\pratend@current@sectionlike@label{prAtEnd:sectionlike\thepratend@counter@sectionlike}%
\expandafter\label{\pratend@current@sectionlike@label}%
\stepcounter{pratend@counter@sectionlike}%
}%
@@ -479,20 +522,29 @@
}
\ifpratendOptdisablePatchSection%
\else %
- %% Add the above command to \chapter if the command exists
- \ifdef{\@chapter}{
- \ifpatchable*{\@chapter}{
- \apptocmd{\@chapter}{\pratendAddLabel}{}{}%
- }{\PackageWarning{proof-at-the-end}{Chapters are not patchable.}{}}
- }{}
- %% patch sections/subsections/paragraph/...
- %% https://tex.stackexchange.com/questions/631713/patch-section-command-fails/631717?noredirect=1#comment1575337_631717
- \ifdef{\@sect}{
- % \apptocmd{\section}{\pratendAddLabel}{}{}%
- \ifpatchable*{\@sect}{
- \apptocmd{\@sect}{\pratendAddLabel}{}{}%
- }{\PackageWarning{proof-at-the-end}{Sections are not patchable.}{}}
- }{}
+ %% Add the command \pratendAddLabel to \chapter/sections… if the command exists
+ %% KOMA class need a special treatment
+ \@ifundefined{KOMAClassName}{%
+ % For articles/...
+ \ifdef{\@chapter}{
+ \ifpatchable*{\@chapter}{
+ \apptocmd{\@chapter}{\pratendAddLabel}{}{}%
+ }{\PackageWarning{proof-at-the-end}{Chapters are not patchable.}{}}
+ }{}
+ %% patch sections/subsections/paragraph/...
+ %% https://tex.stackexchange.com/questions/631713/patch-section-command-fails/631717?noredirect=1#comment1575337_631717
+ \ifdef{\@sect}{
+ % \apptocmd{\section}{\pratendAddLabel}{}{}%
+ \ifpatchable*{\@sect}{
+ \apptocmd{\@sect}{\pratendAddLabel}{}{}%
+ }{\PackageWarning{proof-at-the-end}{Sections are not patchable.}{}}
+ }{}%
+ }{%
+ %% For KOMA classes/... or it won't work with scrreport
+ %% \AddtoDoHook{heading/endgroup/chapter} is too specific
+ \AddtoDoHook{heading/endgroup/chapter}{\pratendAddLabel}%
+ \AddtoDoHook{heading/endgroup/section}{\pratendAddLabel}%
+ }%
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -520,17 +572,29 @@
\NewDocumentEnvironment{#2}{O{}O{}}{%
\begin{theoremEnd}[#1,##2]{#3}[##1]%
}{\end{theoremEnd}}%
+ \NewDocumentEnvironment{#2D}{O{}O{}}{%
+ \bgroup%
+ \pratendEnableDebugSynctex{}%
+ \begin{theoremEnd}[#1,##2]{#3}[##1]%
+ }{\end{theoremEnd}%
+ \egroup%
+ }%
}
-%% Avoid to manually type \NewDocumentEnvironment...
-%% Usage: \newEndProof[default options]{new proof environment}{old proof environment}
+%% Avoid to manually type \NewDocumentEnvironment...
+%% Usage: \newEndProof[default options]{new proof environment}{old proof environment}
\NewDocumentCommand{\newEndProof}{O{}m}{%
\NewDocumentEnvironment{#2}{O{}+b}{%
\begin{proofEnd}[#1,##1]%
##2%
\end{proofEnd}%
}{}%
+ \NewDocumentEnvironment{#2D}{O{}}{%
+ \begin{proofEndDebug}[##1]%
+ }{%
+ \end{proofEndDebug}%
+ }%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%