Equation numbering does not continue correctly in Latex











up vote
1
down vote

favorite












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:



enter image description here



enter image description here










share|improve this question




















  • 3




    Please provide a MWE that can be used by others to replicate your problem.
    – Raven
    Nov 30 at 12:51






  • 2




    The equation numbering in LaTeX is always correct. It's your configuration that is incorrect. In this example you do not need the aligned environment. If you include a complete minimal working example we can tell you how to fix your configuration.
    – Andrew
    Nov 30 at 12:58








  • 2




    I would expect that your mathleft and mathcenter commands break amsmath, where did you find those definitions?
    – David Carlisle
    Nov 30 at 13:16










  • @mah65, I believe the problem might be with your .cls file. I compiled your MWE exactly as you gave it except I used the book document class instead of your custom class file, and I was unable to replicate your problem. When I compiled with the book class, the ref and label numbering for the equations matched.
    – Mason Malone
    Dec 2 at 23:34












  • @MasonMalone: Thanks for your help. That is correct, although the hyperlink to equation is ruined. Anyways, I have to use thesis style, and should solve the problem in this environment. I don't know what modification I should apply in the .cls file.
    – mah65
    Dec 2 at 23:51















up vote
1
down vote

favorite












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:



enter image description here



enter image description here










share|improve this question




















  • 3




    Please provide a MWE that can be used by others to replicate your problem.
    – Raven
    Nov 30 at 12:51






  • 2




    The equation numbering in LaTeX is always correct. It's your configuration that is incorrect. In this example you do not need the aligned environment. If you include a complete minimal working example we can tell you how to fix your configuration.
    – Andrew
    Nov 30 at 12:58








  • 2




    I would expect that your mathleft and mathcenter commands break amsmath, where did you find those definitions?
    – David Carlisle
    Nov 30 at 13:16










  • @mah65, I believe the problem might be with your .cls file. I compiled your MWE exactly as you gave it except I used the book document class instead of your custom class file, and I was unable to replicate your problem. When I compiled with the book class, the ref and label numbering for the equations matched.
    – Mason Malone
    Dec 2 at 23:34












  • @MasonMalone: Thanks for your help. That is correct, although the hyperlink to equation is ruined. Anyways, I have to use thesis style, and should solve the problem in this environment. I don't know what modification I should apply in the .cls file.
    – mah65
    Dec 2 at 23:51













up vote
1
down vote

favorite









up vote
1
down vote

favorite











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:



enter image description here



enter image description here










share|improve this question















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:



enter image description here



enter image description here







math-mode equations numbering






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 3 at 0:02









David Carlisle

479k3811121847




479k3811121847










asked Nov 30 at 12:41









mah65

63




63








  • 3




    Please provide a MWE that can be used by others to replicate your problem.
    – Raven
    Nov 30 at 12:51






  • 2




    The equation numbering in LaTeX is always correct. It's your configuration that is incorrect. In this example you do not need the aligned environment. If you include a complete minimal working example we can tell you how to fix your configuration.
    – Andrew
    Nov 30 at 12:58








  • 2




    I would expect that your mathleft and mathcenter commands break amsmath, where did you find those definitions?
    – David Carlisle
    Nov 30 at 13:16










  • @mah65, I believe the problem might be with your .cls file. I compiled your MWE exactly as you gave it except I used the book document class instead of your custom class file, and I was unable to replicate your problem. When I compiled with the book class, the ref and label numbering for the equations matched.
    – Mason Malone
    Dec 2 at 23:34












  • @MasonMalone: Thanks for your help. That is correct, although the hyperlink to equation is ruined. Anyways, I have to use thesis style, and should solve the problem in this environment. I don't know what modification I should apply in the .cls file.
    – mah65
    Dec 2 at 23:51














  • 3




    Please provide a MWE that can be used by others to replicate your problem.
    – Raven
    Nov 30 at 12:51






  • 2




    The equation numbering in LaTeX is always correct. It's your configuration that is incorrect. In this example you do not need the aligned environment. If you include a complete minimal working example we can tell you how to fix your configuration.
    – Andrew
    Nov 30 at 12:58








  • 2




    I would expect that your mathleft and mathcenter commands break amsmath, where did you find those definitions?
    – David Carlisle
    Nov 30 at 13:16










  • @mah65, I believe the problem might be with your .cls file. I compiled your MWE exactly as you gave it except I used the book document class instead of your custom class file, and I was unable to replicate your problem. When I compiled with the book class, the ref and label numbering for the equations matched.
    – Mason Malone
    Dec 2 at 23:34












  • @MasonMalone: Thanks for your help. That is correct, although the hyperlink to equation is ruined. Anyways, I have to use thesis style, and should solve the problem in this environment. I don't know what modification I should apply in the .cls file.
    – mah65
    Dec 2 at 23:51








3




3




Please provide a MWE that can be used by others to replicate your problem.
– Raven
Nov 30 at 12:51




Please provide a MWE that can be used by others to replicate your problem.
– Raven
Nov 30 at 12:51




2




2




The equation numbering in LaTeX is always correct. It's your configuration that is incorrect. In this example you do not need the aligned environment. If you include a complete minimal working example we can tell you how to fix your configuration.
– Andrew
Nov 30 at 12:58






The equation numbering in LaTeX is always correct. It's your configuration that is incorrect. In this example you do not need the aligned environment. If you include a complete minimal working example we can tell you how to fix your configuration.
– Andrew
Nov 30 at 12:58






2




2




I would expect that your mathleft and mathcenter commands break amsmath, where did you find those definitions?
– David Carlisle
Nov 30 at 13:16




I would expect that your mathleft and mathcenter commands break amsmath, where did you find those definitions?
– David Carlisle
Nov 30 at 13:16












@mah65, I believe the problem might be with your .cls file. I compiled your MWE exactly as you gave it except I used the book document class instead of your custom class file, and I was unable to replicate your problem. When I compiled with the book class, the ref and label numbering for the equations matched.
– Mason Malone
Dec 2 at 23:34






@mah65, I believe the problem might be with your .cls file. I compiled your MWE exactly as you gave it except I used the book document class instead of your custom class file, and I was unable to replicate your problem. When I compiled with the book class, the ref and label numbering for the equations matched.
– Mason Malone
Dec 2 at 23:34














@MasonMalone: Thanks for your help. That is correct, although the hyperlink to equation is ruined. Anyways, I have to use thesis style, and should solve the problem in this environment. I don't know what modification I should apply in the .cls file.
– mah65
Dec 2 at 23:51




@MasonMalone: Thanks for your help. That is correct, although the hyperlink to equation is ruined. Anyways, I have to use thesis style, and should solve the problem in this environment. I don't know what modification I should apply in the .cls file.
– mah65
Dec 2 at 23:51










2 Answers
2






active

oldest

votes

















up vote
0
down vote













The mathleft and mathcenter commands defined in the preamble break amsmath removing all use of them restores the correct numbering.



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}





share|improve this answer





















  • This seems to work. But this brings all the equations to the middle (centring). How to keep them in the left side?
    – mah65
    Dec 3 at 0:05










  • @mah65 use the documented fleqn option to the documentclass or to amsmath or mathtools package
    – David Carlisle
    Dec 3 at 0:06










  • @mah65 did you write this mathleft command or was it suggested in some tutorial somewhere?
    – David Carlisle
    Dec 3 at 0:07










  • I think I found it somewhere in this forum when I wanted to align left the equations. I don't exactly remember.
    – mah65
    Dec 3 at 0:08










  • @mah65 well it's completely wrong, so if you recall where it came from try to ping the author to get it changed:-)
    – David Carlisle
    Dec 3 at 0:09


















up vote
0
down vote



accepted










Following the previous answer, I modified the packages as following:



usepackage[fleqn]{mathtools}
makeatletter
newcommand{mathleft}{@fleqntrue@mathmargin0pt}
newcommand{mathcenter}{@fleqnfalse}
makeatother
setlength{mathindent}{0cm}


(Changes are the first and last lines).
This solved the problem, and no other modification is necessary.






share|improve this answer








New contributor




mah65 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462556%2fequation-numbering-does-not-continue-correctly-in-latex%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    The mathleft and mathcenter commands defined in the preamble break amsmath removing all use of them restores the correct numbering.



    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}





    share|improve this answer





















    • This seems to work. But this brings all the equations to the middle (centring). How to keep them in the left side?
      – mah65
      Dec 3 at 0:05










    • @mah65 use the documented fleqn option to the documentclass or to amsmath or mathtools package
      – David Carlisle
      Dec 3 at 0:06










    • @mah65 did you write this mathleft command or was it suggested in some tutorial somewhere?
      – David Carlisle
      Dec 3 at 0:07










    • I think I found it somewhere in this forum when I wanted to align left the equations. I don't exactly remember.
      – mah65
      Dec 3 at 0:08










    • @mah65 well it's completely wrong, so if you recall where it came from try to ping the author to get it changed:-)
      – David Carlisle
      Dec 3 at 0:09















    up vote
    0
    down vote













    The mathleft and mathcenter commands defined in the preamble break amsmath removing all use of them restores the correct numbering.



    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}





    share|improve this answer





















    • This seems to work. But this brings all the equations to the middle (centring). How to keep them in the left side?
      – mah65
      Dec 3 at 0:05










    • @mah65 use the documented fleqn option to the documentclass or to amsmath or mathtools package
      – David Carlisle
      Dec 3 at 0:06










    • @mah65 did you write this mathleft command or was it suggested in some tutorial somewhere?
      – David Carlisle
      Dec 3 at 0:07










    • I think I found it somewhere in this forum when I wanted to align left the equations. I don't exactly remember.
      – mah65
      Dec 3 at 0:08










    • @mah65 well it's completely wrong, so if you recall where it came from try to ping the author to get it changed:-)
      – David Carlisle
      Dec 3 at 0:09













    up vote
    0
    down vote










    up vote
    0
    down vote









    The mathleft and mathcenter commands defined in the preamble break amsmath removing all use of them restores the correct numbering.



    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}





    share|improve this answer












    The mathleft and mathcenter commands defined in the preamble break amsmath removing all use of them restores the correct numbering.



    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}






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Dec 3 at 0:01









    David Carlisle

    479k3811121847




    479k3811121847












    • This seems to work. But this brings all the equations to the middle (centring). How to keep them in the left side?
      – mah65
      Dec 3 at 0:05










    • @mah65 use the documented fleqn option to the documentclass or to amsmath or mathtools package
      – David Carlisle
      Dec 3 at 0:06










    • @mah65 did you write this mathleft command or was it suggested in some tutorial somewhere?
      – David Carlisle
      Dec 3 at 0:07










    • I think I found it somewhere in this forum when I wanted to align left the equations. I don't exactly remember.
      – mah65
      Dec 3 at 0:08










    • @mah65 well it's completely wrong, so if you recall where it came from try to ping the author to get it changed:-)
      – David Carlisle
      Dec 3 at 0:09


















    • This seems to work. But this brings all the equations to the middle (centring). How to keep them in the left side?
      – mah65
      Dec 3 at 0:05










    • @mah65 use the documented fleqn option to the documentclass or to amsmath or mathtools package
      – David Carlisle
      Dec 3 at 0:06










    • @mah65 did you write this mathleft command or was it suggested in some tutorial somewhere?
      – David Carlisle
      Dec 3 at 0:07










    • I think I found it somewhere in this forum when I wanted to align left the equations. I don't exactly remember.
      – mah65
      Dec 3 at 0:08










    • @mah65 well it's completely wrong, so if you recall where it came from try to ping the author to get it changed:-)
      – David Carlisle
      Dec 3 at 0:09
















    This seems to work. But this brings all the equations to the middle (centring). How to keep them in the left side?
    – mah65
    Dec 3 at 0:05




    This seems to work. But this brings all the equations to the middle (centring). How to keep them in the left side?
    – mah65
    Dec 3 at 0:05












    @mah65 use the documented fleqn option to the documentclass or to amsmath or mathtools package
    – David Carlisle
    Dec 3 at 0:06




    @mah65 use the documented fleqn option to the documentclass or to amsmath or mathtools package
    – David Carlisle
    Dec 3 at 0:06












    @mah65 did you write this mathleft command or was it suggested in some tutorial somewhere?
    – David Carlisle
    Dec 3 at 0:07




    @mah65 did you write this mathleft command or was it suggested in some tutorial somewhere?
    – David Carlisle
    Dec 3 at 0:07












    I think I found it somewhere in this forum when I wanted to align left the equations. I don't exactly remember.
    – mah65
    Dec 3 at 0:08




    I think I found it somewhere in this forum when I wanted to align left the equations. I don't exactly remember.
    – mah65
    Dec 3 at 0:08












    @mah65 well it's completely wrong, so if you recall where it came from try to ping the author to get it changed:-)
    – David Carlisle
    Dec 3 at 0:09




    @mah65 well it's completely wrong, so if you recall where it came from try to ping the author to get it changed:-)
    – David Carlisle
    Dec 3 at 0:09










    up vote
    0
    down vote



    accepted










    Following the previous answer, I modified the packages as following:



    usepackage[fleqn]{mathtools}
    makeatletter
    newcommand{mathleft}{@fleqntrue@mathmargin0pt}
    newcommand{mathcenter}{@fleqnfalse}
    makeatother
    setlength{mathindent}{0cm}


    (Changes are the first and last lines).
    This solved the problem, and no other modification is necessary.






    share|improve this answer








    New contributor




    mah65 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      0
      down vote



      accepted










      Following the previous answer, I modified the packages as following:



      usepackage[fleqn]{mathtools}
      makeatletter
      newcommand{mathleft}{@fleqntrue@mathmargin0pt}
      newcommand{mathcenter}{@fleqnfalse}
      makeatother
      setlength{mathindent}{0cm}


      (Changes are the first and last lines).
      This solved the problem, and no other modification is necessary.






      share|improve this answer








      New contributor




      mah65 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        Following the previous answer, I modified the packages as following:



        usepackage[fleqn]{mathtools}
        makeatletter
        newcommand{mathleft}{@fleqntrue@mathmargin0pt}
        newcommand{mathcenter}{@fleqnfalse}
        makeatother
        setlength{mathindent}{0cm}


        (Changes are the first and last lines).
        This solved the problem, and no other modification is necessary.






        share|improve this answer








        New contributor




        mah65 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        Following the previous answer, I modified the packages as following:



        usepackage[fleqn]{mathtools}
        makeatletter
        newcommand{mathleft}{@fleqntrue@mathmargin0pt}
        newcommand{mathcenter}{@fleqnfalse}
        makeatother
        setlength{mathindent}{0cm}


        (Changes are the first and last lines).
        This solved the problem, and no other modification is necessary.







        share|improve this answer








        New contributor




        mah65 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        mah65 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered Dec 3 at 0:56









        mah65

        63




        63




        New contributor




        mah65 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        mah65 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        mah65 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462556%2fequation-numbering-does-not-continue-correctly-in-latex%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents