I'm using the following code to write an article, but I'm having some problems cross-referencing the equations with hyperref
.
The \eqref{}
code returns the right equation's number. But the hyperlinks of the first and second \eqref{}
point to equations (1) and (2), and not to correct equations (3a) and (3b), inside the \begin{subequations}
ambient. Last \eqref{}
instead works correctly. What is wrong with this code?
Thank you for the help.
\documentclass[a4paper,10pt]{article}
\usepackage[a-1b]{pdfx}
\hypersetup{hidelinks}
\usepackage{type1ec}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\begin{document}
\begin{equation}
A=B
\end{equation}
\begin{equation}
B=C
\end{equation}
\begin{subequations}
\begin{equation}
C=D
\label{eq:1}
\end{equation}
\begin{equation}
D=E
\label{eq:2}
\end{equation}
\end{subequations}
\begin{equation}
E=F
\label{eq:3}
\end{equation}
\eqref{eq:1} \eqref{eq:2} \eqref{eq:3}
\end{document}
pdfx
, but it presumably takes the place ofhyperref
. it is, with very few exceptions, necessary forhyperref
to be called last. you havepdfx
first.pdfx
does not work on my system, removing it, andinghyperref
and placinghyperref
+\hypersetup
last, then I see no problems with the hyperlink targets.pdfx
and\hypersetup
last works perfectly, thank you very much!