summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/apxproof
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-10-15 03:01:23 +0000
committerNorbert Preining <norbert@preining.info>2022-10-15 03:01:23 +0000
commit716f66d13d38e113c2d0491804fae5879de67bb3 (patch)
tree98e4752aa89041db35c60e5b893897e714561340 /macros/latex/contrib/apxproof
parent1c0d5e0721918b8ee790c9f1c11f1543e0403322 (diff)
CTAN sync 202210150301
Diffstat (limited to 'macros/latex/contrib/apxproof')
-rw-r--r--macros/latex/contrib/apxproof/README.md29
-rw-r--r--macros/latex/contrib/apxproof/apxproof.dtx363
-rw-r--r--macros/latex/contrib/apxproof/apxproof.pdfbin569226 -> 595825 bytes
3 files changed, 232 insertions, 160 deletions
diff --git a/macros/latex/contrib/apxproof/README.md b/macros/latex/contrib/apxproof/README.md
index c36cb1411a..8b385398fa 100644
--- a/macros/latex/contrib/apxproof/README.md
+++ b/macros/latex/contrib/apxproof/README.md
@@ -19,32 +19,37 @@ The documentation of this package is provided in the
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@senellart.com>
diff --git a/macros/latex/contrib/apxproof/apxproof.dtx b/macros/latex/contrib/apxproof/apxproof.dtx
index 0225d20e77..35a8b6f95a 100644
--- a/macros/latex/contrib/apxproof/apxproof.dtx
+++ b/macros/latex/contrib/apxproof/apxproof.dtx
@@ -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@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@IndexColumns=2\makeatother
@@ -102,13 +102,13 @@
% }
%
% \title{The \textsf{apxproof} package}
-%
+%
% \author{Pierre Senellart \\ \texttt{pierre@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 @@ This content is in the appendix.
% \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 @@ This content is in the appendix.
% \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 @@ This proof is in the appendix.
% |\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 proof is in the appendix.
% 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 the proof of the repeated foobar.
% 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 @@ This is the proof of the repeated foobar.
% \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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% 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@senellart.com}{<pierre@senellart.com>}
% \end{itemize}
@@ -505,7 +497,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
}}}
\ifthenelse{\equal{\axp@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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% 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@newtheoremreptmp| are
+% |\@oparg| and |\axp@newtheoremreptmp| are
% used for. |\axp@newtheoremrep| is defined differently
% depending on the compilation mode.
% \begin{macrocode}
@@ -745,7 +737,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \begin{macrocode}
\newenvironment{proofsketch}{\begin{axp@oldproof}[Proof sketch]}{\end{axp@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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \end{macro}
% \end{macro}
% \begin{environment}{axp@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@oldproof\proof
\let\endaxp@oldproof\endproof
-% \end{macrocode}
+ \let\axp@oldclaimproof\claimproof
+ \let\endaxp@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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \changes{v1.2.0}{2019/02/15}{Fix extra spacing erroneously
% introduced within the \texttt{\textbackslash axp@redefinelabels}
% macro}
-% \begin{macrocode}
+% \begin{macrocode}
\newcommand{\axp@redefinelabels}{%
\providecommand\label@in@display{}%
\ifthenelse{\equal{\axp@appendix}{inline}}{%
@@ -814,9 +810,9 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\renewcommand\label@in@display[1]{\axp@oldlabel@in@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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\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@oldproof}[sketch]}{\end{axp@oldproof}}
% \end{macrocode}
@@ -886,7 +882,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
}
}
% \end{macrocode}
-% \end{macro}
+% \end{macro}
% \begin{environment}{inlineproof}
% \begin{environment}{nestedproof}
% \begin{environment}{appendixproof}
@@ -900,23 +896,23 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\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
\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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% useful: either append the appendix material to the document, or strip
% it entirely.
% \bigskip
-% \subsubsection{Auxiliary File for the Appendix}
-% \begin{macro}{\axp@proofsfile}
+% \subsubsection{Auxiliary File for the Appendix}
+% \begin{macro}{\axp@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@proofsfile
\immediate\openout\axp@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@proofsfile{%
\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
}
}
-% \end{macrocode}
-% \end{macro}
-% \end{environment}
+% \end{macrocode}
+% \end{macro}
+% \end{environment}
% \begin{macro}{\axp@unactivateeightbit}
% \changes{v1.1.0}{2019/01/28}{Fix compilation of non-ASCII
% characters with \texttt{\textbackslash usepackage[utf8]\{inputenc\}}}
@@ -976,7 +974,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \begin{environment}{axp@VerbatimOut}
% \begin{macro}{\FVB@axp@VerbatimOut}
% \begin{macro}{\FVE@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@VerbatimOut| that writes every line
@@ -1009,39 +1007,39 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\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@writesection\axp@VerbatimOut}
{\endaxp@VerbatimOut}
-% \end{macrocode}
+% \end{macrocode}
% \end{environment}
-% \subsubsection{Definition of New Theorems}
+% \subsubsection{Definition of New Theorems}
% \begin{macro}{axp@seenreptheorem}
% Used to indicate whether a repeated theorem was just typeset, without
% its proof.
-% \begin{macrocode}
+% \begin{macrocode}
\newtoggle{axp@seenreptheorem}
-% \end{macrocode}
-% \end{macro}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{axp@rpcounter}
% Sequentially incremented for every repeated theorem, used to create labels.
-% \begin{macrocode}
+% \begin{macrocode}
\newcounter{axp@rpcounter}
-% \end{macrocode}
-% \end{macro}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{axp@equation}
% \begin{macro}{axp@equationx}
% Used to save the value of the |equation| counter, when |repeqn| is set
% to |same|.
-% \begin{macrocode}
+% \begin{macrocode}
\newcounter{axp@equation}
\newcounter{axp@equationx}
-% \end{macrocode}
+% \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{axp@newtheoremrep}
@@ -1050,13 +1048,13 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% theorem |foobar|. We then patch |\begin{foobar}| so as not to
% expect a proof in the appendix and define an internal theorem |axp@foobarrp| that
% will be used in the appendix to restate the existing theorem.
-% \begin{macrocode}
+% \begin{macrocode}
\def\axp@newtheoremrep#1[#2]#3[#4]{%
\axp@newtheoremrep@definetheorem{#1}{#2}{#3}{#4}%
\expandafter\pretocmd\csname #1\endcsname{\noproofinappendix}{}{}%
\axp@newtheorem*{axp@#1rp}{#3}%
\axp@forward@setup{#1}{#2}{#3}{#4}%
-% \end{macrocode}
+% \end{macrocode}
% We then define a |foobarrep| environment that increments the
% |axp@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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\fi
\mainbodyrepeatedtheorem
\BODY\end{#1}%
-% \end{macrocode}
+% \end{macrocode}
% We set the |axp@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@seenreptheorem}%
\global\expandafter\let\csname rplet\roman{axp@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@foobarrp| environment
% and a reference to the previously defined label.
@@ -1102,7 +1100,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% 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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \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@writesection%
\immediate\write\axp@proofsfile{\noexpand\makeatletter}%
\ifthenelse{\equal{\axp@repeqn}{same}}{%
@@ -1152,7 +1150,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\noexpand\the\noexpand\thm@notefont
\noexpand\fi
\fi
- \fi
+ \fi
{} (\unexpanded{{##1}})%
}%
]%
@@ -1170,18 +1168,18 @@ This is a citation in the appendix~\cite{proofsAreHard}.
}%
}
% \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@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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% 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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% 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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% 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@forward}
\newcommand{\axp@forward@link}[2]{%
@@ -1250,7 +1248,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \end{macrocode}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macro}{\axp@forward@target}
% Provides the needed |\hypertarget|.
% Intended to be written to the |.axp| file.
@@ -1264,7 +1262,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\axp@forward@setup}
% In order to support counter inheritance with the first
% optional argument of |\newtheoremrep|,
@@ -1278,22 +1276,28 @@ This is a citation in the appendix~\cite{proofsAreHard}.
}
% \end{macrocode}
% \end{macro}
-%
-%
-% \subsubsection{Proof Environments}
+%
+%
+% \subsubsection{Proof Environments}
% \begin{macro}{\noproofinappendix}
% Utility macro that toggles |axp@seenreptheorem| to false.
-% \begin{macrocode}
+% \begin{macrocode}
\newcommand\noproofinappendix{%
\global\togglefalse{axp@seenreptheorem}%
}
% \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@writesection
\immediate\write\axp@proofsfile{%
@@ -1301,6 +1305,15 @@ This is a citation in the appendix~\cite{proofsAreHard}.
}%
\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{%
@@ -1308,13 +1321,17 @@ This is a citation in the appendix~\cite{proofsAreHard}.
}%
\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@ifnextchar@nospace[{\catcode`\^^M=5\axp@@proof}{\catcode`\^^M=5\axp@proof}}
+ \def\axp@proof
{%
\iftoggle{axp@seenreptheorem}{%
\appendixproof
@@ -1322,6 +1339,15 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\axp@oldproof
}%
}
+ \def\axp@@proof[#1]%
+ {%
+ \iftoggle{axp@seenreptheorem}{%
+ \appendixproof[#1]
+ }{%
+ \axp@oldproof[#1]
+ }%
+ }
+ \def\endproof
{%
\iftoggle{axp@seenreptheorem}{%
\endappendixproof
@@ -1329,34 +1355,75 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\endaxp@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@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
+% \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@oldproof
\let\endinlineproof\endaxp@oldproof
\let\nestedproof\axp@oldproof
\let\endnestedproof\endaxp@oldproof
-% \end{macrocode}
+% \end{macrocode}
% \end{environment}
% \end{environment}
-% \subsubsection{Section Management}
+% \subsubsection{Section Management}
% \begin{macro}{axp@seccounter}
% Sequentially incremented for every section, used to create labels.
-% \begin{macrocode}
+% \begin{macrocode}
\newcounter{axp@seccounter}
-% \end{macrocode}
-% \end{macro}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\axp@sectitle}
% Saves the title of the last encountered section.
-% \begin{macrocode}
+% \begin{macrocode}
\def\axp@sectitle{}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\axp@section}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\axp@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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% 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@section#1{%
\@ifnextchar\input
{\axp@@sectiontestinput{#1}}%
@@ -1379,10 +1446,10 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\expandafter\axp@tmptmp\axp@tmp%
}
\def\axp@@sectiontestsection#1{\@ifnextchar\section{\makeatother}{\axp@oldsection{#1}\makeatother}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\axp@oldsection}
% \begin{macro}{\section}
% \changes{v1.1.0}{2018/07/25}{Rewrote definition of \cs{section}
@@ -1411,7 +1478,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\addtocounter{axp@seccounter}{1}%
\label{axp@s\roman{axp@seccounter}}%
}
-% \end{macrocode}
+% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
@@ -1419,30 +1486,30 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \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@sectitle{}%
}
-% \end{macrocode}
+% \end{macrocode}
% \end{macro}
% \begin{macro}{\axp@writesection}
% If |\axp@sectitle| is not empty, we create
% a new section in the appendix, referring to the main text section.
-%
+%
% Here, we wrap |\ref{axp@si}| into |\axp@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@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@writesection{%
\ifx\axp@sectitle\@empty
\else
@@ -1465,28 +1532,28 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\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@oldtableofcontents}
% \begin{macro}{\tableofcontents}
% \changes{v1.1.0}{2018/07/09}{Disable section management for table
% of contents}
-% \begin{macrocode}
+% \begin{macrocode}
\let\axp@oldtableofcontents\tableofcontents
\def\tableofcontents{{\let\section\axp@oldsection\axp@oldtableofcontents}}
-% \end{macrocode}
+% \end{macrocode}
% \end{macro}
% \end{macro}
-% \subsubsection{Append Compilation Mode}
-% \begin{macrocode}
+% \subsubsection{Append Compilation Mode}
+% \begin{macrocode}
\ifthenelse{\equal{\axp@appendix}{append}}{
-% \end{macrocode}
-% \begin{macro}{\axp@oldbibliography}
-% \begin{macro}{\bibliography}
+% \end{macrocode}
+% \begin{macro}{\axp@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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\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@oldproof}[sketch]}{\end{axp@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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% 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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \end{macro}
% \end{macro}
% \end{macro}
-%
+%
% \begin{macrocode}
\fi
% \end{macrocode}
@@ -1622,7 +1689,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \begin{macrocode}
\ifdefined\lipics@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 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\renewcommand{\appendixbibliographyprelim}{%
\global\let\@oldbiblabel\@biblabel
\def\@biblabel{\hspace*{-2em}\small\@oldbiblabel}%
- }
+ }
% \end{macrocode}
-% \end{macro}
+% \end{macro}
% \begin{macrocode}
\fi
}
diff --git a/macros/latex/contrib/apxproof/apxproof.pdf b/macros/latex/contrib/apxproof/apxproof.pdf
index 223f7ebad7..8f2f4e9bc5 100644
--- a/macros/latex/contrib/apxproof/apxproof.pdf
+++ b/macros/latex/contrib/apxproof/apxproof.pdf
Binary files differ