diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/apxproof/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/apxproof/apxproof.pdf | bin | 563983 -> 566581 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/apxproof/apxproof.dtx | 67 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/apxproof/apxproof.ins | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/apxproof/apxproof.sty | 31 |
5 files changed, 65 insertions, 39 deletions
diff --git a/Master/texmf-dist/doc/latex/apxproof/README.md b/Master/texmf-dist/doc/latex/apxproof/README.md index f57a89624c4..c36cb1411a9 100644 --- a/Master/texmf-dist/doc/latex/apxproof/README.md +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/apxproof/apxproof.pdf b/Master/texmf-dist/doc/latex/apxproof/apxproof.pdf Binary files differindex d4123c8d119..48f0d4638e5 100644 --- a/Master/texmf-dist/doc/latex/apxproof/apxproof.pdf +++ b/Master/texmf-dist/doc/latex/apxproof/apxproof.pdf diff --git a/Master/texmf-dist/source/latex/apxproof/apxproof.dtx b/Master/texmf-dist/source/latex/apxproof/apxproof.dtx index d02bb77435d..307934752d4 100644 --- a/Master/texmf-dist/source/latex/apxproof/apxproof.dtx +++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/apxproof/apxproof.ins b/Master/texmf-dist/source/latex/apxproof/apxproof.ins index 23cc7248a0b..d563944d941 100644 --- a/Master/texmf-dist/source/latex/apxproof/apxproof.ins +++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/tex/latex/apxproof/apxproof.sty b/Master/texmf-dist/tex/latex/apxproof/apxproof.sty index a7f9ce12d29..ccbfef56bdd 100644 --- a/Master/texmf-dist/tex/latex/apxproof/apxproof.sty +++ b/Master/texmf-dist/tex/latex/apxproof/apxproof.sty @@ -6,7 +6,7 @@ %% %% apxproof.dtx (with options: `package') %% -%% 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 @@ -27,12 +27,13 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{apxproof} - [2020/10/15 v1.2.1 Automatic proofs in appendix] + [2021/06/23 v1.2.2 Automatic proofs in appendix] \RequirePackage{environ} \RequirePackage{etoolbox} \RequirePackage{fancyvrb} \RequirePackage{ifthen} \RequirePackage{kvoptions} +\RequirePackage{catchfile} \@ifpackageloaded{amsthm}{ }{ \let\apx@oldamsthmproof\proof @@ -213,7 +214,6 @@ \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{% @@ -239,7 +239,7 @@ \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}% @@ -248,6 +248,7 @@ \endcsname \BODY \axp@writesection% + \immediate\write\axp@proofsfile{\noexpand\makeatletter}% \ifthenelse{\equal{\axp@repeqn}{same}}{% \immediate\write\axp@proofsfile{% \noexpand\setcounter{axp@equationx}{\value{equation}}% @@ -279,7 +280,7 @@ \noexpand\fi \fi \fi - {} (\unexpanded{##1})% + {} (\unexpanded{{##1}})% }% ]% \noexpand\axp@forward@target{axp@fw@r\roman{axp@rpcounter}}{}% @@ -342,7 +343,7 @@ {% \axp@writesection \immediate\write\axp@proofsfile{% - \noexpand\begin{axp@oldproof}% + \noexpand\makeatletter\noexpand\begin{axp@oldproof}\noexpand\makeatother% }% \axp@VerbatimOut } @@ -374,13 +375,17 @@ \let\endnestedproof\endaxp@oldproof \newcounter{axp@seccounter} \def\axp@sectitle{} - \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}} \let\axp@oldsection\section \def\section{\@ifstar\@section\@@section} \newcommand{\@section}[2][\relax]{\axp@@@section{*}{#1}{#2}}% @@ -430,7 +435,7 @@ \axp@oldbibliography{#1}% } }{} - \AtEndDocument{ + \pretocmd{\@enddocumenthook}{% \ifdefined\NAT@testdef \renewcommand\bibcite[2]{% \global\@namedef{b@#1\@extra@binfo}{#2}% @@ -459,7 +464,7 @@ \let\bibcite\NAT@testdef \fi }{} - } + }{}{} }{} \ifdefined\@acmtitlebox \renewenvironment{proofsketch}{\begin{axp@oldproof}[sketch]}{\end{axp@oldproof}} |