texlive[43527] Master/texmf-dist: apxproof (17may17)

commits+karl at tug.org commits+karl at tug.org
Fri Mar 17 22:35:40 CET 2017


Revision: 43527
          http://tug.org/svn/texlive?view=revision&revision=43527
Author:   karl
Date:     2017-03-17 22:35:40 +0100 (Fri, 17 Mar 2017)
Log Message:
-----------
apxproof (17may17)

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/source/latex/apxproof/apxproof.ins
    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	2017-03-17 21:35:26 UTC (rev 43526)
+++ trunk/Master/texmf-dist/doc/latex/apxproof/README.md	2017-03-17 21:35:40 UTC (rev 43527)
@@ -34,7 +34,7 @@
 
 ## 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

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	2017-03-17 21:35:26 UTC (rev 43526)
+++ trunk/Master/texmf-dist/source/latex/apxproof/apxproof.dtx	2017-03-17 21:35:40 UTC (rev 43527)
@@ -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 @@
 % \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 @@
 % 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 @@
 % \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 @@
 % 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 @@
 % 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 at oldamsthmproof\proof
+    \let\apx at oldamsthmendproof\endproof
     \let\proof\undefined
     \let\endproof\undefined
   }
 \RequirePackage{amsthm}
+\ifdefined\apx at oldamsthmproof
+  \let\proof\apx at oldamsthmproof
+  \let\endproof\apx at oldamsthmendproof
+\fi
 %    \end{macrocode}
 % \end{itemize}
 % \subsection{Option Processing}
@@ -480,20 +523,36 @@
 %    \begin{macrocode}
 \makeatletter
 %    \end{macrocode}
-% \begin{macro}{\axp at 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 at appendix}
+%    \begin{macrocode}
 \DeclareStringOption[append]{appendix}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\axp at 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}
-% \end{macro}
-% We check that the value of the |appendix| option is valid, and add a
+% 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 at appendix}{append}}{
@@ -506,6 +565,14 @@
   \errmessage{Error: unsupported option appendix=\axp at appendix for
   package apxproof}
 }}}
+\ifthenelse{\equal{\axp at bibliography}{separate}}{
+  \message{apxproof: Separate bibliography for appendix material}
+}{\ifthenelse{\equal{\axp at bibliography}{common}}{
+  \message{apxproof: Common bibliography for appendix and main text}
+}{
+  \errmessage{Error: unsupported option bibliography=\axp at bibliography for
+  package apxproof}
+}}
 %    \end{macrocode}
 % \subsection{Macros Common to All Compilation Modes}
 % \begin{macro}{\newtheoremrep}
@@ -524,9 +591,7 @@
 % 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 at oldproof}[Proof sketch]}{\end{axp at oldproof}}
 %    \end{macrocode}
 % \end{environment}  
 % \begin{macro}{\thmhead}  
@@ -546,8 +611,10 @@
 % \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}
@@ -554,6 +621,7 @@
 \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}
@@ -560,23 +628,31 @@
 % \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 at oldproof}[sketch]}{\end{axp at oldproof}}
 \fi
+  \@ifclassloaded{llncs}{
+    \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
+  }{}
 %    \end{macrocode}
 % \subsection{Inline Compilation Mode}
 %    \begin{macrocode}
@@ -938,16 +1014,22 @@
 %    \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 at bibliography}{separate}}{
       \begin{bibunit}[\appendixbibliographystyle]
+      }{}
         \immediate\closeout\axp at proofsfile
         \input{\jobname.axp}
+      \ifthenelse{\equal{\axp at bibliography}{separate}}{
         \renewcommand{\refname}{\appendixrefname}
         \let\axp at oldthebibliography\thebibliography
         \renewcommand\thebibliography[1]{%
@@ -955,6 +1037,7 @@
         \appendixbibliographyprelim
         \putbib
       \end{bibunit}
+      }{}
     }
 %    \end{macrocode}  
 %    \begin{macrocode}  

Modified: trunk/Master/texmf-dist/source/latex/apxproof/apxproof.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/apxproof/apxproof.ins	2017-03-17 21:35:26 UTC (rev 43526)
+++ trunk/Master/texmf-dist/source/latex/apxproof/apxproof.ins	2017-03-17 21:35:40 UTC (rev 43527)
@@ -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

Modified: trunk/Master/texmf-dist/tex/latex/apxproof/apxproof.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/apxproof/apxproof.sty	2017-03-17 21:35:26 UTC (rev 43526)
+++ trunk/Master/texmf-dist/tex/latex/apxproof/apxproof.sty	2017-03-17 21:35:40 UTC (rev 43527)
@@ -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,10 +36,16 @@
 \RequirePackage{kvoptions}
 \@ifpackageloaded{amsthm}{
   }{
+    \let\apx at oldamsthmproof\proof
+    \let\apx at oldamsthmendproof\endproof
     \let\proof\undefined
     \let\endproof\undefined
   }
 \RequirePackage{amsthm}
+\ifdefined\apx at oldamsthmproof
+  \let\proof\apx at oldamsthmproof
+  \let\endproof\apx at oldamsthmendproof
+\fi
 \makeatletter
 \SetupKeyvalOptions{
   family=axp,
@@ -46,6 +52,7 @@
   prefix=axp@
 }
 \DeclareStringOption[append]{appendix}
+\DeclareStringOption[separate]{bibliography}
 \ProcessLocalKeyvalOptions*
 \ifthenelse{\equal{\axp at appendix}{append}}{
   \message{apxproof: Appendix material appended to the document}
@@ -57,12 +64,18 @@
   \errmessage{Error: unsupported option appendix=\axp at appendix for
   package apxproof}
 }}}
+\ifthenelse{\equal{\axp at bibliography}{separate}}{
+  \message{apxproof: Separate bibliography for appendix material}
+}{\ifthenelse{\equal{\axp at bibliography}{common}}{
+  \message{apxproof: Common bibliography for appendix and main text}
+}{
+  \errmessage{Error: unsupported option bibliography=\axp at bibliography for
+  package apxproof}
+}}
 \newcommand\newtheoremrep[1]{%
   \@oparg{\axp at newtheoremrep{#1}}[]%
 }
-\newenvironment{proofsketch}
-  {\vskip3pt\noindent\textit{Proof sketch.} \upshape\ignorespaces}
-  {\hfill\qed\vskip3pt}
+  \newenvironment{proofsketch}{\begin{axp at oldproof}[Proof sketch]}{\end{axp at 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 at oldproof}[sketch]}{\end{axp at oldproof}}
 \fi
+  \@ifclassloaded{llncs}{
+    \renewenvironment{proofsketch}{\begin{axp at oldproof}[sketch]}{\end{axp at oldproof}}
+  }{}
 \ifthenelse{\equal{\axp at appendix}{inline}}{
   \def\axp at newtheoremrep#1[#2]#3{%
     \expandafter\let\csname #1\endcsname\undefined
@@ -241,10 +259,14 @@
       \axp at oldbibliography{#1}%
     }
     \AtEndDocument{
-      \clearpage\onecolumn\appendix
+      \appendixprelim
+      \appendix
+      \ifthenelse{\equal{\axp at bibliography}{separate}}{
       \begin{bibunit}[\appendixbibliographystyle]
+      }{}
         \immediate\closeout\axp at proofsfile
         \input{\jobname.axp}
+      \ifthenelse{\equal{\axp at bibliography}{separate}}{
         \renewcommand{\refname}{\appendixrefname}
         \let\axp at oldthebibliography\thebibliography
         \renewcommand\thebibliography[1]{%
@@ -252,6 +274,7 @@
         \appendixbibliographyprelim
         \putbib
       \end{bibunit}
+      }{}
     }
   }{}
   \def\@getcl at ss#1.cls#2\relax{\def\@currentclass{#1}}



More information about the tex-live-commits mailing list