summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/apxproof
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/tex/latex/apxproof
parenta7a94decb80632ef1896eb7ff4deb321c1a5182f (diff)
apxproof (17may17)
git-svn-id: svn://tug.org/texlive/trunk@43527 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/apxproof')
-rw-r--r--Master/texmf-dist/tex/latex/apxproof/apxproof.sty41
1 files changed, 32 insertions, 9 deletions
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}}