I am experiencing broken hyperlinks with memoir
+ caption
+ hyperref
and the sidecaption
environment in documents compiled with pdflatex
. A MWE replicating my issue is below:
\documentclass{memoir}
\usepackage{caption}
\usepackage{hyperref}
\begin{document}
% create empty page for demonstration
\mbox{}
\clearpage
\begin{figure}
\begin{sidecaption}{test}[test]
test
\end{sidecaption}
\end{figure}
\ref{test} % link broken, links to first page
\end{document}
Compiling with pdflatex
yields the warning
pdfTeX warning (dest): name{figure.0.1} has been referenced but does not exist, replaced by a fixed one
and the hyperlink to the sidecaption
ed figure is broken unless either (1) the caption
package is not loaded or (2) a different engine such as xelatex
is used.
I experience this behavior with other sidecaption
ed floats as well. In a large, complex document (https://bayesoptbook.com/), hyperrefs are all working fine except those pointing to sidecaption
ed floats – similar warnings on compilation, and similar broken hyperlinks linking to the top of the document.
figure.caption.1
but the label doesn't store this. Probably this issue means that the author of caption is aware that there is a problem gitlab.com/axelsommerfeldt/caption/-/issues/112\captionsetup{hypcap=false}
it works, but you naturally loose the hypcap function.sidecaption
environment; hyperlinks to floats withoutsidecaption
work fine withmemoir
+caption
+pdflatex
. This makes me hopeful that there may be a fix.sidecaption
environment (where the problems appear to be localized) is implemented in thememoir
class. I don't see how the author ofcaption
could address the behavior ofsidecaption
. Perhaps I misunderstand the core issue.