1

Consider the following MWE

\documentclass[11pt,oneside]{memoir}

\usepackage{breqn}
\usepackage{hyperref}

\begin{document}
\mainmatter

\begin{dmath}\label{eq:1}
 1 + 1 = 2,
\end{dmath}
\newpage
\begin{dmath}\label{eq:2}
 1 + 1 = 2,
\end{dmath}

\newpage
\ref{eq:2}

\end{document}

where after running the document through pdflatex a couple of times we find that clicking on the reference to equation 2 actually takes us to equation 1. If the dmath blocks are replaced with regular equations everything works as expected.

  • 1
    This is not related to memoir. – Werner Jan 26 '18 at 1:39
2

This might be an incompatibility between hyperref and breqn. You can get around this by using the equation environment or by setting a verbatim \phantomsection before your dmath environment:

\documentclass{book}

\usepackage{breqn}
\usepackage{hyperref}

\begin{document}

\phantomsection
\begin{dmath}[label={eq:1}]
 1 + 1 = 2,
\end{dmath}

\newpage
\phantomsection
\begin{dmath}[label={eq:2}]
 1 + 1 = 2,
\end{dmath}

\newpage
See equation~\ref{eq:2}.

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.