diff options
author | Karl Berry <karl@freefriends.org> | 2022-10-15 20:24:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-10-15 20:24:18 +0000 |
commit | 3f6f2deec08918d9165fe4c72bcf4b8380c299c6 (patch) | |
tree | 8a9fb8c66769784d70ce66847c8a7cbd58e01256 /Master/texmf-dist/tex/latex/apxproof | |
parent | 509398cb59d3930b2f3c77ad69d9203aebf45d5f (diff) |
apxproof (14oct22)
git-svn-id: svn://tug.org/texlive/trunk@64715 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/apxproof')
-rw-r--r-- | Master/texmf-dist/tex/latex/apxproof/apxproof.sty | 63 |
1 files changed, 60 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/apxproof/apxproof.sty b/Master/texmf-dist/tex/latex/apxproof/apxproof.sty index e78762c399f..3eeda40b9ab 100644 --- a/Master/texmf-dist/tex/latex/apxproof/apxproof.sty +++ b/Master/texmf-dist/tex/latex/apxproof/apxproof.sty @@ -27,7 +27,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{apxproof} - [2021/09/03 v1.2.3 Automatic proofs in appendix] + [2022/10/14 v1.2.4 Automatic proofs in appendix] \RequirePackage{environ} \RequirePackage{etoolbox} \RequirePackage{fancyvrb} @@ -134,6 +134,8 @@ \newcommand{\appendixsectionformat}[2]{Proofs for Section~#1\ (#2)} \let\axp@oldproof\proof \let\endaxp@oldproof\endproof + \let\axp@oldclaimproof\claimproof + \let\endaxp@oldclaimproof\endclaimproof \newcommand{\axp@redefinelabels}{% \providecommand\label@in@display{}% \ifthenelse{\equal{\axp@appendix}{inline}}{% @@ -203,6 +205,8 @@ \noexpand\makeatletter \noexpand\let\noexpand\proof\noexpand\axp@oldproof \noexpand\let\noexpand\endproof\noexpand\endaxp@oldproof + \noexpand\let\noexpand\claimproof\noexpand\axp@oldclaimproof + \noexpand\let\noexpand\endclaimproof\noexpand\endaxp@oldclaimproof \noexpand\let\noexpand\section\noexpand\axp@oldsection } } @@ -354,7 +358,8 @@ \newcommand\noproofinappendix{% \global\togglefalse{axp@seenreptheorem}% } - \newenvironment{appendixproof} + \def\appendixproof{\catcode`\^^M=\active\@ifnextchar[{\catcode`\^^M=5\@@appendixproof}{\catcode`\^^M=5\@appendixproof}} + \def\@appendixproof {% \axp@writesection \immediate\write\axp@proofsfile{% @@ -362,6 +367,15 @@ }% \axp@VerbatimOut } + \def\@@appendixproof[#1]% + {% + \axp@writesection + \immediate\write\axp@proofsfile{% + \noexpand\makeatletter\noexpand\begin{axp@oldproof}[\unexpanded{#1}]\noexpand\makeatother% + }% + \axp@VerbatimOut + } + \def\endappendixproof {% \endaxp@VerbatimOut \immediate\write\axp@proofsfile{% @@ -369,7 +383,8 @@ }% \noproofinappendix } - \renewenvironment{proof} + \def\proof{\catcode`\^^M=\active\ltx@ifnextchar@nospace[{\catcode`\^^M=5\axp@@proof}{\catcode`\^^M=5\axp@proof}} + \def\axp@proof {% \iftoggle{axp@seenreptheorem}{% \appendixproof @@ -377,6 +392,15 @@ \axp@oldproof }% } + \def\axp@@proof[#1]% + {% + \iftoggle{axp@seenreptheorem}{% + \appendixproof[#1] + }{% + \axp@oldproof[#1] + }% + } + \def\endproof {% \iftoggle{axp@seenreptheorem}{% \endappendixproof @@ -384,6 +408,39 @@ \endaxp@oldproof }% } + \ifdefined\claimproof + \def\claimproof{\catcode`\^^M=\active\ltx@ifnextchar@nospace[{\catcode`\^^M=5\axp@@claimproof}{\catcode`\^^M=5\axp@claimproof}} + \def\axp@claimproof + {% + \iftoggle{axp@seenreptheorem}{% + \appendixproof + }{% + \axp@oldclaimproof + }% + } + \def\axp@@claimproof[#1]% + {% + \iftoggle{axp@seenreptheorem}{% + \appendixproof[#1] + }{% + \axp@oldclaimproof[#1] + }% + } + \def\endclaimproof + {% + \iftoggle{axp@seenreptheorem}{% + \immediate\write\axp@proofsfile{% + \noexpand\makeatletter + \noexpand\let\noexpand\endaxp@oldproof\noexpand\endaxp@oldclaimproof + \noexpand\makeatother + }% + \endappendixproof + }{% + \endaxp@oldclaimproof + }% + } + \fi + \let\inlineproof\axp@oldproof \let\endinlineproof\endaxp@oldproof \let\nestedproof\axp@oldproof |