In my thesis, I have a problem when I want to refer to equations. Reference is basically happening based on section or subsections numbering in three digits (e.g. 1-1-1). Also, if I have more than one equation in the same subsection, all are shown by the same number! (1.1.2 in the following example!)! The number beside each equation is correctly shown, however, as (1-1) or (1-2) or ... . I want the equation number in the text be shown sequentially as 1-1, 1-2, 1-3, 1-4, ... .
Please help me solve this problem. Thanks
Here is my minimal working example:
\documentclass[11pt,oneside,english,singlespacing,parskip,headsepline]{MastersDoctoralThesis}
\usepackage{mathtools}
\makeatletter
\newcommand{\mathleft}{\@fleqntrue\@mathmargin0pt}
\newcommand{\mathcenter}{\@fleqnfalse}
\makeatother
\begin{document}
\chapter{Chapter 1}
\section{Section1}
\subsection{Subsection 1-1}
\mathleft
\begin{equation}
\label{eq:KE_Energy}
\begin{aligned}
& \langle KE \rangle = \frac{1}{2} \langle mv^{2} \rangle \\
\end{aligned}
\end{equation}
Equation \ref{eq:KE_Energy} is kinetic energy.
\subsection{Subsection 1-2}
\mathleft
\begin{equation}
\label{eq:KE_Energy2}
\begin{aligned}
& \langle KE \rangle = \frac{1}{2} \langle mv^{2} \rangle \\
\end{aligned}
\end{equation}
Equation \ref{eq:KE_Energy2} is kinetic energy.
\mathleft
\begin{equation}
\label{eq:KE_Energy3}
\begin{aligned}
& \langle KE \rangle = \frac{1}{2} \langle mv^{2} \rangle \\
\end{aligned}
\end{equation}
Equation \ref{eq:KE_Energy3} is kinetic energy.
\section{Section2}
\subsection{Subsection 2-1}
\mathleft
\begin{equation}
\label{eq:KE_Energy4}
\begin{aligned}
& \langle KE \rangle = \frac{1}{2} \langle mv^{2} \rangle \\
\end{aligned}
\end{equation}
Equation \ref{eq:KE_Energy4} is kinetic energy.
\end{document}
An here is the output:


alignedenvironment. If you include a complete minimal working example we can tell you how to fix your configuration. – Nov 30 '18 at 12:58\mathleftand\mathcentercommands breakamsmath, where did you find those definitions? – David Carlisle Nov 30 '18 at 13:16bookdocument class instead of your custom class file, and I was unable to replicate your problem. When I compiled with thebookclass, the\refand\labelnumbering for the equations matched. – Mason Malone Dec 02 '18 at 23:34\mathleft– David Carlisle Dec 02 '18 at 23:56