I have a problem opposite to most of the questions posted regarding the equation numbering. I would like to have a global numbering for equations, regardless of the section. With or without the package chngcntr
, in the equation, it shows the global numbering, as wished.
However, when I try to refer these equation, the first one is correctly referred, but the second one includes the section number. See below for the minimal working example and the result.
Does anyone know why this is happening?
Thanks!
\documentclass[12pt,amsfonts,graphicx,subfigure,letterpaper]{article}
\usepackage{amsmath}
\usepackage{chngcntr}
\counterwithout{equation}{subsection}
\counterwithout{equation}{section} % undo numbering system provided by phstyle.cls
\begin{document}
\section{Section}
\label{sec:1}
\subsection{A}
\subsection{B}
\begin{align}
a &= b\notag\\
&= c.\label{eq:a}
\end{align}
Equation (\ref{eq:a})
\begin{align}
a &= b
\end{align}\label{eq:b}
Equation (\ref{eq:b})
\end{document}
\label
into thealign
environment and not out (that references the subsection).