I am using this answer to create a proposition with custom numbering. This allows me to manually enter the proposition name/number. As it happens, my purpose in doing this is to create a "version b" of a proposition with standard numbering:
\usepackage{amsthm}
\usepackage{hyperref}
...
\newtheorem{innercustomthm}{Proposition}
\newenvironment{customthm}[1]
{\renewcommand\theinnercustomthm{#1}\innercustomthm}
{\endinnercustomthm}
\begin{document}
\begin{proposition}\label{prop:onlyifdirection}
First version of the proposition.
\end{proposition}
\begin{customthm}{\ref{prop:onlyifdirection}b}\label{prop:onlyifconstructive}
Second version of the proposition.\qed
\end{customthm}
\end{document}
It looks great. The original proposition comes out as 4.2 and the second version as 4.2b. My question is about how it interacts with the hyperref package. Right now, when I refer to the second version of the proposition with a
\ref{prop:onlyifconstructive}
if I click on the "b" it links to the second version but if I click on the "4.2" it passes through and links to the first version. I would like to accomplish the same visual / printed results but in such a way that whenever I call the
\ref{prop:onlyifconstructive}
the hyperref link is only to the second version of the proposition.
Now, I can certainly accomplish this by hardcoding the "4.2" rather than putting \ref{prop:onlyifdirection} in the label of the second version. But ideally there would be a way to do this that wouldn't have to be manually changed if the numbering changes.
How is this done?
