diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/apxproof')
-rw-r--r-- | Master/texmf-dist/tex/latex/apxproof/apxproof.sty | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/apxproof/apxproof.sty b/Master/texmf-dist/tex/latex/apxproof/apxproof.sty index ccbfef56bdd..e78762c399f 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} - [2021/06/23 v1.2.2 Automatic proofs in appendix] + [2021/09/03 v1.2.3 Automatic proofs in appendix] \RequirePackage{environ} \RequirePackage{etoolbox} \RequirePackage{fancyvrb} @@ -54,6 +54,7 @@ \DeclareStringOption[append]{appendix} \DeclareStringOption[separate]{bibliography} \DeclareStringOption[same]{repeqn} +\DeclareStringOption[yes]{forwardlinking} \ProcessLocalKeyvalOptions* \ifthenelse{\equal{\axp@appendix}{append}}{ \message{apxproof: Appendix material appended to the document} @@ -82,6 +83,15 @@ \errmessage{Error: unsupported option repeqn=\axp@repeqn\ for package apxproof} }} +\newbool{axp@forward@suppress} +\ifthenelse{\equal{\axp@forwardlinking}{yes}}{ +}{\ifthenelse{\equal{\axp@forwardlinking}{no}}{ + \message{apxproof: Disable forward linking} + \global\booltrue{axp@forward@suppress}% +}{ + \errmessage{Error: unsupported option forwardlinking=\axp@repeqn\ for + package apxproof} +}} \def\axp@newtheoremrep@definetheorem#1#2#3#4{% \expandafter\let\csname #1\endcsname\undefined \ifcsname c@#1\endcsname @@ -255,6 +265,11 @@ \noexpand\setcounter{equation}{\theaxp@equation}% }% }{}% + \ifbool{axp@forward@suppress}{% + \global\def\axp@refstar{\ref*} + }{% + \global\def\axp@refstar{\ref} + } \immediate\write\axp@proofsfile{{% \ifdefined\theopargself \noexpand\theopargself @@ -268,7 +283,7 @@ \fi \noexpand\begin{axp@#1rp} [% - \noexpand\ref{axp@r\roman{axp@rpcounter}}% + \noexpand\axp@refstar{axp@r\roman{axp@rpcounter}}% \@ifnotempty{##1}{% \ifdefined\theopargself \else @@ -316,7 +331,7 @@ }}% \newbool{axp@forward} \newcommand{\axp@forward@link}[2]{% - \ifbool{axp@forward}{% + \ifboolexpr{ bool {axp@forward} and not bool {axp@forward@suppress} }{% \ifcsdef{hyperlink}{% \hyperlink{#1}{#2}% }{% @@ -455,8 +470,17 @@ \renewcommand{\bibname}{\appendixrefname} \fi\fi \let\axp@oldthebibliography\thebibliography - \renewcommand\thebibliography[1]{% - \ifx\relax#1\relax\else\axp@oldthebibliography{#1}\fi} + \let\endaxp@oldthebibliography\endthebibliography + \renewenvironment{thebibliography}[1]{% + \def\axp@tmp{#1}% + \ifx\axp@tmp\empty + \gdef\axp@noappendixbibliography1\relax + \else + \begin{axp@oldthebibliography}{#1}% + \fi + }{% + \ifdefined\axp@noappendixbibliography\relax\else\end{axp@oldthebibliography}% + \fi} \appendixbibliographyprelim \putbib \end{bibunit} |