texlive[64715] Master/texmf-dist: apxproof (14oct22)

commits+karl at tug.org commits+karl at tug.org
Sat Oct 15 22:24:18 CEST 2022


Revision: 64715
          http://tug.org/svn/texlive?view=revision&revision=64715
Author:   karl
Date:     2022-10-15 22:24:18 +0200 (Sat, 15 Oct 2022)
Log Message:
-----------
apxproof (14oct22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/apxproof/README.md
    trunk/Master/texmf-dist/doc/latex/apxproof/apxproof.pdf
    trunk/Master/texmf-dist/source/latex/apxproof/apxproof.dtx
    trunk/Master/texmf-dist/tex/latex/apxproof/apxproof.sty

Modified: trunk/Master/texmf-dist/doc/latex/apxproof/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/apxproof/README.md	2022-10-15 20:24:03 UTC (rev 64714)
+++ trunk/Master/texmf-dist/doc/latex/apxproof/README.md	2022-10-15 20:24:18 UTC (rev 64715)
@@ -19,32 +19,37 @@
 In addition to a working installation of LaTeX2e, `apxproof` relies on a
 few other packages, which should be provided by all reasonable LaTeX
 distributions:
- - `amsthm`
- - `environ`
- - `etoolbox`
- - `fancyvrb`
- - `ifthen`
- - `kvoptions`
- - `bibunits` (optional, only if the `bibliography` option is set to `separate`)
 
+- `amsthm`
+- `environ`
+- `etoolbox`
+- `fancyvrb`
+- `ifthen`
+- `kvoptions`
+- `bibunits` (optional, only if the `bibliography` option is set to `separate`)
+
 ## Manual installation
 
-Simply copy the file [apxproof.sty](apxproof.sty) in your LaTeX working directory, or
-in any other directory where LaTeX searches for packages.
+Simply copy the file [apxproof.sty](apxproof.sty) in your LaTeX working
+directory, or in any other directory where LaTeX searches for packages.
 
 ## License
 
-Copyright © 2016-2021 by Pierre Senellart.
+Copyright © 2016-2022 by Pierre Senellart.
 
 This work may be distributed and/or modified under the conditions of the
 LaTeX Project Public License, either version 1.3 of this license or (at
 your option) any later version. The latest version of this license is in
-http://www.latex-project.org/lppl.txt and version 1.3 or later is part of
+<http://www.latex-project.org/lppl.txt> and version 1.3 or later is part of
 all distributions of LaTeX version 2005/12/01 or later.
 
+The [diffpdf.py](examples/diffpdf.py) script used for regression testing
+but not part of the `apxproof` LaTeX package itself is under the
+[Affero GPL 3.0](https://www.gnu.org/licenses/agpl-3.0.html) license.
+
 ## Contact
 
-https://github.com/PierreSenellart/apxproof
+<https://github.com/PierreSenellart/apxproof>
 
 Pierre Senellart <pierre at senellart.com>
 

Modified: trunk/Master/texmf-dist/doc/latex/apxproof/apxproof.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/apxproof/apxproof.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/apxproof/apxproof.dtx	2022-10-15 20:24:03 UTC (rev 64714)
+++ trunk/Master/texmf-dist/source/latex/apxproof/apxproof.dtx	2022-10-15 20:24:18 UTC (rev 64715)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-% Copyright (C) 2016-2021 by Pierre Senellart
+% Copyright (C) 2016-2022 by Pierre Senellart
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3
@@ -11,7 +11,7 @@
 % version 2005/12/01 or later.
 %
 % This work has the LPPL maintenance status `maintained'.
-% 
+%
 % The Current Maintainer of this work is Pierre Senellart
 % <pierre at senellart.com> and a version control system for this work
 % is available at http://github.com/PierreSenellart/apxproof
@@ -20,11 +20,11 @@
 % and the derived file apxproof.sty.
 %
 % \fi
-% 
+%
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
 %<package>\ProvidesPackage{apxproof}
-%<package>  [2021/09/03 v1.2.3 Automatic proofs in appendix]
+%<package>  [2022/10/14 v1.2.4 Automatic proofs in appendix]
 %
 %<*driver>
 \documentclass{ltxdoc}
@@ -45,7 +45,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{864}
+% \CheckSum{974}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -87,7 +87,7 @@
 % \changes{v1.0.0}{2016/10/31}{Initial released version}
 % \changes{v1.0.1}{2016/11/07}{Prevent empty bibliography environment;
 % fix typos}
-% 
+%
 % \GetFileInfo{apxproof.sty}
 %
 % \makeatletter\c at IndexColumns=2\makeatother
@@ -102,13 +102,13 @@
 % }
 %
 % \title{The \textsf{apxproof} package}
-% 
+%
 % \author{Pierre Senellart \\ \texttt{pierre at senellart.com} \\
 % \url{http://github.com/PierreSenellart/apxproof}}
 % \date{\filedate \quad \fileversion}
 %
 % \maketitle
-% 
+%
 % \begin{abstract}
 % This package makes it easier to write articles where proofs and other material
 % are deferred to the appendix. The appendix material is written in the \LaTeX{}
@@ -149,9 +149,7 @@
 % \end{toappendix}
 % \end{verbatim}
 % \begin{toappendix}
-%<*driver>
-This content is in the appendix.
-%</driver>
+% This content is in the appendix.
 % \end{toappendix}
 % \end{example}
 % \changes{v1.0.3}{2017/01/10}{Note on entire sections in appendix}
@@ -168,7 +166,7 @@
 % \hspace*{1em}\dots\\
 % |\end{appendixproof}|
 % \end{quote}
-% This behaves like the |toappendix| environment, except that 
+% This behaves like the |toappendix| environment, except that
 % a proof environment is generated.
 % \begin{example}We now send a proof to the appendix:
 % \begin{verbatim}
@@ -177,9 +175,7 @@
 % \end{appendixproof}
 % \end{verbatim}
 % \begin{appendixproof}
-%<*driver>
-This proof is in the appendix.
-%</driver>
+% This proof is in the appendix.
 % \end{appendixproof}
 % \end{example}
 %
@@ -195,7 +191,7 @@
 % |\newtheoremrep|\marg{name}\oarg{counter}\marg{title}\oarg{countersec}\DescribeMacro{\newtheoremrep}
 % \end{quote}
 % Usage is exactly the same as that of AMS \LaTeX{}'s |\newtheorem|
-% macro: 
+% macro:
 % \begin{itemize}
 % \item \meta{name} (e.g., |theorem|) is the name of an environment that is created for this kind of
 % theorem;
@@ -266,9 +262,7 @@
 % This foobar is repeated in the appendix.
 % \end{foobarrep}
 % \begin{proof}
-%<*driver>
-This is the proof of the repeated foobar.
-%</driver>
+% This is the proof of the repeated foobar.
 % \end{proof}
 % Note that, since |hyperref| is loaded, there are hyperlinks
 % created between the statements of the theorems in the main text and in
@@ -309,7 +303,7 @@
 % This is an inline proof.
 % \end{inlineproof}
 % \end{example}
-% 
+%
 % \subsection{Bibliography}
 % By default, \textsf{apxproof} automatically adds a bibliography in the appendix
 % with only the references cited in the appendix material. This allows for a
@@ -325,9 +319,7 @@
 % \end{verbatim}
 % This is a citation in the main text~\cite{lamport86}.
 % \begin{toappendix}
-%<*driver>
-This is a citation in the appendix~\cite{proofsAreHard}.
-%</driver>
+% This is a citation in the appendix~\cite{proofsAreHard}.
 % \end{toappendix}
 % \end{example}
 % The bibliography in the appendix can use
@@ -477,18 +469,18 @@
 % Issues not listed here should be reported to the author.
 %
 % \section{License}
-% Copyright \textcopyright{} 2016--2021 by Pierre Senellart.
-% 
+% Copyright \textcopyright{} 2016--2022 by Pierre Senellart.
+%
 % This work may be distributed and/or modified under the conditions of the
 % \LaTeX{} Project Public License, either version 1.3 of this license or (at
 % your option) any later version. The latest version of this license is in
 % \url{http://www.latex-project.org/lppl.txt} and version 1.3 or later is part of
 % all distributions of \LaTeX{} version 2005/12/01 or later.
-% 
+%
 % \section{Contact}
 % \begin{itemize}
 % \item \url{https://github.com/PierreSenellart/apxproof}
-% \item 
+% \item
 % Pierre Senellart
 % \href{mailto:pierre at senellart.com}{<pierre at senellart.com>}
 % \end{itemize}
@@ -505,7 +497,7 @@
 %   \PrintChanges
 %   \PrintIndex
 % }
-% 
+%
 % \section{Implementation}
 % We now describe the entire code of the package, in a literate programming
 % fashion. Throughout the package, we use the |axp@| prefix to identify
@@ -630,7 +622,7 @@
 }}}
 \ifthenelse{\equal{\axp at bibliography}{separate}}{
 %    \end{macrocode}
-% The external \textsf{bibunits} package 
+% The external \textsf{bibunits} package
 % is used to add a second bibliography for the appendix material.
 % \changes{v1.2.0}{2019/04/17}{Do not load \textsf{bibunits} if
 % \texttt{bibliography} is set to \texttt{common}}
@@ -726,7 +718,7 @@
 % We define the high-level |\newtheoremrep| to have the same syntax as
 % \textsf{amsthm}'s |\newtheorem|. For this purpose, we need a little
 % trick to deal with the second and fourth optional arguments, which is what
-% |\@oparg| and |\axp at newtheoremreptmp| are 
+% |\@oparg| and |\axp at newtheoremreptmp| are
 % used for. |\axp at newtheoremrep| is defined differently
 % depending on the compilation mode.
 %    \begin{macrocode}
@@ -745,7 +737,7 @@
 %    \begin{macrocode}
   \newenvironment{proofsketch}{\begin{axp at oldproof}[Proof sketch]}{\end{axp at oldproof}}
 %    \end{macrocode}
-% \end{environment}  
+% \end{environment}
 % \begin{macro}{\mainbodyrepeatedtheorem}
 % \changes{v1.2.0}{2019/09/21}{Configurable repeated theorem command}
 % \begin{macro}{\appendixrefname}
@@ -776,11 +768,15 @@
 % \end{macro}
 % \end{macro}
 % \begin{environment}{axp at oldproof}
-%   We save the definition of the existing |proof| environment.
-%    \begin{macrocode}  
+%   We save the definition of the existing |proof| environment (and of
+%   the |claimproof| environment that the \textsf{lipics} document class
+%   defines).
+%    \begin{macrocode}
   \let\axp at oldproof\proof
   \let\endaxp at oldproof\endproof
-%    \end{macrocode}  
+  \let\axp at oldclaimproof\claimproof
+  \let\endaxp at oldclaimproof\endclaimproof
+%    \end{macrocode}
 % \end{environment}
 % We define a utility macro that will be used to properly set the
 % |\label| command (and its \textsf{amsmath} counterpart,
@@ -793,7 +789,7 @@
 % \changes{v1.2.0}{2019/02/15}{Fix extra spacing erroneously
 % introduced within the \texttt{\textbackslash axp at redefinelabels}
 % macro}
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \newcommand{\axp at redefinelabels}{%
     \providecommand\label at in@display{}%
     \ifthenelse{\equal{\axp at appendix}{inline}}{%
@@ -814,9 +810,9 @@
       \renewcommand\label at in@display[1]{\axp at oldlabel@in at display{##1-apx}}%
     }%
   }
-%    \end{macrocode}  
-% \end{macro}  
-% \subsubsection{Class-Specific Behavior}    
+%    \end{macrocode}
+% \end{macro}
+% \subsubsection{Class-Specific Behavior}
 % Finally, some class-specific behavior common to all compilation modes.
 % \paragraph{\textsf{llncs} and other Springer document classes}
 % \changes{v1.0.6}{2018/05/10}{Better support of Springer document
@@ -844,13 +840,13 @@
   \spnewtheorem*{#1}{#2}{\upshape\bfseries}{\itshape}%
 }
 %    \end{macrocode}
-% \end{macro}    
-% \end{macro}    
+% \end{macro}
+% \end{macro}
 % \begin{macro}{proofsketch}
 % \changes{v1.2.0}{2019/02/15}{Fix proof sketches in inline
 % compilation mode for Springer document classes}
 % We redefine the |proofsketch| environment, which is used
-% differently in the base class.    
+% differently in the base class.
 %    \begin{macrocode}
 \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
 %    \end{macrocode}
@@ -886,7 +882,7 @@
     }
   }
 %    \end{macrocode}
-% \end{macro}  
+% \end{macro}
 % \begin{environment}{inlineproof}
 % \begin{environment}{nestedproof}
 % \begin{environment}{appendixproof}
@@ -900,13 +896,13 @@
   \let\appendixproof\proof
   \let\endappendixproof\endproof
 %    \end{macrocode}
-% \end{environment}  
-% \end{environment}  
-% \end{environment}  
+% \end{environment}
+% \end{environment}
+% \end{environment}
 % \begin{environment}{toappendix}
 % \begin{macro}{\noproofinappendix}
 % \begin{macro}{\nosectionappendix}
-% In inline mode, this environment and these macros are no-ops.  
+% In inline mode, this environment and these macros are no-ops.
 %    \begin{macrocode}
   \newenvironment{toappendix}{}{}
   \let\noproofinappendix\relax
@@ -913,10 +909,10 @@
   \let\nosectionappendix\relax
 %    \end{macrocode}
 % \end{macro}
-% \end{macro}  
-% \end{environment}  
+% \end{macro}
+% \end{environment}
 %    \begin{macrocode}
-} 
+}
 %    \end{macrocode}
 % \subsection{Append or Strip Compilation Modes}
 %    \begin{macrocode}
@@ -926,37 +922,39 @@
 % useful: either append the appendix material to the document, or strip
 % it entirely.
 % \bigskip
-%    \subsubsection{Auxiliary File for the Appendix}  
-% \begin{macro}{\axp at proofsfile}  
+%    \subsubsection{Auxiliary File for the Appendix}
+% \begin{macro}{\axp at proofsfile}
 % We open a new auxiliary file, with extension |.axp|, where the appendix
-% material will be dumped.  
+% material will be dumped.
 % \changes{v1.1.0}{2018/07/11}{Initialization deferred to \cs{AtBeginDocument}
 % for compatibility with \cs{dump}ed precompiled preambles (K. D.
 % Bauer)}
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \AtBeginDocument{
     \newwrite\axp at proofsfile
     \immediate\openout\axp at proofsfile=\jobname.axp
   }
-%    \end{macrocode}  
-% \end{macro}  
+%    \end{macrocode}
+% \end{macro}
 % \begin{environment}{proof}
 % \begin{macro}{\section}
 % At the beginning of this file, we make |@| a regular character (since
 % it will be used in several places for internal names) and reestablish the original definition of
 % the |proof| environment and the |\section| macro.
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \AtBeginDocument{
     \immediate\write\axp at proofsfile{%
       \noexpand\makeatletter
       \noexpand\let\noexpand\proof\noexpand\axp at oldproof
       \noexpand\let\noexpand\endproof\noexpand\endaxp at oldproof
+      \noexpand\let\noexpand\claimproof\noexpand\axp at oldclaimproof
+      \noexpand\let\noexpand\endclaimproof\noexpand\endaxp at oldclaimproof
       \noexpand\let\noexpand\section\noexpand\axp at oldsection
     }
   }
-%    \end{macrocode}  
-% \end{macro}  
-% \end{environment}  
+%    \end{macrocode}
+% \end{macro}
+% \end{environment}
 % \begin{macro}{\axp at unactivateeightbit}
 % \changes{v1.1.0}{2019/01/28}{Fix compilation of non-ASCII
 % characters with \texttt{\textbackslash usepackage[utf8]\{inputenc\}}}
@@ -976,7 +974,7 @@
 % \begin{environment}{axp at VerbatimOut}
 % \begin{macro}{\FVB at axp@VerbatimOut}
 % \begin{macro}{\FVE at axp@VerbatimOut}
-% \changes{v1.1.0}{2018/10/02}{Make \textsf{apxproof} compatible with 
+% \changes{v1.1.0}{2018/10/02}{Make \textsf{apxproof} compatible with
 % independent use of \textsf{fancyvrb}}
 % Using the functionalities of the \textsf{fancyvrb} package, we define a
 % custom verbatim environment |axp at VerbatimOut| that writes every line
@@ -1009,39 +1007,39 @@
       \endgroup\@esphack}
 %    \end{macrocode}
 % \end{macro}
-% \end{macro}  
-% \end{environment}  
+% \end{macro}
+% \end{environment}
 % \begin{environment}{toappendix}
 % The entire content of this environment is put in appendix,
 % starting a new appendix section beforehand if needed.
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \newenvironment{toappendix}
     {\axp at writesection\axp at VerbatimOut}
     {\endaxp at VerbatimOut}
-%    \end{macrocode}  
+%    \end{macrocode}
 % \end{environment}
-%    \subsubsection{Definition of New Theorems}  
+%    \subsubsection{Definition of New Theorems}
 % \begin{macro}{axp at seenreptheorem}
 % Used to indicate whether a repeated theorem was just typeset, without
 % its proof.
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \newtoggle{axp at seenreptheorem}
-%    \end{macrocode}  
-% \end{macro}  
+%    \end{macrocode}
+% \end{macro}
 % \begin{macro}{axp at rpcounter}
 % Sequentially incremented for every repeated theorem, used to create labels.
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \newcounter{axp at rpcounter}
-%    \end{macrocode}  
-% \end{macro}  
+%    \end{macrocode}
+% \end{macro}
 % \begin{macro}{axp at equation}
 % \begin{macro}{axp at equationx}
 % Used to save the value of the |equation| counter, when |repeqn| is set
 % to |same|.
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \newcounter{axp at equation}
   \newcounter{axp at equationx}
-%    \end{macrocode}  
+%    \end{macrocode}
 % \end{macro}
 % \end{macro}
 % \begin{macro}{axp at newtheoremrep}
@@ -1050,13 +1048,13 @@
 % theorem |foobar|. We then patch |\begin{foobar}| so as not to
 % expect a proof in the appendix and define an internal theorem |axp at foobarrp| that
 % will be used in the appendix to restate the existing theorem.
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \def\axp at newtheoremrep#1[#2]#3[#4]{%
     \axp at newtheoremrep@definetheorem{#1}{#2}{#3}{#4}%
     \expandafter\pretocmd\csname #1\endcsname{\noproofinappendix}{}{}%
     \axp at newtheorem*{axp@#1rp}{#3}%
     \axp at forward@setup{#1}{#2}{#3}{#4}%
-%    \end{macrocode}  
+%    \end{macrocode}
 % We then define a |foobarrep| environment that increments the
 % |axp at rpcounter| and typeset the regular |foobar| theorem with a label
 % derived from the counter, along with a possible custom command to
@@ -1083,16 +1081,16 @@
       \fi
       \mainbodyrepeatedtheorem
       \BODY\end{#1}%
-%    \end{macrocode}  
+%    \end{macrocode}
 % We set the |axp at seenreptheorem| toggle to indicate that we are looking
 % for the proof of the theorem, then store in a macro the content of the
 % theorem's body.
-%    \begin{macrocode}  
+%    \begin{macrocode}
       \global\toggletrue{axp at seenreptheorem}%
       \global\expandafter\let\csname rplet\roman{axp at rpcounter}%
                              \endcsname
       \BODY
-%    \end{macrocode}  
+%    \end{macrocode}
 % Possibly after starting a new appendix section if needed, we typeset a
 % repeated version of the theorem using the |axp at foobarrp| environment
 % and a reference to the previously defined label.
@@ -1102,7 +1100,7 @@
 % theorem, but theorem notes are usually typeset in a much
 % different way (different font, parentheses) than theorem
 % headings. In the case of the Springer document
-% classes, we use the  |\theopargself| macro to disable parentheses. For 
+% classes, we use the  |\theopargself| macro to disable parentheses. For
 % other document classes, we need to manually patch the |\thmhead|
 % command at the right time. We also specially cover the case of
 % the ACM document class where |\@acmplainnotefont| is used instead
@@ -1114,7 +1112,7 @@
 % \changes{v1.0.6}{2018/05/10}{Fix incorrect use of \texttt{\textbackslash noexpand}
 % in optional argument of macro environment}
 % \changes{v1.2.0}{2019/10/07}{Fix display of theorem notes}
-%    \begin{macrocode}  
+%    \begin{macrocode}
       \axp at writesection%
       \immediate\write\axp at proofsfile{\noexpand\makeatletter}%
       \ifthenelse{\equal{\axp at repeqn}{same}}{%
@@ -1152,7 +1150,7 @@
                     \noexpand\the\noexpand\thm at notefont
                   \noexpand\fi
                 \fi
-              \fi  
+              \fi
               {} (\unexpanded{{##1}})%
             }%
           ]%
@@ -1170,18 +1168,18 @@
     }%
   }
 %    \end{macrocode}
-% \end{macro}  
-% 
+% \end{macro}
+%
 %    \subsubsection{Forward-Linking Mechanism}
 % \changes{v1.1.0}{2018/07/02}{Added forward-link mechanism (K. D. Bauer)}
-% 
+%
 % When hyperref is loaded, |foobarrep| environments
 % in the main text have their number link to their
 % repetition in the appendix.
-% 
-%   
+%
+%
 
-% 
+%
 % \begin{macro}{\axp at with@forward}
 % In order to make the number of the |foobarrep| theorem a link
 % to its repeated version, we temporarily redefine the
@@ -1191,7 +1189,7 @@
 % a |\hyperlink|, without adding extensive dependence
 % on internals of |amsthm|, the builtin |\newtheorem|
 % and possibly document-class specific definitions.
-% 
+%
 % In order to allow users to redefine |\thefoobar| without
 % breaking this feature, we redefine |\thefoobar| only
 % for the duration of the |\begin{foobar}| form,
@@ -1204,7 +1202,7 @@
 % We also redefine |\theHfoobar| which is used by |hyperref| but not
 % defined if |hyperref| was loaded after |\newtheoremrep| was used.
 % and |\protect| it to output it verbatim into the |.aux| file.
-% 
+%
 % These hyperlinks are of course disabled in the |strip| compilation
 % mode.
 %    \begin{macrocode}
@@ -1233,7 +1231,7 @@
 % Dummy macro, for handling the unwanted change of
 % the |\newlabel| entry in the |.aux| file caused by
 % changing the definition of |\thefoobar|.
-% 
+%
 %    \begin{macrocode}
   \newbool{axp at forward}
   \newcommand{\axp at forward@link}[2]{%
@@ -1250,7 +1248,7 @@
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
-% 
+%
 % \begin{macro}{\axp at forward@target}
 % Provides the needed |\hypertarget|.
 % Intended to be written to the |.axp| file.
@@ -1264,7 +1262,7 @@
   }
 %    \end{macrocode}
 % \end{macro}
-% 
+%
 % \begin{macro}{\axp at forward@setup}
 % In order to support counter inheritance with the first
 % optional argument of |\newtheoremrep|,
@@ -1278,12 +1276,12 @@
   }
 %    \end{macrocode}
 % \end{macro}
-% 
-% 
-%    \subsubsection{Proof Environments}  
+%
+%
+%    \subsubsection{Proof Environments}
 % \begin{macro}{\noproofinappendix}
 %   Utility macro that toggles |axp at seenreptheorem| to false.
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \newcommand\noproofinappendix{%
     \global\togglefalse{axp at seenreptheorem}%
   }
@@ -1290,10 +1288,16 @@
 %    \end{macrocode}
 % \end{macro}
 % \begin{environment}{appendixproof}
+% \changes{v1.2.4}{2021/11/03}{Support optional arguments in proofs}
 % We dump the content of this in appendix, within an original |proof|
 % environment, possibly after creating a new appendix section.
-%    \begin{macrocode}  
-  \newenvironment{appendixproof}
+% We support
+% optional arguments in proofs, but we need to be careful not to gobble
+% any newline character, that would make it impossible to process the
+% first line with \textsf{fancyvrb}.
+%    \begin{macrocode}
+  \def\appendixproof{\catcode`\^^M=\active\@ifnextchar[{\catcode`\^^M=5\@@appendixproof}{\catcode`\^^M=5\@appendixproof}}
+  \def\@appendixproof
     {%
       \axp at writesection
       \immediate\write\axp at proofsfile{%
@@ -1301,7 +1305,16 @@
       }%
       \axp at VerbatimOut
     }
+  \def\@@appendixproof[#1]%
     {%
+      \axp at writesection
+      \immediate\write\axp at proofsfile{%
+        \noexpand\makeatletter\noexpand\begin{axp at oldproof}[\unexpanded{#1}]\noexpand\makeatother%
+      }%
+      \axp at VerbatimOut
+    }
+  \def\endappendixproof
+    {%
       \endaxp at VerbatimOut
       \immediate\write\axp at proofsfile{%
         \noexpand\end{axp at oldproof}%
@@ -1308,13 +1321,17 @@
       }%
       \noproofinappendix
     }
-%    \end{macrocode}  
+%    \end{macrocode}
 % \end{environment}
 % \begin{environment}{proof}
 % This environment either puts the proof in appendix, if we are after a repeated
-% theorem without its proof, or inlines it otherwise.    
-%    \begin{macrocode}  
-  \renewenvironment{proof}
+% theorem without its proof, or inlines it otherwise. We support
+% optional arguments in proofs, but we need to be careful not to gobble
+% any newline character, that would make it impossible to process the
+% first line with \textsf{fancyvrb}.
+%    \begin{macrocode}
+  \def\proof{\catcode`\^^M=\active\ltx at ifnextchar@nospace[{\catcode`\^^M=5\axp@@proof}{\catcode`\^^M=5\axp at proof}}
+  \def\axp at proof
     {%
       \iftoggle{axp at seenreptheorem}{%
         \appendixproof
@@ -1322,41 +1339,91 @@
         \axp at oldproof
       }%
     }
+  \def\axp@@proof[#1]%
     {%
       \iftoggle{axp at seenreptheorem}{%
+        \appendixproof[#1]
+      }{%
+        \axp at oldproof[#1]
+      }%
+    }
+  \def\endproof
+    {%
+      \iftoggle{axp at seenreptheorem}{%
         \endappendixproof
       }{%
         \endaxp at oldproof
       }%
     }
-%    \end{macrocode}  
+%    \end{macrocode}
 % \end{environment}
+% \begin{environment}{claimproof}
+% \changes{v1.2.4}{2021/11/03}{Support for \texttt{claimproof} environment
+% from \textsf{lipics}}
+% If the |claimproof| environment exists (\textsf{lipics} document
+% class), we also redefine it, in the same way.
+%    \begin{macrocode}
+  \ifdefined\claimproof
+  \def\claimproof{\catcode`\^^M=\active\ltx at ifnextchar@nospace[{\catcode`\^^M=5\axp@@claimproof}{\catcode`\^^M=5\axp at claimproof}}
+  \def\axp at claimproof
+    {%
+      \iftoggle{axp at seenreptheorem}{%
+        \appendixproof
+      }{%
+        \axp at oldclaimproof
+      }%
+    }
+  \def\axp@@claimproof[#1]%
+    {%
+      \iftoggle{axp at seenreptheorem}{%
+        \appendixproof[#1]
+      }{%
+        \axp at oldclaimproof[#1]
+      }%
+    }
+  \def\endclaimproof
+    {%
+      \iftoggle{axp at seenreptheorem}{%
+        \immediate\write\axp at proofsfile{%
+          \noexpand\makeatletter
+          \noexpand\let\noexpand\endaxp at oldproof\noexpand\endaxp at oldclaimproof
+          \noexpand\makeatother
+        }%
+        \endappendixproof
+      }{%
+        \endaxp at oldclaimproof
+      }%
+    }
+  \fi
+%    \end{macrocode}
+% \end{environment}
+
 % \begin{environment}{inlineproof}
 % \begin{environment}{nestedproof}
 % These two environments are synonyms for the original |proof|
-% environment.    
-%    \begin{macrocode}  
+% environment.
+%    \begin{macrocode}
   \let\inlineproof\axp at oldproof
   \let\endinlineproof\endaxp at oldproof
   \let\nestedproof\axp at oldproof
   \let\endnestedproof\endaxp at oldproof
-%    \end{macrocode}  
+%    \end{macrocode}
 % \end{environment}
 % \end{environment}
-%    \subsubsection{Section Management}  
+%    \subsubsection{Section Management}
 % \begin{macro}{axp at seccounter}
 % Sequentially incremented for every section, used to create labels.
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \newcounter{axp at seccounter}
-%    \end{macrocode}  
-% \end{macro}  
+%    \end{macrocode}
+% \end{macro}
 % \begin{macro}{\axp at sectitle}
 % Saves the title of the last encountered section.
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \def\axp at sectitle{}
-%    \end{macrocode}  
-% \end{macro}  
-% \begin{macro}{\axp at section}  
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\axp at section}
 % \changes{v1.2.2}{2021/06/23}{Detect a section within an included
 % file to avoid produced useless sections}
 % \begin{macro}{\axp@@sectiontestinput}
@@ -1366,8 +1433,8 @@
 % does not produce anything. This is useful to avoid producing empty
 % sections in the appendix. Using the \textsf{catchfile} package, we
 % also check whether a |\section| is within an |\input| that immediately
-% follows.  
-%    \begin{macrocode}  
+% follows.
+%    \begin{macrocode}
   \def\axp at section#1{%
     \@ifnextchar\input
       {\axp@@sectiontestinput{#1}}%
@@ -1379,10 +1446,10 @@
     \expandafter\axp at tmptmp\axp at tmp%
   }
   \def\axp@@sectiontestsection#1{\@ifnextchar\section{\makeatother}{\axp at oldsection{#1}\makeatother}}
-%    \end{macrocode}  
-% \end{macro}  
-% \end{macro}  
-% \end{macro}  
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
 % \begin{macro}{\axp at oldsection}
 % \begin{macro}{\section}
 % \changes{v1.1.0}{2018/07/25}{Rewrote definition of \cs{section}
@@ -1411,7 +1478,7 @@
     \addtocounter{axp at seccounter}{1}%
     \label{axp at s\roman{axp at seccounter}}%
   }
-%    \end{macrocode}  
+%    \end{macrocode}
 % \end{macro}
 % \end{macro}
 % \end{macro}
@@ -1419,30 +1486,30 @@
 % \begin{macro}{\nosectionappendix}
 % We remove the current section title, to indicate no section should be
 % created in the appendix.
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \newcommand{\nosectionappendix}{
     \global\def\axp at sectitle{}%
   }
-%    \end{macrocode}  
+%    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\axp at writesection}
 % If |\axp at sectitle| is not empty, we create
 % a new section in the appendix, referring to the main text section.
-% 
+%
 % Here, we wrap |\ref{axp at si}| into |\axp at protectref@i|, in order
 % to protect the label name from wrongly being converted to uppercase,
 % e.g., in \textsf{fancyhdr} with |\pagestyle{fancy}|.
-% 
+%
 % This macro is defined both in the |.aux| file (in order to ensure availability
 % when typesetting the |\tableofcontents|), and immediately before typesetting
 % the appendix section (to ensure availability in the |\section| command).
-% 
+%
 % \changes{v1.0.6}{2018/05/10}{Fix extraneous space after section number
 % in appendix titles}
 % \changes{v1.1.0}{2018/07/09}{Make \cs{axp at tmp} wrapper more robust.
-% Resolves issues from use of section title in \textsf{fancyhdr}, 
+% Resolves issues from use of section title in \textsf{fancyhdr},
 % and in \cs{tableofcontents} (K. D. Bauer).}
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \newcommand\axp at writesection{%
     \ifx\axp at sectitle\@empty
     \else
@@ -1465,28 +1532,28 @@
       \nosectionappendix
     \fi
   }
-%    \end{macrocode}  
+%    \end{macrocode}
 % \end{macro}
 % Finally, in a somewhat ad hoc manner, we disable the whole section management
 % for \cs{tableofcontents}, which may be typeset using a section heading,
 % but for which automatic section management does not make sense.
-%   
+%
 % \begin{macro}{\axp at oldtableofcontents}
 % \begin{macro}{\tableofcontents}
 % \changes{v1.1.0}{2018/07/09}{Disable section management for table
 % of contents}
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \let\axp at oldtableofcontents\tableofcontents
   \def\tableofcontents{{\let\section\axp at oldsection\axp at oldtableofcontents}}
-%    \end{macrocode}  
+%    \end{macrocode}
 % \end{macro}
 % \end{macro}
-%    \subsubsection{Append Compilation Mode}  
-%    \begin{macrocode}  
+%    \subsubsection{Append Compilation Mode}
+%    \begin{macrocode}
   \ifthenelse{\equal{\axp at appendix}{append}}{
-%    \end{macrocode}  
-% \begin{macro}{\axp at oldbibliography}    
-% \begin{macro}{\bibliography}    
+%    \end{macrocode}
+% \begin{macro}{\axp at oldbibliography}
+% \begin{macro}{\bibliography}
 % Unless the |bibliography| option is set to |common|, we need to set the
 % appendix bibliography source to be the same as that of the main
 % text, thanks to \textsf{bibunits}'s |\defaultbibliography| macro.
@@ -1501,7 +1568,7 @@
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
-% After the end of the main text, we add the appendix (after the command 
+% After the end of the main text, we add the appendix (after the command
 % |\appendixprelim| is issued)
 % within a |bibunit| environment so as to typeset
 % a separate bibliography for the appendix (unless the |bibliography|
@@ -1566,11 +1633,11 @@
       \fi
       }{}
     }{}{}
-%    \end{macrocode}  
-%    \begin{macrocode}  
+%    \end{macrocode}
+%    \begin{macrocode}
   }{}
 %    \end{macrocode}
-% \subsubsection{Class-Specific Behavior}    
+% \subsubsection{Class-Specific Behavior}
 % We conclude with some class-specific behavior.
 % \paragraph{ACM Document Classes (old versions, till 2017)}
 % \changes{v1.0.4}{2017/03/08}{More faithful theorem style for ACM templates}
@@ -1579,12 +1646,12 @@
   \ifdefined\@acmtitlebox
 %    \end{macrocode}
 % We first redefine the |proofsketch| environment, which is used
-% differently in the base class.    
+% differently in the base class.
 %    \begin{macrocode}
   \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
 %    \end{macrocode}
 % We adjust the styling of theorems for the needs of \textsf{apxproof}.
-%    \begin{macrocode}  
+%    \begin{macrocode}
   \newtheoremstyle{mystyle}
     {6pt}
     {6pt}
@@ -1602,7 +1669,7 @@
 % The section title of the bibliography is in uppercase in these document
 % classes. In addition, the |\thebibliography| macro hard-codes twice
 % the section title, so we un-hardcode it so that it can be modified
-% in the appendix.    
+% in the appendix.
 %    \begin{macrocode}
     \patchcmd{\thebibliography}{References}{\protect\refname}{}{}
     \patchcmd{\thebibliography}{References}{\protect\refname}{}{}
@@ -1612,7 +1679,7 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
-% 
+%
 %    \begin{macrocode}
   \fi
 %    \end{macrocode}
@@ -1622,7 +1689,7 @@
 %    \begin{macrocode}
    \ifdefined\lipics at opterrshort
 %    \end{macrocode}
-% \begin{macro}{\appendixbibliographyprelim}  
+% \begin{macro}{\appendixbibliographyprelim}
 % \changes{v1.0.3}{2017/02/06}{Support for lipics-v2016}
 % The default bibliography in the \textsf{lipics} document class
 % formatting is not compatible with the
@@ -1631,9 +1698,9 @@
     \renewcommand{\appendixbibliographyprelim}{%
       \global\let\@oldbiblabel\@biblabel
       \def\@biblabel{\hspace*{-2em}\small\@oldbiblabel}%
-    }    
+    }
 %    \end{macrocode}
-% \end{macro}    
+% \end{macro}
 %    \begin{macrocode}
   \fi
 }

Modified: trunk/Master/texmf-dist/tex/latex/apxproof/apxproof.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/apxproof/apxproof.sty	2022-10-15 20:24:03 UTC (rev 64714)
+++ trunk/Master/texmf-dist/tex/latex/apxproof/apxproof.sty	2022-10-15 20:24:18 UTC (rev 64715)
@@ -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 at oldproof\proof
   \let\endaxp at oldproof\endproof
+  \let\axp at oldclaimproof\claimproof
+  \let\endaxp at oldclaimproof\endclaimproof
   \newcommand{\axp at redefinelabels}{%
     \providecommand\label at in@display{}%
     \ifthenelse{\equal{\axp at appendix}{inline}}{%
@@ -203,6 +205,8 @@
       \noexpand\makeatletter
       \noexpand\let\noexpand\proof\noexpand\axp at oldproof
       \noexpand\let\noexpand\endproof\noexpand\endaxp at oldproof
+      \noexpand\let\noexpand\claimproof\noexpand\axp at oldclaimproof
+      \noexpand\let\noexpand\endclaimproof\noexpand\endaxp at oldclaimproof
       \noexpand\let\noexpand\section\noexpand\axp at oldsection
     }
   }
@@ -354,7 +358,8 @@
   \newcommand\noproofinappendix{%
     \global\togglefalse{axp at seenreptheorem}%
   }
-  \newenvironment{appendixproof}
+  \def\appendixproof{\catcode`\^^M=\active\@ifnextchar[{\catcode`\^^M=5\@@appendixproof}{\catcode`\^^M=5\@appendixproof}}
+  \def\@appendixproof
     {%
       \axp at writesection
       \immediate\write\axp at proofsfile{%
@@ -362,7 +367,16 @@
       }%
       \axp at VerbatimOut
     }
+  \def\@@appendixproof[#1]%
     {%
+      \axp at writesection
+      \immediate\write\axp at proofsfile{%
+        \noexpand\makeatletter\noexpand\begin{axp at oldproof}[\unexpanded{#1}]\noexpand\makeatother%
+      }%
+      \axp at VerbatimOut
+    }
+  \def\endappendixproof
+    {%
       \endaxp at VerbatimOut
       \immediate\write\axp at proofsfile{%
         \noexpand\end{axp at oldproof}%
@@ -369,7 +383,8 @@
       }%
       \noproofinappendix
     }
-  \renewenvironment{proof}
+  \def\proof{\catcode`\^^M=\active\ltx at ifnextchar@nospace[{\catcode`\^^M=5\axp@@proof}{\catcode`\^^M=5\axp at proof}}
+  \def\axp at proof
     {%
       \iftoggle{axp at seenreptheorem}{%
         \appendixproof
@@ -377,13 +392,55 @@
         \axp at oldproof
       }%
     }
+  \def\axp@@proof[#1]%
     {%
       \iftoggle{axp at seenreptheorem}{%
+        \appendixproof[#1]
+      }{%
+        \axp at oldproof[#1]
+      }%
+    }
+  \def\endproof
+    {%
+      \iftoggle{axp at seenreptheorem}{%
         \endappendixproof
       }{%
         \endaxp at oldproof
       }%
     }
+  \ifdefined\claimproof
+  \def\claimproof{\catcode`\^^M=\active\ltx at ifnextchar@nospace[{\catcode`\^^M=5\axp@@claimproof}{\catcode`\^^M=5\axp at claimproof}}
+  \def\axp at claimproof
+    {%
+      \iftoggle{axp at seenreptheorem}{%
+        \appendixproof
+      }{%
+        \axp at oldclaimproof
+      }%
+    }
+  \def\axp@@claimproof[#1]%
+    {%
+      \iftoggle{axp at seenreptheorem}{%
+        \appendixproof[#1]
+      }{%
+        \axp at oldclaimproof[#1]
+      }%
+    }
+  \def\endclaimproof
+    {%
+      \iftoggle{axp at seenreptheorem}{%
+        \immediate\write\axp at proofsfile{%
+          \noexpand\makeatletter
+          \noexpand\let\noexpand\endaxp at oldproof\noexpand\endaxp at oldclaimproof
+          \noexpand\makeatother
+        }%
+        \endappendixproof
+      }{%
+        \endaxp at oldclaimproof
+      }%
+    }
+  \fi
+
   \let\inlineproof\axp at oldproof
   \let\endinlineproof\endaxp at oldproof
   \let\nestedproof\axp at oldproof



More information about the tex-live-commits mailing list.