Make equation number in middle with left alignment in latex












8














I need to place the following bulk of equation to left alignment with keeping the equation number in the middle, however using flalign require set option on/off by line for equation number which at last will not be in the middle.



 begin{flalign}
ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
bm{P}_{ij}),&nonumber\
ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},&
end{flalign}


On the other hand, when using aligned with equation, equation number will be in the middle but the whole bulk of equation moved to center.



begin{equation}
begin{aligned}
ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
bm{P}_{ij}),\
ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
end{aligned}
end{equation}


How can I keep the equation left aligned with equation number in the middle.










share|improve this question







New contributor




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

























    8














    I need to place the following bulk of equation to left alignment with keeping the equation number in the middle, however using flalign require set option on/off by line for equation number which at last will not be in the middle.



     begin{flalign}
    ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
    bm{P}_{ij}),&nonumber\
    ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},&
    end{flalign}


    On the other hand, when using aligned with equation, equation number will be in the middle but the whole bulk of equation moved to center.



    begin{equation}
    begin{aligned}
    ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
    bm{P}_{ij}),\
    ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
    end{aligned}
    end{equation}


    How can I keep the equation left aligned with equation number in the middle.










    share|improve this question







    New contributor




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























      8












      8








      8


      1





      I need to place the following bulk of equation to left alignment with keeping the equation number in the middle, however using flalign require set option on/off by line for equation number which at last will not be in the middle.



       begin{flalign}
      ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
      bm{P}_{ij}),&nonumber\
      ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},&
      end{flalign}


      On the other hand, when using aligned with equation, equation number will be in the middle but the whole bulk of equation moved to center.



      begin{equation}
      begin{aligned}
      ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
      bm{P}_{ij}),\
      ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
      end{aligned}
      end{equation}


      How can I keep the equation left aligned with equation number in the middle.










      share|improve this question







      New contributor




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











      I need to place the following bulk of equation to left alignment with keeping the equation number in the middle, however using flalign require set option on/off by line for equation number which at last will not be in the middle.



       begin{flalign}
      ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
      bm{P}_{ij}),&nonumber\
      ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},&
      end{flalign}


      On the other hand, when using aligned with equation, equation number will be in the middle but the whole bulk of equation moved to center.



      begin{equation}
      begin{aligned}
      ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
      bm{P}_{ij}),\
      ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
      end{aligned}
      end{equation}


      How can I keep the equation left aligned with equation number in the middle.







      equations alignment






      share|improve this question







      New contributor




      N. I. ElZayat 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 question







      New contributor




      N. I. ElZayat 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 question




      share|improve this question






      New contributor




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









      asked Dec 18 at 8:58









      N. I. ElZayat

      515




      515




      New contributor




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





      New contributor





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






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






















          4 Answers
          4






          active

          oldest

          votes


















          7














          It's not clear why a particular equation should be left aligned. If you want all equations to be left aligned, use the fleqn option.



          Anyway, here's a way with flalign.



          Function names such as “ln”, “sin”, “exp” should be typed in with a backslash: ln and so on; this will give the correct spacing, besides using upright font shape.



          documentclass{article}
          usepackage{amsmath,bm}

          usepackage[nopar]{lipsum} % for context

          begin{document}

          lipsum[4]
          begin{flalign}
          & begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} lnbm{P}_{id_i},
          end{aligned}
          &&
          end{flalign}
          lipsum[4]

          end{document}


          enter image description here






          share|improve this answer





















          • I know that setting fleqn as option in the document class make all equation left alignment, however I just want them left alignment only in the proof appendix while all equation in all the thesis are in center alignment. However, I use your suggested solution by using flalign with aligned and it worked perfectly.
            – N. I. ElZayat
            Dec 18 at 10:49





















          6














          Do note that the left-hand shift of the first set of equations is not caused by the use of flalign, per se. Instead, the shift is caused by the presence of additional & symbols.



          To shift a nested equation/aligned system to the left, all you need to do is insert the instruction



          hspace*{6cm}null  % choose offset amount suitably


          between end{aligned} and end{equation}.



          Oh, and do please write ln rather than just ln to denote the natural logarithm operator.



          enter image description here



          documentclass{article}
          usepackage{amsmath,bm}
          begin{document}
          begin{equation}
          begin{aligned}
          ell_1(bm{phi}) &= sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-bm{P}_{ij}),\
          ell_2(bm{phi}) &= sum_{i=1}^{N-N^*} lnbm{P}_{id_i},
          end{aligned}hspace*{6cm}null % choose offset amount suitably
          end{equation}
          end{document}





          share|improve this answer

















          • 1




            You won for 35 seconds :-) Excellent and congratulations on your response.
            – Sebastiano
            Dec 18 at 9:57










          • Your solution also work perfect with me
            – N. I. ElZayat
            Dec 18 at 11:16



















          5














          You can use the fleqn environment from nccmath, which makes equations in the environment start at a fixed distance of the left margin via an optional argument (default 0pt):



          documentclass{article}
          usepackage{showframe}
          renewcommand{ShowFrameLinethickness}{0.3pt}
          usepackage{amsmath, bm, nccmath}

          begin{document}

          begin{fleqn}[1em]
          begin{equation}
          begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
          bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
          end{aligned}
          end{equation}
          end{fleqn}

          end{document}


          enter image description here






          share|improve this answer



















          • 1




            Oh! yes. Actually I didn't what the O.P. had written. Thanks!
            – Bernard
            Dec 18 at 10:10



















          1














          You could, alternatively use, usepackage{empheq}. Here I have added a picture of the differents environment (see the table) that you can use:
          enter image description here



          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



          enter image description here



          documentclass{article}
          usepackage{empheq}
          usepackage{amsmath}
          usepackage{bm}
          begin{document}

          begin{empheq}{flalign}
          begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
          bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
          end{aligned}&&
          end{empheq}


          end{document}





          share|improve this answer



















          • 1




            In fact this package does not work with me. The equation still appears in center alignment.
            – N. I. ElZayat
            Dec 18 at 10:51






          • 1




            Your LaTeX distribution will probably not be updated. Try to check the date of your version.
            – Sebastiano
            Dec 18 at 10:59










          • It seems that you'r right I will check for an update.
            – N. I. ElZayat
            Dec 18 at 11:13












          • @N.I.ElZayat Don't waste your time trying to update. The equations from this answer will always be centred. You would need to specify an additional document class option to get the correct alignment as done in the other answers
            – samcarter
            Dec 18 at 12:27












          • @ samcarter I did not update I used one solution of the suggested above and it works great with me
            – N. I. ElZayat
            Dec 18 at 13:28











          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',
          autoActivateHeartbeat: false,
          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
          });


          }
          });






          N. I. ElZayat is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f466329%2fmake-equation-number-in-middle-with-left-alignment-in-latex%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          4 Answers
          4






          active

          oldest

          votes








          4 Answers
          4






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          7














          It's not clear why a particular equation should be left aligned. If you want all equations to be left aligned, use the fleqn option.



          Anyway, here's a way with flalign.



          Function names such as “ln”, “sin”, “exp” should be typed in with a backslash: ln and so on; this will give the correct spacing, besides using upright font shape.



          documentclass{article}
          usepackage{amsmath,bm}

          usepackage[nopar]{lipsum} % for context

          begin{document}

          lipsum[4]
          begin{flalign}
          & begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} lnbm{P}_{id_i},
          end{aligned}
          &&
          end{flalign}
          lipsum[4]

          end{document}


          enter image description here






          share|improve this answer





















          • I know that setting fleqn as option in the document class make all equation left alignment, however I just want them left alignment only in the proof appendix while all equation in all the thesis are in center alignment. However, I use your suggested solution by using flalign with aligned and it worked perfectly.
            – N. I. ElZayat
            Dec 18 at 10:49


















          7














          It's not clear why a particular equation should be left aligned. If you want all equations to be left aligned, use the fleqn option.



          Anyway, here's a way with flalign.



          Function names such as “ln”, “sin”, “exp” should be typed in with a backslash: ln and so on; this will give the correct spacing, besides using upright font shape.



          documentclass{article}
          usepackage{amsmath,bm}

          usepackage[nopar]{lipsum} % for context

          begin{document}

          lipsum[4]
          begin{flalign}
          & begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} lnbm{P}_{id_i},
          end{aligned}
          &&
          end{flalign}
          lipsum[4]

          end{document}


          enter image description here






          share|improve this answer





















          • I know that setting fleqn as option in the document class make all equation left alignment, however I just want them left alignment only in the proof appendix while all equation in all the thesis are in center alignment. However, I use your suggested solution by using flalign with aligned and it worked perfectly.
            – N. I. ElZayat
            Dec 18 at 10:49
















          7












          7








          7






          It's not clear why a particular equation should be left aligned. If you want all equations to be left aligned, use the fleqn option.



          Anyway, here's a way with flalign.



          Function names such as “ln”, “sin”, “exp” should be typed in with a backslash: ln and so on; this will give the correct spacing, besides using upright font shape.



          documentclass{article}
          usepackage{amsmath,bm}

          usepackage[nopar]{lipsum} % for context

          begin{document}

          lipsum[4]
          begin{flalign}
          & begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} lnbm{P}_{id_i},
          end{aligned}
          &&
          end{flalign}
          lipsum[4]

          end{document}


          enter image description here






          share|improve this answer












          It's not clear why a particular equation should be left aligned. If you want all equations to be left aligned, use the fleqn option.



          Anyway, here's a way with flalign.



          Function names such as “ln”, “sin”, “exp” should be typed in with a backslash: ln and so on; this will give the correct spacing, besides using upright font shape.



          documentclass{article}
          usepackage{amsmath,bm}

          usepackage[nopar]{lipsum} % for context

          begin{document}

          lipsum[4]
          begin{flalign}
          & begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} lnbm{P}_{id_i},
          end{aligned}
          &&
          end{flalign}
          lipsum[4]

          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 18 at 9:57









          egreg

          707k8618793160




          707k8618793160












          • I know that setting fleqn as option in the document class make all equation left alignment, however I just want them left alignment only in the proof appendix while all equation in all the thesis are in center alignment. However, I use your suggested solution by using flalign with aligned and it worked perfectly.
            – N. I. ElZayat
            Dec 18 at 10:49




















          • I know that setting fleqn as option in the document class make all equation left alignment, however I just want them left alignment only in the proof appendix while all equation in all the thesis are in center alignment. However, I use your suggested solution by using flalign with aligned and it worked perfectly.
            – N. I. ElZayat
            Dec 18 at 10:49


















          I know that setting fleqn as option in the document class make all equation left alignment, however I just want them left alignment only in the proof appendix while all equation in all the thesis are in center alignment. However, I use your suggested solution by using flalign with aligned and it worked perfectly.
          – N. I. ElZayat
          Dec 18 at 10:49






          I know that setting fleqn as option in the document class make all equation left alignment, however I just want them left alignment only in the proof appendix while all equation in all the thesis are in center alignment. However, I use your suggested solution by using flalign with aligned and it worked perfectly.
          – N. I. ElZayat
          Dec 18 at 10:49













          6














          Do note that the left-hand shift of the first set of equations is not caused by the use of flalign, per se. Instead, the shift is caused by the presence of additional & symbols.



          To shift a nested equation/aligned system to the left, all you need to do is insert the instruction



          hspace*{6cm}null  % choose offset amount suitably


          between end{aligned} and end{equation}.



          Oh, and do please write ln rather than just ln to denote the natural logarithm operator.



          enter image description here



          documentclass{article}
          usepackage{amsmath,bm}
          begin{document}
          begin{equation}
          begin{aligned}
          ell_1(bm{phi}) &= sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-bm{P}_{ij}),\
          ell_2(bm{phi}) &= sum_{i=1}^{N-N^*} lnbm{P}_{id_i},
          end{aligned}hspace*{6cm}null % choose offset amount suitably
          end{equation}
          end{document}





          share|improve this answer

















          • 1




            You won for 35 seconds :-) Excellent and congratulations on your response.
            – Sebastiano
            Dec 18 at 9:57










          • Your solution also work perfect with me
            – N. I. ElZayat
            Dec 18 at 11:16
















          6














          Do note that the left-hand shift of the first set of equations is not caused by the use of flalign, per se. Instead, the shift is caused by the presence of additional & symbols.



          To shift a nested equation/aligned system to the left, all you need to do is insert the instruction



          hspace*{6cm}null  % choose offset amount suitably


          between end{aligned} and end{equation}.



          Oh, and do please write ln rather than just ln to denote the natural logarithm operator.



          enter image description here



          documentclass{article}
          usepackage{amsmath,bm}
          begin{document}
          begin{equation}
          begin{aligned}
          ell_1(bm{phi}) &= sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-bm{P}_{ij}),\
          ell_2(bm{phi}) &= sum_{i=1}^{N-N^*} lnbm{P}_{id_i},
          end{aligned}hspace*{6cm}null % choose offset amount suitably
          end{equation}
          end{document}





          share|improve this answer

















          • 1




            You won for 35 seconds :-) Excellent and congratulations on your response.
            – Sebastiano
            Dec 18 at 9:57










          • Your solution also work perfect with me
            – N. I. ElZayat
            Dec 18 at 11:16














          6












          6








          6






          Do note that the left-hand shift of the first set of equations is not caused by the use of flalign, per se. Instead, the shift is caused by the presence of additional & symbols.



          To shift a nested equation/aligned system to the left, all you need to do is insert the instruction



          hspace*{6cm}null  % choose offset amount suitably


          between end{aligned} and end{equation}.



          Oh, and do please write ln rather than just ln to denote the natural logarithm operator.



          enter image description here



          documentclass{article}
          usepackage{amsmath,bm}
          begin{document}
          begin{equation}
          begin{aligned}
          ell_1(bm{phi}) &= sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-bm{P}_{ij}),\
          ell_2(bm{phi}) &= sum_{i=1}^{N-N^*} lnbm{P}_{id_i},
          end{aligned}hspace*{6cm}null % choose offset amount suitably
          end{equation}
          end{document}





          share|improve this answer












          Do note that the left-hand shift of the first set of equations is not caused by the use of flalign, per se. Instead, the shift is caused by the presence of additional & symbols.



          To shift a nested equation/aligned system to the left, all you need to do is insert the instruction



          hspace*{6cm}null  % choose offset amount suitably


          between end{aligned} and end{equation}.



          Oh, and do please write ln rather than just ln to denote the natural logarithm operator.



          enter image description here



          documentclass{article}
          usepackage{amsmath,bm}
          begin{document}
          begin{equation}
          begin{aligned}
          ell_1(bm{phi}) &= sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-bm{P}_{ij}),\
          ell_2(bm{phi}) &= sum_{i=1}^{N-N^*} lnbm{P}_{id_i},
          end{aligned}hspace*{6cm}null % choose offset amount suitably
          end{equation}
          end{document}






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 18 at 9:52









          Mico

          273k30369756




          273k30369756








          • 1




            You won for 35 seconds :-) Excellent and congratulations on your response.
            – Sebastiano
            Dec 18 at 9:57










          • Your solution also work perfect with me
            – N. I. ElZayat
            Dec 18 at 11:16














          • 1




            You won for 35 seconds :-) Excellent and congratulations on your response.
            – Sebastiano
            Dec 18 at 9:57










          • Your solution also work perfect with me
            – N. I. ElZayat
            Dec 18 at 11:16








          1




          1




          You won for 35 seconds :-) Excellent and congratulations on your response.
          – Sebastiano
          Dec 18 at 9:57




          You won for 35 seconds :-) Excellent and congratulations on your response.
          – Sebastiano
          Dec 18 at 9:57












          Your solution also work perfect with me
          – N. I. ElZayat
          Dec 18 at 11:16




          Your solution also work perfect with me
          – N. I. ElZayat
          Dec 18 at 11:16











          5














          You can use the fleqn environment from nccmath, which makes equations in the environment start at a fixed distance of the left margin via an optional argument (default 0pt):



          documentclass{article}
          usepackage{showframe}
          renewcommand{ShowFrameLinethickness}{0.3pt}
          usepackage{amsmath, bm, nccmath}

          begin{document}

          begin{fleqn}[1em]
          begin{equation}
          begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
          bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
          end{aligned}
          end{equation}
          end{fleqn}

          end{document}


          enter image description here






          share|improve this answer



















          • 1




            Oh! yes. Actually I didn't what the O.P. had written. Thanks!
            – Bernard
            Dec 18 at 10:10
















          5














          You can use the fleqn environment from nccmath, which makes equations in the environment start at a fixed distance of the left margin via an optional argument (default 0pt):



          documentclass{article}
          usepackage{showframe}
          renewcommand{ShowFrameLinethickness}{0.3pt}
          usepackage{amsmath, bm, nccmath}

          begin{document}

          begin{fleqn}[1em]
          begin{equation}
          begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
          bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
          end{aligned}
          end{equation}
          end{fleqn}

          end{document}


          enter image description here






          share|improve this answer



















          • 1




            Oh! yes. Actually I didn't what the O.P. had written. Thanks!
            – Bernard
            Dec 18 at 10:10














          5












          5








          5






          You can use the fleqn environment from nccmath, which makes equations in the environment start at a fixed distance of the left margin via an optional argument (default 0pt):



          documentclass{article}
          usepackage{showframe}
          renewcommand{ShowFrameLinethickness}{0.3pt}
          usepackage{amsmath, bm, nccmath}

          begin{document}

          begin{fleqn}[1em]
          begin{equation}
          begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
          bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
          end{aligned}
          end{equation}
          end{fleqn}

          end{document}


          enter image description here






          share|improve this answer














          You can use the fleqn environment from nccmath, which makes equations in the environment start at a fixed distance of the left margin via an optional argument (default 0pt):



          documentclass{article}
          usepackage{showframe}
          renewcommand{ShowFrameLinethickness}{0.3pt}
          usepackage{amsmath, bm, nccmath}

          begin{document}

          begin{fleqn}[1em]
          begin{equation}
          begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
          bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
          end{aligned}
          end{equation}
          end{fleqn}

          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 18 at 10:08

























          answered Dec 18 at 10:03









          Bernard

          165k769193




          165k769193








          • 1




            Oh! yes. Actually I didn't what the O.P. had written. Thanks!
            – Bernard
            Dec 18 at 10:10














          • 1




            Oh! yes. Actually I didn't what the O.P. had written. Thanks!
            – Bernard
            Dec 18 at 10:10








          1




          1




          Oh! yes. Actually I didn't what the O.P. had written. Thanks!
          – Bernard
          Dec 18 at 10:10




          Oh! yes. Actually I didn't what the O.P. had written. Thanks!
          – Bernard
          Dec 18 at 10:10











          1














          You could, alternatively use, usepackage{empheq}. Here I have added a picture of the differents environment (see the table) that you can use:
          enter image description here



          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



          enter image description here



          documentclass{article}
          usepackage{empheq}
          usepackage{amsmath}
          usepackage{bm}
          begin{document}

          begin{empheq}{flalign}
          begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
          bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
          end{aligned}&&
          end{empheq}


          end{document}





          share|improve this answer



















          • 1




            In fact this package does not work with me. The equation still appears in center alignment.
            – N. I. ElZayat
            Dec 18 at 10:51






          • 1




            Your LaTeX distribution will probably not be updated. Try to check the date of your version.
            – Sebastiano
            Dec 18 at 10:59










          • It seems that you'r right I will check for an update.
            – N. I. ElZayat
            Dec 18 at 11:13












          • @N.I.ElZayat Don't waste your time trying to update. The equations from this answer will always be centred. You would need to specify an additional document class option to get the correct alignment as done in the other answers
            – samcarter
            Dec 18 at 12:27












          • @ samcarter I did not update I used one solution of the suggested above and it works great with me
            – N. I. ElZayat
            Dec 18 at 13:28
















          1














          You could, alternatively use, usepackage{empheq}. Here I have added a picture of the differents environment (see the table) that you can use:
          enter image description here



          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



          enter image description here



          documentclass{article}
          usepackage{empheq}
          usepackage{amsmath}
          usepackage{bm}
          begin{document}

          begin{empheq}{flalign}
          begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
          bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
          end{aligned}&&
          end{empheq}


          end{document}





          share|improve this answer



















          • 1




            In fact this package does not work with me. The equation still appears in center alignment.
            – N. I. ElZayat
            Dec 18 at 10:51






          • 1




            Your LaTeX distribution will probably not be updated. Try to check the date of your version.
            – Sebastiano
            Dec 18 at 10:59










          • It seems that you'r right I will check for an update.
            – N. I. ElZayat
            Dec 18 at 11:13












          • @N.I.ElZayat Don't waste your time trying to update. The equations from this answer will always be centred. You would need to specify an additional document class option to get the correct alignment as done in the other answers
            – samcarter
            Dec 18 at 12:27












          • @ samcarter I did not update I used one solution of the suggested above and it works great with me
            – N. I. ElZayat
            Dec 18 at 13:28














          1












          1








          1






          You could, alternatively use, usepackage{empheq}. Here I have added a picture of the differents environment (see the table) that you can use:
          enter image description here



          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



          enter image description here



          documentclass{article}
          usepackage{empheq}
          usepackage{amsmath}
          usepackage{bm}
          begin{document}

          begin{empheq}{flalign}
          begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
          bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
          end{aligned}&&
          end{empheq}


          end{document}





          share|improve this answer














          You could, alternatively use, usepackage{empheq}. Here I have added a picture of the differents environment (see the table) that you can use:
          enter image description here



          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



          enter image description here



          documentclass{article}
          usepackage{empheq}
          usepackage{amsmath}
          usepackage{bm}
          begin{document}

          begin{empheq}{flalign}
          begin{aligned}
          ell_1(bm{phi})& =sum_{i=1}^{N-N^*} sum_{j=2}^{d_i-1} ln(1-
          bm{P}_{ij}),\
          ell_2(bm{phi})& =sum_{i=1}^{N-N^*} ln,bm{P}_{id_i},
          end{aligned}&&
          end{empheq}


          end{document}






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago

























          answered Dec 18 at 9:53









          Sebastiano

          8,79641756




          8,79641756








          • 1




            In fact this package does not work with me. The equation still appears in center alignment.
            – N. I. ElZayat
            Dec 18 at 10:51






          • 1




            Your LaTeX distribution will probably not be updated. Try to check the date of your version.
            – Sebastiano
            Dec 18 at 10:59










          • It seems that you'r right I will check for an update.
            – N. I. ElZayat
            Dec 18 at 11:13












          • @N.I.ElZayat Don't waste your time trying to update. The equations from this answer will always be centred. You would need to specify an additional document class option to get the correct alignment as done in the other answers
            – samcarter
            Dec 18 at 12:27












          • @ samcarter I did not update I used one solution of the suggested above and it works great with me
            – N. I. ElZayat
            Dec 18 at 13:28














          • 1




            In fact this package does not work with me. The equation still appears in center alignment.
            – N. I. ElZayat
            Dec 18 at 10:51






          • 1




            Your LaTeX distribution will probably not be updated. Try to check the date of your version.
            – Sebastiano
            Dec 18 at 10:59










          • It seems that you'r right I will check for an update.
            – N. I. ElZayat
            Dec 18 at 11:13












          • @N.I.ElZayat Don't waste your time trying to update. The equations from this answer will always be centred. You would need to specify an additional document class option to get the correct alignment as done in the other answers
            – samcarter
            Dec 18 at 12:27












          • @ samcarter I did not update I used one solution of the suggested above and it works great with me
            – N. I. ElZayat
            Dec 18 at 13:28








          1




          1




          In fact this package does not work with me. The equation still appears in center alignment.
          – N. I. ElZayat
          Dec 18 at 10:51




          In fact this package does not work with me. The equation still appears in center alignment.
          – N. I. ElZayat
          Dec 18 at 10:51




          1




          1




          Your LaTeX distribution will probably not be updated. Try to check the date of your version.
          – Sebastiano
          Dec 18 at 10:59




          Your LaTeX distribution will probably not be updated. Try to check the date of your version.
          – Sebastiano
          Dec 18 at 10:59












          It seems that you'r right I will check for an update.
          – N. I. ElZayat
          Dec 18 at 11:13






          It seems that you'r right I will check for an update.
          – N. I. ElZayat
          Dec 18 at 11:13














          @N.I.ElZayat Don't waste your time trying to update. The equations from this answer will always be centred. You would need to specify an additional document class option to get the correct alignment as done in the other answers
          – samcarter
          Dec 18 at 12:27






          @N.I.ElZayat Don't waste your time trying to update. The equations from this answer will always be centred. You would need to specify an additional document class option to get the correct alignment as done in the other answers
          – samcarter
          Dec 18 at 12:27














          @ samcarter I did not update I used one solution of the suggested above and it works great with me
          – N. I. ElZayat
          Dec 18 at 13:28




          @ samcarter I did not update I used one solution of the suggested above and it works great with me
          – N. I. ElZayat
          Dec 18 at 13:28










          N. I. ElZayat is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          N. I. ElZayat is a new contributor. Be nice, and check out our Code of Conduct.













          N. I. ElZayat is a new contributor. Be nice, and check out our Code of Conduct.












          N. I. ElZayat is a new contributor. Be nice, and check out our Code of Conduct.
















          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%2f466329%2fmake-equation-number-in-middle-with-left-alignment-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

          Terni

          A new problem with tex4ht and tikz

          Sun Ra