以下示例说明了 nccmath/fleqn 与 hyperref 的不兼容性
\documentclass{article}
\usepackage{nccmath}
\numberwithin{equation}{section}
\setlength{\parindent}{0.0ex}
% comment out hyperref to see proper equation references
\usepackage[colorlinks=true]{hyperref}
\begin{document}
\section{First section}
Hello world
\begin{fleqn}
\begin{equation}\label{eqnA}
\qquad\text{equation A:}\quad x + 3y = 7
\end{equation}
\end{fleqn}
\vspace{5in}
Goodby world
\begin{fleqn}
\begin{equation}\label{eqnB}
\qquad\text{equation B:}\quad 5x + 2y = 3
\end{equation}
\end{fleqn}
\newpage
\section{Second section}
reference to equation B: \eqref{eqnB}\\
reference to equation A: \eqref{eqnA}
\end{document}
答案1
加载nccmath
后 hyperref
:
\documentclass{article}
\usepackage[colorlinks=true]{hyperref}
\usepackage{nccmath}
\numberwithin{equation}{section}
\begin{document}
\section{First section}
Hello world
\begin{fleqn}
\begin{equation}\label{eqnA}
\qquad\text{equation A:}\quad x + 3y = 7
\end{equation}
\end{fleqn}
\vspace{5in}
Goodby world
\begin{fleqn}
\begin{equation}\label{eqnB}
\qquad\text{equation B:}\quad 5x + 2y = 3
\end{equation}
\end{fleqn}
\newpage
\section{Second section}
reference to equation B: \eqref{eqnB}\\
reference to equation A: \eqref{eqnA}
\end{document}