diff --git a/apxproof.dtx b/apxproof.dtx index f1652a8..beb6746 100644 --- a/apxproof.dtx +++ b/apxproof.dtx @@ -45,7 +45,7 @@ % % \fi % -% \CheckSum{711} +% \CheckSum{716} % % \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 @@ -1052,6 +1052,8 @@ This is a citation in the appendix~\cite{proofsAreHard}. % in the |.aux| file, so we need to to be able to disable % addition of the hyperlink, which is why we use an % intermediate |\axp@forward@link|\marg{target}\marg{text} macro, +% We also redefine |\theHfoobar| which is used by |hyperref| but not +% defined if |hyperref| was loaded after |\newtheoremrep| was used. % and |\protect| it to output it verbatim into the |.aux| file. % % These hyperlinks are of course disabled in the |strip| compilation @@ -1062,6 +1064,7 @@ This is a citation in the appendix~\cite{proofsAreHard}. \global\booltrue{axp@forward}% \ifcsundef{axp@old@the\csname axp@cn@#1\endcsname}{% \csletcs{axp@old@the\csname axp@cn@#1\endcsname}{the\csname axp@cn@#1\endcsname}% + \csletcs{theH\csname axp@cn@#1\endcsname}{the\csname axp@cn@#1\endcsname}% \csdef{the\csname axp@cn@#1\endcsname}{% \protect\axp@forward@link{axp@fw@r\roman{axp@rpcounter}}% {\csname axp@old@the\csname axp@cn@#1\endcsname\endcsname}% diff --git a/apxproof.pdf b/apxproof.pdf index 75fbc72..51b76ae 100644 Binary files a/apxproof.pdf and b/apxproof.pdf differ diff --git a/apxproof.sty b/apxproof.sty index d6ac316..7c9a9e6 100644 --- a/apxproof.sty +++ b/apxproof.sty @@ -254,6 +254,7 @@ \global\booltrue{axp@forward}% \ifcsundef{axp@old@the\csname axp@cn@#1\endcsname}{% \csletcs{axp@old@the\csname axp@cn@#1\endcsname}{the\csname axp@cn@#1\endcsname}% + \csletcs{theH\csname axp@cn@#1\endcsname}{the\csname axp@cn@#1\endcsname}% \csdef{the\csname axp@cn@#1\endcsname}{% \protect\axp@forward@link{axp@fw@r\roman{axp@rpcounter}}% {\csname axp@old@the\csname axp@cn@#1\endcsname\endcsname}% diff --git a/examples/hyperref-after-newtheorem/test.tex b/examples/hyperref-after-newtheorem/test.tex new file mode 100644 index 0000000..31bef7a --- /dev/null +++ b/examples/hyperref-after-newtheorem/test.tex @@ -0,0 +1,13 @@ +\documentclass{article} + +\usepackage{../../apxproof} +\newtheoremrep{proposition}{Proposition} +\usepackage{hyperref} + +\begin{document} +\begin{propositionrep} + Foo. +\end{propositionrep} +\end{document} + +