summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-03-17 21:35:40 +0000
committerKarl Berry <karl@freefriends.org>2017-03-17 21:35:40 +0000
commited8e46e860bca3acafba4475ee050d009cbef8c7 (patch)
tree7fe43f251fead0ee2c0bb92f76e355979e16809f /Master/texmf-dist
parenta7a94decb80632ef1896eb7ff4deb321c1a5182f (diff)
apxproof (17may17)
git-svn-id: svn://tug.org/texlive/trunk@43527 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/apxproof/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/apxproof/apxproof.pdfbin435613 -> 440812 bytes
-rw-r--r--Master/texmf-dist/source/latex/apxproof/apxproof.dtx133
-rw-r--r--Master/texmf-dist/source/latex/apxproof/apxproof.ins4
-rw-r--r--Master/texmf-dist/tex/latex/apxproof/apxproof.sty41
5 files changed, 143 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/latex/apxproof/README.md b/Master/texmf-dist/doc/latex/apxproof/README.md
index d46e042013b..de7342c9274 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 (C) 2016 by Pierre Senellart.
+Copyright © 2016-2017 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
index 743d81905c4..a9836d91ed8 100644
--- a/Master/texmf-dist/doc/latex/apxproof/apxproof.pdf
+++ b/Master/texmf-dist/doc/latex/apxproof/apxproof.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/apxproof/apxproof.dtx b/Master/texmf-dist/source/latex/apxproof/apxproof.dtx
index 95141af7d5a..9f46f84e254 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 by Pierre Senellart
+% Copyright (C) 2016-2017 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> [2017/02/06 v1.0.3 Automatic proofs in appendix]
+%<package> [2017/03/17 v1.0.4 Automatic proofs in appendix]
%
%<*driver>
\documentclass{ltxdoc}
@@ -44,7 +44,7 @@
%</driver>
% \fi
%
-% \CheckSum{446}
+% \CheckSum{482}
%
% \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
@@ -62,6 +62,27 @@
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
+% \changes{v1.0.4}{2017/03/02}{Show options commented on in margin and index}
+%\iffalse
+% Taken from xkeyval.dtx
+%\fi
+%\makeatletter
+%\def\DescribeOption#1{\leavevmode\@bsphack
+% \marginpar{\raggedleft\PrintDescribeOption{#1}}%
+% \SpecialOptionIndex{#1}\@esphack\ignorespaces}
+%\def\PrintDescribeOption#1{\strut\emph{option}\\\MacroFont #1\ }
+%\def\SpecialOptionIndex#1{\@bsphack
+% \index{#1\actualchar{\protect\ttfamily#1}
+% (option)\encapchar usage}%
+% \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
+% usage}\@esphack}
+%\def\DescribeOptions#1{\leavevmode\@bsphack
+% \marginpar{\raggedleft\strut\emph{options}%
+% \@for\@tempa:=#1\do{%
+% \\\strut\MacroFont\@tempa\SpecialOptionIndex\@tempa
+% }}\@esphack\ignorespaces}
+%\makeatother
+%
% \changes{v1.0.0}{2016/10/31}{Initial released version}
% \changes{v1.0.1}{2016/11/07}{Prevent empty bibliography environment;
% fix typos}
@@ -275,7 +296,7 @@ This is the proof of the repeated foobar.
% \end{example}
%
% \subsection{Bibliography}
-% \textsf{apxproof} automatically adds a bibliography in the appendix
+% By default, \textsf{apxproof} automatically adds a bibliography in the appendix
% with only the references cited in the appendix material. This allows for a
% clean separation of references used solely in the main text, and those
% used in the appendix.
@@ -299,7 +320,14 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% default, it does). See
% Section~\ref{sec:customization} for how to configure the appearance of
% that bibliography.
+%
+% \DescribeOption{bibliography}
+% In order to use a single appendix for the main text and the
+% bibliography, one can specify the
+% value |common| to the |bibliography| option when loading the package.
+% (By default this option is set to |separate|.)
% \subsection{Mode}
+% \DescribeOption{appendix}
% An optional \meta{mode} can be specified when loading the package:
% \begin{quote}|\usepackage[appendix=|\meta{mode}|]{apxproof}|\end{quote}
% \meta{mode} can take one of the following three values:
@@ -333,9 +361,15 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \item[\textbackslash|appendixbibliographyprelim|]\DescribeMacro{\appendixbibliographyprelim} contains arbitrary code that is executed
% just before the production of the bibliography in appendix, which can
% be used to configure the way it is displayed.
+% \item[\textbackslash|appendixprelim|]\DescribeMacro{\appendixprelim} contains arbitrary code that is executed
+% just before the production of the appendix, which can
+% be used to configure the way it is displayed. By default, this command
+% contains |\clearpage\onecolumn| (the appendix is typeset on a new page
+% in single-column mode) but redefining this option allows changing this
+% behavior.
% \end{description}
%
-% \subsection{Advanced Commands}
+% \subsection{Advanced Features}
% We now describe a few advanced macros and environments, whose usage is limited to
% special cases:
% \begin{description}
@@ -396,7 +430,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 by Pierre Senellart.
+% Copyright \textcopyright{} 2016--2017 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
@@ -463,14 +497,23 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% will simply have no effect. On the other hand, some other document
% classes (e.g., \textsf{llncs} or \textsf{sig-alternate}) define a
% |proof| environment that conflicts with \textsf{amsthm}, so we have to
-% undefine this environment before loading \textsf{amsthm}.
+% undefine this environment before loading \textsf{amsthm}. In that case,
+% we reestablish the existing proof environments, in case they had been
+% customized (e.g., \textsf{sig-alternate})
+% \changes{v1.0.4}{2017/03/08}{Re-establish custom proof environments}
% \begin{macrocode}
\@ifpackageloaded{amsthm}{
}{
+ \let\apx@oldamsthmproof\proof
+ \let\apx@oldamsthmendproof\endproof
\let\proof\undefined
\let\endproof\undefined
}
\RequirePackage{amsthm}
+\ifdefined\apx@oldamsthmproof
+ \let\proof\apx@oldamsthmproof
+ \let\endproof\apx@oldamsthmendproof
+\fi
% \end{macrocode}
% \end{itemize}
% \subsection{Option Processing}
@@ -480,20 +523,36 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \begin{macrocode}
\makeatletter
% \end{macrocode}
-% \begin{macro}{\axp@appendix}
-% We setup the processing of options using \textsf{keyval} facilities;
-% the only declared option is named |appendix|, with a default value of
-% |append|:
+% We setup the processing of options using \textsf{keyval} facilities.
% \begin{macrocode}
\SetupKeyvalOptions{
family=axp,
prefix=axp@
}
+% \end{macrocode}
+% We declare the following options:
+% \begin{itemize}
+% \item |appendix|, with a default value of |append| (other possible
+% values: |strip|, |inline|);
+% \item |bibliography|, with a default value of |separate| (other
+% possible value: |common|);
+% \end{itemize}
+% \begin{macro}{\axp@appendix}
+% \begin{macrocode}
\DeclareStringOption[append]{appendix}
-\ProcessLocalKeyvalOptions*
% \end{macrocode}
% \end{macro}
-% We check that the value of the |appendix| option is valid, and add a
+% \begin{macro}{\axp@bibliography}
+% \changes{v1.0.4}{2017/03/02}{\texttt{bibliography} option}
+% \begin{macrocode}
+\DeclareStringOption[separate]{bibliography}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\ProcessLocalKeyvalOptions*
+% \end{macrocode}
+% We check that the value of the |appendix| and
+% |bibliography| options are valid, and add a
% message to the compilation log.
% \begin{macrocode}
\ifthenelse{\equal{\axp@appendix}{append}}{
@@ -506,6 +565,14 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\errmessage{Error: unsupported option appendix=\axp@appendix for
package apxproof}
}}}
+\ifthenelse{\equal{\axp@bibliography}{separate}}{
+ \message{apxproof: Separate bibliography for appendix material}
+}{\ifthenelse{\equal{\axp@bibliography}{common}}{
+ \message{apxproof: Common bibliography for appendix and main text}
+}{
+ \errmessage{Error: unsupported option bibliography=\axp@bibliography for
+ package apxproof}
+}}
% \end{macrocode}
% \subsection{Macros Common to All Compilation Modes}
% \begin{macro}{\newtheoremrep}
@@ -524,9 +591,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% Simple |proofsketch| environment.
% \changes{v1.0.3}{2016/12/16}{Ignore spaces after beginning of Proof sketch}
% \begin{macrocode}
-\newenvironment{proofsketch}
- {\vskip3pt\noindent\textit{Proof sketch.} \upshape\ignorespaces}
- {\hfill\qed\vskip3pt}
+ \newenvironment{proofsketch}{\begin{axp@oldproof}[Proof sketch]}{\end{axp@oldproof}}
% \end{macrocode}
% \end{environment}
% \begin{macro}{\thmhead}
@@ -546,37 +611,48 @@ This is a citation in the appendix~\cite{proofsAreHard}.
% \begin{macro}{\appendixrefname}
% \begin{macro}{\appendixbibliographystyle}
% \begin{macro}{\appendixbibliographyprelim}
+% \begin{macro}{\appendixprelim}
+% \changes{v1.0.4}{2017/03/03}{Configurable appendix style}
% \begin{macro}{\appendixsectionformat}
-% We provide sensible defaults for these three user-customizable macros.
+% We provide sensible defaults for these four user-customizable macros.
% Even though they are only useful in append mode, we define them for
% all modes so that a |\renewcommand| works in all cases.
% \begin{macrocode}
\newcommand{\appendixrefname}{References for the Appendix}
\newcommand{\appendixbibliographystyle}{alpha}
\newcommand{\appendixbibliographyprelim}{}
+\newcommand{\appendixprelim}{\clearpage\onecolumn}
\newcommand{\appendixsectionformat}[2]{Proofs for Section~#1 (#2)}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
% Finally, some class-specific behavior ensures that the theorems created by
% |\newtheoremrep| appear with the correct style.
% For now, only the styling for ACM document classes (e.g.,
-% \textsf{sig-alternate}) needs to be adapted.
+% \textsf{sig-alternate}) and \textsf{llncs} needs to be adapted, as both
+% redefine the proof environments in different ways.
+% \changes{v1.0.4}{2017/03/08}{More faithful theorem style for ACM templates}
+% \changes{v1.0.4}{2017/03/08}{More robust coherent styling of proof sketches}
% \begin{macrocode}
\ifdefined\@acmtitlebox
\newtheoremstyle{mystyle}
- {3pt}
- {3pt}
+ {6pt}
+ {6pt}
{\itshape}
- {}
+ {10pt}
{\scshape}
{.}
{.5em}
{}
\theoremstyle{mystyle}
+ \renewenvironment{proofsketch}{\begin{axp@oldproof}[sketch]}{\end{axp@oldproof}}
\fi
+ \@ifclassloaded{llncs}{
+ \renewenvironment{proofsketch}{\begin{axp@oldproof}[sketch]}{\end{axp@oldproof}}
+ }{}
% \end{macrocode}
% \subsection{Inline Compilation Mode}
% \begin{macrocode}
@@ -938,16 +1014,22 @@ 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 (on a new page, set
-% in single-column mode) within a |bibunit| environment so as to typeset
-% a separate bibliography for the appendix. There is an extra test to
+% 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|
+% option is set to |common|). There is an extra test to
% ensure an empty bibliography environment is not produced.
% \begin{macrocode}
\AtEndDocument{
- \clearpage\onecolumn\appendix
+ \appendixprelim
+ \appendix
+ \ifthenelse{\equal{\axp@bibliography}{separate}}{
\begin{bibunit}[\appendixbibliographystyle]
+ }{}
\immediate\closeout\axp@proofsfile
\input{\jobname.axp}
+ \ifthenelse{\equal{\axp@bibliography}{separate}}{
\renewcommand{\refname}{\appendixrefname}
\let\axp@oldthebibliography\thebibliography
\renewcommand\thebibliography[1]{%
@@ -955,6 +1037,7 @@ This is a citation in the appendix~\cite{proofsAreHard}.
\appendixbibliographyprelim
\putbib
\end{bibunit}
+ }{}
}
% \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 f2a8f1d8507..77e0ce981bb 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 by Pierre Senellart
+%% Copyright (C) 2016-2017 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 by Pierre Senellart
+Copyright (C) 2016-2017 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 a558fc4f623..9ca76fd8d19 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 by Pierre Senellart
+%% Copyright (C) 2016-2017 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,7 +27,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{apxproof}
- [2017/02/06 v1.0.3 Automatic proofs in appendix]
+ [2017/03/17 v1.0.4 Automatic proofs in appendix]
\RequirePackage{bibunits}
\RequirePackage{environ}
\RequirePackage{etoolbox}
@@ -36,16 +36,23 @@
\RequirePackage{kvoptions}
\@ifpackageloaded{amsthm}{
}{
+ \let\apx@oldamsthmproof\proof
+ \let\apx@oldamsthmendproof\endproof
\let\proof\undefined
\let\endproof\undefined
}
\RequirePackage{amsthm}
+\ifdefined\apx@oldamsthmproof
+ \let\proof\apx@oldamsthmproof
+ \let\endproof\apx@oldamsthmendproof
+\fi
\makeatletter
\SetupKeyvalOptions{
family=axp,
prefix=axp@
}
\DeclareStringOption[append]{appendix}
+\DeclareStringOption[separate]{bibliography}
\ProcessLocalKeyvalOptions*
\ifthenelse{\equal{\axp@appendix}{append}}{
\message{apxproof: Appendix material appended to the document}
@@ -57,12 +64,18 @@
\errmessage{Error: unsupported option appendix=\axp@appendix for
package apxproof}
}}}
+\ifthenelse{\equal{\axp@bibliography}{separate}}{
+ \message{apxproof: Separate bibliography for appendix material}
+}{\ifthenelse{\equal{\axp@bibliography}{common}}{
+ \message{apxproof: Common bibliography for appendix and main text}
+}{
+ \errmessage{Error: unsupported option bibliography=\axp@bibliography for
+ package apxproof}
+}}
\newcommand\newtheoremrep[1]{%
\@oparg{\axp@newtheoremrep{#1}}[]%
}
-\newenvironment{proofsketch}
- {\vskip3pt\noindent\textit{Proof sketch.} \upshape\ignorespaces}
- {\hfill\qed\vskip3pt}
+ \newenvironment{proofsketch}{\begin{axp@oldproof}[Proof sketch]}{\end{axp@oldproof}}
\AtBeginDocument{%
\def\thmhead#1#2#3{%
\thmname{#1}\thmnumber{\@ifnotempty{#1}{ }\@upn{#2}}%
@@ -71,19 +84,24 @@
\newcommand{\appendixrefname}{References for the Appendix}
\newcommand{\appendixbibliographystyle}{alpha}
\newcommand{\appendixbibliographyprelim}{}
+\newcommand{\appendixprelim}{\clearpage\onecolumn}
\newcommand{\appendixsectionformat}[2]{Proofs for Section~#1 (#2)}
\ifdefined\@acmtitlebox
\newtheoremstyle{mystyle}
- {3pt}
- {3pt}
+ {6pt}
+ {6pt}
{\itshape}
- {}
+ {10pt}
{\scshape}
{.}
{.5em}
{}
\theoremstyle{mystyle}
+ \renewenvironment{proofsketch}{\begin{axp@oldproof}[sketch]}{\end{axp@oldproof}}
\fi
+ \@ifclassloaded{llncs}{
+ \renewenvironment{proofsketch}{\begin{axp@oldproof}[sketch]}{\end{axp@oldproof}}
+ }{}
\ifthenelse{\equal{\axp@appendix}{inline}}{
\def\axp@newtheoremrep#1[#2]#3{%
\expandafter\let\csname #1\endcsname\undefined
@@ -241,10 +259,14 @@
\axp@oldbibliography{#1}%
}
\AtEndDocument{
- \clearpage\onecolumn\appendix
+ \appendixprelim
+ \appendix
+ \ifthenelse{\equal{\axp@bibliography}{separate}}{
\begin{bibunit}[\appendixbibliographystyle]
+ }{}
\immediate\closeout\axp@proofsfile
\input{\jobname.axp}
+ \ifthenelse{\equal{\axp@bibliography}{separate}}{
\renewcommand{\refname}{\appendixrefname}
\let\axp@oldthebibliography\thebibliography
\renewcommand\thebibliography[1]{%
@@ -252,6 +274,7 @@
\appendixbibliographyprelim
\putbib
\end{bibunit}
+ }{}
}
}{}
\def\@getcl@ss#1.cls#2\relax{\def\@currentclass{#1}}