summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/apxproof
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-05 23:14:20 +0000
committerKarl Berry <karl@freefriends.org>2017-06-05 23:14:20 +0000
commit83aa814bc3de55078e4a1b9dad1ad44fd153fcd1 (patch)
tree60753619db7724240b62906e425028e53536a1eb /Master/texmf-dist/tex/latex/apxproof
parent4988588dea2538d0703acbac265cb4cd85fcc26a (diff)
apxproof (31may17)
git-svn-id: svn://tug.org/texlive/trunk@44478 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/apxproof')
-rw-r--r--Master/texmf-dist/tex/latex/apxproof/apxproof.sty27
1 files changed, 19 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/apxproof/apxproof.sty b/Master/texmf-dist/tex/latex/apxproof/apxproof.sty
index 9ca76fd8d19..ef8e571af9d 100644
--- a/Master/texmf-dist/tex/latex/apxproof/apxproof.sty
+++ b/Master/texmf-dist/tex/latex/apxproof/apxproof.sty
@@ -27,7 +27,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{apxproof}
- [2017/03/17 v1.0.4 Automatic proofs in appendix]
+ [2017/05/31 v1.0.5 Automatic proofs in appendix]
\RequirePackage{bibunits}
\RequirePackage{environ}
\RequirePackage{etoolbox}
@@ -73,7 +73,10 @@
package apxproof}
}}
\newcommand\newtheoremrep[1]{%
- \@oparg{\axp@newtheoremrep{#1}}[]%
+ \@oparg{\axp@newtheoremreptmp{#1}}[]%
+}
+\def\axp@newtheoremreptmp#1[#2]#3{%
+ \@oparg{\axp@newtheoremrep{#1}[#2]{#3}}[]%
}
\newenvironment{proofsketch}{\begin{axp@oldproof}[Proof sketch]}{\end{axp@oldproof}}
\AtBeginDocument{%
@@ -102,11 +105,17 @@
\@ifclassloaded{llncs}{
\renewenvironment{proofsketch}{\begin{axp@oldproof}[sketch]}{\end{axp@oldproof}}
}{}
+ \let\axp@oldproof\proof
+ \let\endaxp@oldproof\endproof
\ifthenelse{\equal{\axp@appendix}{inline}}{
- \def\axp@newtheoremrep#1[#2]#3{%
+ \def\axp@newtheoremrep#1[#2]#3[#4]{%
\expandafter\let\csname #1\endcsname\undefined
\expandafter\let\csname c@#1\endcsname\undefined
- \newtheorem{#1}[#2]{#3}%
+ \ifx\relax#4\relax
+ \newtheorem{#1}[#2]{#3}%
+ \else
+ \newtheorem{#1}{#3}[#4]%
+ \fi
\NewEnviron{#1rep}[1][]{%
\begin{#1}[##1]\BODY\end{#1}%
}
@@ -147,10 +156,14 @@
{\endVerbatimOut}
\newtoggle{axp@seenreptheorem}
\newcounter{axp@rpcounter}
- \def\axp@newtheoremrep#1[#2]#3{%
+ \def\axp@newtheoremrep#1[#2]#3[#4]{%
\expandafter\let\csname #1\endcsname\undefined
\expandafter\let\csname c@#1\endcsname\undefined
- \newtheorem{#1}[#2]{#3}%
+ \ifx\relax#4\relax
+ \newtheorem{#1}[#2]{#3}%
+ \else
+ \newtheorem{#1}{#3}[#4]%
+ \fi
\expandafter\pretocmd\csname #1\endcsname{\noproofinappendix}{}{}%
\newtheorem*{axp@#1rp}{#3}%
\NewEnviron{#1rep}[1][]{%
@@ -172,8 +185,6 @@
}
}
}
- \let\axp@oldproof\proof
- \let\endaxp@oldproof\endproof
\newcommand\noproofinappendix{%
\global\togglefalse{axp@seenreptheorem}%
}