summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/apxproof
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-06-24 03:04:59 +0000
committerNorbert Preining <norbert@preining.info>2021-06-24 03:04:59 +0000
commit1a77d17b8844e0cdad3a4851d5cb3a95b703a4df (patch)
tree8efd430bf6e5066743f396c3b58a95a84311af53 /macros/latex/contrib/apxproof
parenta809a190ff669feb11cb64db915b763abd0bed81 (diff)
CTAN sync 202106240304
Diffstat (limited to 'macros/latex/contrib/apxproof')
-rw-r--r--macros/latex/contrib/apxproof/README.md2
-rw-r--r--macros/latex/contrib/apxproof/apxproof.dtx67
-rw-r--r--macros/latex/contrib/apxproof/apxproof.ins4
-rw-r--r--macros/latex/contrib/apxproof/apxproof.pdfbin563983 -> 566581 bytes
4 files changed, 47 insertions, 26 deletions
diff --git a/macros/latex/contrib/apxproof/README.md b/macros/latex/contrib/apxproof/README.md
index f57a89624c..c36cb1411a 100644
--- a/macros/latex/contrib/apxproof/README.md
+++ b/macros/latex/contrib/apxproof/README.md
@@ -34,7 +34,7 @@ in any other directory where LaTeX searches for packages.
## License
-Copyright © 2016-2020 by Pierre Senellart.
+Copyright © 2016-2021 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
diff --git a/macros/latex/contrib/apxproof/apxproof.dtx b/macros/latex/contrib/apxproof/apxproof.dtx
index d02bb77435..307934752d 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-2020 by Pierre Senellart
+% Copyright (C) 2016-2021 by Pierre Senellart
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -24,7 +24,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<package>\ProvidesPackage{apxproof}
-%<package> [2020/10/15 v1.2.1 Automatic proofs in appendix]
+%<package> [2021/06/23 v1.2.2 Automatic proofs in appendix]
%
%<*driver>
\documentclass{ltxdoc}
@@ -45,7 +45,7 @@
%</driver>
% \fi
%
-% \CheckSum{813}
+% \CheckSum{828}
%
% \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
@@ -468,7 +468,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% Issues not listed here should be reported to the author.
%
% \section{License}
-% Copyright \textcopyright{} 2016--2020 by Pierre Senellart.
+% Copyright \textcopyright{} 2016--2021 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
@@ -526,6 +526,11 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \begin{macrocode}
\RequirePackage{kvoptions}
% \end{macrocode}
+% \item \textsf{catchfile} to be able to check the content of files
+% |\input| within appendix content.
+% \begin{macrocode}
+\RequirePackage{catchfile}
+% \end{macrocode}
% \item \textsf{amsthm} for its |\newteorem| macro.
% Some document classes (e.g., \textsf{lipics})
% preload \textsf{amsthm}: this is fine, |\RequirePackage{amsthm}|
@@ -968,7 +973,6 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\def\FV@ProcessLine{\immediate\write\axp@proofsfile}%
\let\FV@FontScanPrep\relax
\let\@noligs\relax
- \immediate\write\axp@proofsfile{\noexpand\makeatother}%
\def\FV@CatCodesHook{}%
\FV@Scan}
\def\FVE@axp@VerbatimOut{%
@@ -1035,6 +1039,8 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% We save the equation counter
% before typesetting the theorem environment, to reset it to the same
% value in the repeated environment when |repeqn| is set to |same|.
+% \changes{v1.2.2}{2020/11/25}{Fix handling of optional arguments of
+% repeated theorems containing optional arguments}
% \begin{macrocode}
\NewEnviron{#1rep}[1][]{%
\ifthenelse{\equal{\axp@repeqn}{same}}{%
@@ -1044,7 +1050,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\ifx\relax##1\relax
\axp@with@forward{#1}{\begin{#1}}\label{axp@r\roman{axp@rpcounter}}%
\else
- \axp@with@forward{#1}{\begin{#1}[##1]}\label{axp@r\roman{axp@rpcounter}}%
+ \axp@with@forward{#1}{\begin{#1}[{##1}]}\label{axp@r\roman{axp@rpcounter}}%
\fi
\mainbodyrepeatedtheorem
\BODY\end{#1}%
@@ -1081,6 +1087,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \changes{v1.2.0}{2019/10/07}{Fix display of theorem notes}
% \begin{macrocode}
\axp@writesection%
+ \immediate\write\axp@proofsfile{\noexpand\makeatletter}%
\ifthenelse{\equal{\axp@repeqn}{same}}{%
\immediate\write\axp@proofsfile{%
\noexpand\setcounter{axp@equationx}{\value{equation}}%
@@ -1112,7 +1119,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\noexpand\fi
\fi
\fi
- {} (\unexpanded{##1})%
+ {} (\unexpanded{{##1}})%
}%
]%
\noexpand\axp@forward@target{axp@fw@r\roman{axp@rpcounter}}{}%
@@ -1256,7 +1263,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
{%
\axp@writesection
\immediate\write\axp@proofsfile{%
- \noexpand\begin{axp@oldproof}%
+ \noexpand\makeatletter\noexpand\begin{axp@oldproof}\noexpand\makeatother%
}%
\axp@VerbatimOut
}
@@ -1316,21 +1323,28 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \end{macrocode}
% \end{macro}
% \begin{macro}{\axp@section}
-% \begin{macro}{\axp@@ssection}
-% \begin{macro}{\axp@@section}
-% This command behaves similarly to |\axp@oldsection|, except that it first
-% tests whether a |\section| follows, and if so, does not produce
-% anything. This is useful to avoid producing empty sections in the
-% appendix. As usual, we have to process starred and unstarred version
-% separately.
+% \changes{v1.2.2}{2021/06/23}{Detect a section within an included
+% file to avoid produced useless sections}
+% \begin{macro}{\axp@@sectiontestinput}
+% \begin{macro}{\axp@@sectiontestsection}
+% This command |\axp@section| behaves similarly to |\axp@oldsection|,
+% except that it first tests whether a |\section| follows, and if so,
+% 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}
- \def\axp@section{\@ifstar\axp@@ssection\axp@@section}
- \def\axp@@ssection#1{%
- \@ifnextchar\section{}{\axp@oldsection*{#1}}%
+ \def\axp@section#1{%
+ \@ifnextchar\input
+ {\axp@@sectiontestinput{#1}}%
+ {\axp@@sectiontestsection{#1}}%
}
- \def\axp@@section#1{%
- \@ifnextchar\section{}{\axp@oldsection{#1}}%
+ \def\axp@@sectiontestinput#1\input#2{%
+ \CatchFileDef{\axp@tmp}{#2}{}%
+ \def\axp@tmptmp{\axp@@sectiontestsection{#1}}%
+ \expandafter\axp@tmptmp\axp@tmp%
}
+ \def\axp@@sectiontestsection#1{\@ifnextchar\section{\makeatother}{\axp@oldsection{#1}\makeatother}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1457,7 +1471,14 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% |\appendixprelim| is issued)
% within a |bibunit| environment so as to typeset
% a separate bibliography for the appendix (unless the |bibliography|
-% option is set to |common|). There is an extra test to
+% option is set to |common|). This is done using |\pretocmd| on
+% |\@enddocumenthook| instead of |\AtEndDocument| because we want the
+% code to be run before any code in the |\@enddocumenthook| that has
+% been set in the document class, as in the \textsf{amsart} document
+% class.
+% \changes{v1.2.2}{2021/03/23}{Compatibility with AMS document classes: do not
+% use \texttt{\textbackslash AtEndDocument}}
+% There is an extra test to
% ensure an empty bibliography environment is not produced.
% The name of the bibliography is changed to |\appendixrefname|; in most
% document classes, it is called |\refname| but it is occasionally
@@ -1469,7 +1490,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \changes{v1.2.1}{2020/02/27}{Ad hoc fix for \textsf{natbib}
% package conflict}
% \begin{macrocode}
- \AtEndDocument{
+ \pretocmd{\@enddocumenthook}{%
\ifdefined\NAT@testdef
\renewcommand\bibcite[2]{%
\global\@namedef{b@#1\@extra@binfo}{#2}%
@@ -1498,7 +1519,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\let\bibcite\NAT@testdef
\fi
}{}
- }
+ }{}{}
% \end{macrocode}
% \begin{macrocode}
}{}
diff --git a/macros/latex/contrib/apxproof/apxproof.ins b/macros/latex/contrib/apxproof/apxproof.ins
index 23cc7248a0..d563944d94 100644
--- a/macros/latex/contrib/apxproof/apxproof.ins
+++ b/macros/latex/contrib/apxproof/apxproof.ins
@@ -1,5 +1,5 @@
%%
-%% Copyright (C) 2016-2019 by Pierre Senellart
+%% Copyright (C) 2016-2021 by Pierre Senellart
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -26,7 +26,7 @@
\preamble
-Copyright (C) 2016-2019 by Pierre Senellart
+Copyright (C) 2016-2021 by Pierre Senellart
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/apxproof/apxproof.pdf b/macros/latex/contrib/apxproof/apxproof.pdf
index d4123c8d11..48f0d4638e 100644
--- a/macros/latex/contrib/apxproof/apxproof.pdf
+++ b/macros/latex/contrib/apxproof/apxproof.pdf
Binary files differ