Why doesn't lineno number a paragraph when it is followed by an indented equation?











up vote
24
down vote

favorite
4












While searching for the source of missing line numbers, I realized that paragraphs followed immediately by an equation have no line number, but this is fixed when a space is included,



e.g. the following document has no line numbers:



documentclass[12pt]{article}
usepackage{amsmath}
usepackage{lineno}
linenumbers
begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit:
$$1+1=2$$
end{document}


But this one does:



documentclass[12pt]{article}
usepackage{amsmath}
usepackage{lineno}
linenumbers
begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit:

$$1+1=2$$
end{document}


The only difference is the space above the equation.




  • Why is this the case (and is there a simple workaround)?


  • Is it incorrect to include an indented equation in a paragraph, or is this just a 'feature' of lineno?











share|improve this question


























    up vote
    24
    down vote

    favorite
    4












    While searching for the source of missing line numbers, I realized that paragraphs followed immediately by an equation have no line number, but this is fixed when a space is included,



    e.g. the following document has no line numbers:



    documentclass[12pt]{article}
    usepackage{amsmath}
    usepackage{lineno}
    linenumbers
    begin{document}
    Lorem ipsum dolor sit amet, consectetur adipiscing elit:
    $$1+1=2$$
    end{document}


    But this one does:



    documentclass[12pt]{article}
    usepackage{amsmath}
    usepackage{lineno}
    linenumbers
    begin{document}
    Lorem ipsum dolor sit amet, consectetur adipiscing elit:

    $$1+1=2$$
    end{document}


    The only difference is the space above the equation.




    • Why is this the case (and is there a simple workaround)?


    • Is it incorrect to include an indented equation in a paragraph, or is this just a 'feature' of lineno?











    share|improve this question
























      up vote
      24
      down vote

      favorite
      4









      up vote
      24
      down vote

      favorite
      4






      4





      While searching for the source of missing line numbers, I realized that paragraphs followed immediately by an equation have no line number, but this is fixed when a space is included,



      e.g. the following document has no line numbers:



      documentclass[12pt]{article}
      usepackage{amsmath}
      usepackage{lineno}
      linenumbers
      begin{document}
      Lorem ipsum dolor sit amet, consectetur adipiscing elit:
      $$1+1=2$$
      end{document}


      But this one does:



      documentclass[12pt]{article}
      usepackage{amsmath}
      usepackage{lineno}
      linenumbers
      begin{document}
      Lorem ipsum dolor sit amet, consectetur adipiscing elit:

      $$1+1=2$$
      end{document}


      The only difference is the space above the equation.




      • Why is this the case (and is there a simple workaround)?


      • Is it incorrect to include an indented equation in a paragraph, or is this just a 'feature' of lineno?











      share|improve this question













      While searching for the source of missing line numbers, I realized that paragraphs followed immediately by an equation have no line number, but this is fixed when a space is included,



      e.g. the following document has no line numbers:



      documentclass[12pt]{article}
      usepackage{amsmath}
      usepackage{lineno}
      linenumbers
      begin{document}
      Lorem ipsum dolor sit amet, consectetur adipiscing elit:
      $$1+1=2$$
      end{document}


      But this one does:



      documentclass[12pt]{article}
      usepackage{amsmath}
      usepackage{lineno}
      linenumbers
      begin{document}
      Lorem ipsum dolor sit amet, consectetur adipiscing elit:

      $$1+1=2$$
      end{document}


      The only difference is the space above the equation.




      • Why is this the case (and is there a simple workaround)?


      • Is it incorrect to include an indented equation in a paragraph, or is this just a 'feature' of lineno?








      equations amsmath line-numbering






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 15 '11 at 20:47









      David LeBauer

      2,54863053




      2,54863053






















          5 Answers
          5






          active

          oldest

          votes

















          up vote
          18
          down vote



          accepted










          $$...$$ is obsolete, see Why is [ … ] preferable to $$. If you use the correct LaTeX displayed math environment, the numbering works without the empty line:



          documentclass[12pt]{article}
          usepackage{amsmath}
          usepackage{lineno}
          linenumbers
          begin{document}
          Lorem ipsum dolor sit amet, consectetur adipiscing elit:
          [1+1=2]
          end{document}


          enter image description here






          share|improve this answer























          • thank you, is $ also obsolete?
            – David LeBauer
            Aug 15 '11 at 21:04








          • 2




            @David: that's true, see: Are ( and ) preferable to $. At least: ( ... ) is LaTeX syntax, so better supported in LaTeX. $...$ is plain TeX. However, usually both work well, many prefer $...$ because it's easier to write or just classic.
            – Stefan Kottwitz
            Aug 15 '11 at 21:09








          • 3




            @David: ( and ) are fragile by default. So, as Will Robertson said, don't use them unless you use fixltx2e package. And the default ( and ) have very few advantages compared with $.
            – Leo Liu
            Aug 16 '11 at 5:05












          • @StefanKottwitz, what could I do if I need numbered equations?
            – Sigur
            Apr 3 '13 at 20:08










          • @Sigur Use an equation environment.
            – Stefan Kottwitz
            Apr 3 '13 at 20:37


















          up vote
          23
          down vote













          For line numbering to be done correctly the math environments has to be wrapped using the begin{linenomath*} and end{linenomath*} code:



          documentclass[12pt]{article}
          usepackage{amsmath}
          usepackage{lineno}
          linenumbers
          begin{document}
          For line numbering to be done correctly the math environments has to be wrapped using the ''linenomath`` code as follows:

          begin{linenomath*}
          begin{equation}
          a^2=b^2+c^2
          end{equation}
          end{linenomath*}
          some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text heresome text here.
          end{document}


          enter image description here






          share|improve this answer



















          • 1




            This is particularly valuable, because it works for the AMS align environment, too!
            – AJK
            Nov 21 '15 at 0:41


















          up vote
          4
          down vote













          Mathematics environments need to be wrapped by begin{linenomath*} and end{linenomath*} as mentioned in Bamzi's answer.



          A quick way to change all your equations is to renew the equation environment by adding the code



          letoldequationequation
          letoldendequationendequation

          renewenvironment{equation}
          {linenomathNonumbersoldequation}
          {oldendequationendlinenomath}


          before begin{document}.






          share|improve this answer























          • Welcome to TeX.SX!
            – Bobyandbob
            Dec 5 '17 at 15:18






          • 1




            I'd say this is the most convenient answer. Thanks!
            – Yo B.
            Oct 18 at 10:36










          • This answer should be upvoted to top. Definitely.
            – WDC
            Nov 26 at 3:19


















          up vote
          1
          down vote













          Use the mathlines option for lineno and write:



          begin{linenomath}
          begin{align*}
          z_{1}&=x_{1}+y_{1}\
          z_{2}&=x_{2}+y_{2}
          end{align*}
          end{linenomath}


          to obtain



          enter image description here






          share|improve this answer




























            up vote
            0
            down vote













            As @Denis has said, the mathlines option can be used in some cases (for article, but not for iopart, for example). If you do so, and you are also using the amsmath package, be sure to load lineno after amsmath. This MWE can be used to easily see the effect of that change:



            documentclass{article}
            % usepackage[mathlines]{lineno}
            usepackage{amsmath}
            usepackage[mathlines]{lineno}

            begin{document}
            linenumbers

            Line number

            No line number if lineno is loaded before amsmath!
            begin{equation}
            x = y
            end{equation}

            Line number
            end{document}





            share|improve this answer





















              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%2f25784%2fwhy-doesnt-lineno-number-a-paragraph-when-it-is-followed-by-an-indented-equatio%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              5 Answers
              5






              active

              oldest

              votes








              5 Answers
              5






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              18
              down vote



              accepted










              $$...$$ is obsolete, see Why is [ … ] preferable to $$. If you use the correct LaTeX displayed math environment, the numbering works without the empty line:



              documentclass[12pt]{article}
              usepackage{amsmath}
              usepackage{lineno}
              linenumbers
              begin{document}
              Lorem ipsum dolor sit amet, consectetur adipiscing elit:
              [1+1=2]
              end{document}


              enter image description here






              share|improve this answer























              • thank you, is $ also obsolete?
                – David LeBauer
                Aug 15 '11 at 21:04








              • 2




                @David: that's true, see: Are ( and ) preferable to $. At least: ( ... ) is LaTeX syntax, so better supported in LaTeX. $...$ is plain TeX. However, usually both work well, many prefer $...$ because it's easier to write or just classic.
                – Stefan Kottwitz
                Aug 15 '11 at 21:09








              • 3




                @David: ( and ) are fragile by default. So, as Will Robertson said, don't use them unless you use fixltx2e package. And the default ( and ) have very few advantages compared with $.
                – Leo Liu
                Aug 16 '11 at 5:05












              • @StefanKottwitz, what could I do if I need numbered equations?
                – Sigur
                Apr 3 '13 at 20:08










              • @Sigur Use an equation environment.
                – Stefan Kottwitz
                Apr 3 '13 at 20:37















              up vote
              18
              down vote



              accepted










              $$...$$ is obsolete, see Why is [ … ] preferable to $$. If you use the correct LaTeX displayed math environment, the numbering works without the empty line:



              documentclass[12pt]{article}
              usepackage{amsmath}
              usepackage{lineno}
              linenumbers
              begin{document}
              Lorem ipsum dolor sit amet, consectetur adipiscing elit:
              [1+1=2]
              end{document}


              enter image description here






              share|improve this answer























              • thank you, is $ also obsolete?
                – David LeBauer
                Aug 15 '11 at 21:04








              • 2




                @David: that's true, see: Are ( and ) preferable to $. At least: ( ... ) is LaTeX syntax, so better supported in LaTeX. $...$ is plain TeX. However, usually both work well, many prefer $...$ because it's easier to write or just classic.
                – Stefan Kottwitz
                Aug 15 '11 at 21:09








              • 3




                @David: ( and ) are fragile by default. So, as Will Robertson said, don't use them unless you use fixltx2e package. And the default ( and ) have very few advantages compared with $.
                – Leo Liu
                Aug 16 '11 at 5:05












              • @StefanKottwitz, what could I do if I need numbered equations?
                – Sigur
                Apr 3 '13 at 20:08










              • @Sigur Use an equation environment.
                – Stefan Kottwitz
                Apr 3 '13 at 20:37













              up vote
              18
              down vote



              accepted







              up vote
              18
              down vote



              accepted






              $$...$$ is obsolete, see Why is [ … ] preferable to $$. If you use the correct LaTeX displayed math environment, the numbering works without the empty line:



              documentclass[12pt]{article}
              usepackage{amsmath}
              usepackage{lineno}
              linenumbers
              begin{document}
              Lorem ipsum dolor sit amet, consectetur adipiscing elit:
              [1+1=2]
              end{document}


              enter image description here






              share|improve this answer














              $$...$$ is obsolete, see Why is [ … ] preferable to $$. If you use the correct LaTeX displayed math environment, the numbering works without the empty line:



              documentclass[12pt]{article}
              usepackage{amsmath}
              usepackage{lineno}
              linenumbers
              begin{document}
              Lorem ipsum dolor sit amet, consectetur adipiscing elit:
              [1+1=2]
              end{document}


              enter image description here







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Apr 13 '17 at 12:35









              Community

              1




              1










              answered Aug 15 '11 at 20:56









              Stefan Kottwitz

              175k63566756




              175k63566756












              • thank you, is $ also obsolete?
                – David LeBauer
                Aug 15 '11 at 21:04








              • 2




                @David: that's true, see: Are ( and ) preferable to $. At least: ( ... ) is LaTeX syntax, so better supported in LaTeX. $...$ is plain TeX. However, usually both work well, many prefer $...$ because it's easier to write or just classic.
                – Stefan Kottwitz
                Aug 15 '11 at 21:09








              • 3




                @David: ( and ) are fragile by default. So, as Will Robertson said, don't use them unless you use fixltx2e package. And the default ( and ) have very few advantages compared with $.
                – Leo Liu
                Aug 16 '11 at 5:05












              • @StefanKottwitz, what could I do if I need numbered equations?
                – Sigur
                Apr 3 '13 at 20:08










              • @Sigur Use an equation environment.
                – Stefan Kottwitz
                Apr 3 '13 at 20:37


















              • thank you, is $ also obsolete?
                – David LeBauer
                Aug 15 '11 at 21:04








              • 2




                @David: that's true, see: Are ( and ) preferable to $. At least: ( ... ) is LaTeX syntax, so better supported in LaTeX. $...$ is plain TeX. However, usually both work well, many prefer $...$ because it's easier to write or just classic.
                – Stefan Kottwitz
                Aug 15 '11 at 21:09








              • 3




                @David: ( and ) are fragile by default. So, as Will Robertson said, don't use them unless you use fixltx2e package. And the default ( and ) have very few advantages compared with $.
                – Leo Liu
                Aug 16 '11 at 5:05












              • @StefanKottwitz, what could I do if I need numbered equations?
                – Sigur
                Apr 3 '13 at 20:08










              • @Sigur Use an equation environment.
                – Stefan Kottwitz
                Apr 3 '13 at 20:37
















              thank you, is $ also obsolete?
              – David LeBauer
              Aug 15 '11 at 21:04






              thank you, is $ also obsolete?
              – David LeBauer
              Aug 15 '11 at 21:04






              2




              2




              @David: that's true, see: Are ( and ) preferable to $. At least: ( ... ) is LaTeX syntax, so better supported in LaTeX. $...$ is plain TeX. However, usually both work well, many prefer $...$ because it's easier to write or just classic.
              – Stefan Kottwitz
              Aug 15 '11 at 21:09






              @David: that's true, see: Are ( and ) preferable to $. At least: ( ... ) is LaTeX syntax, so better supported in LaTeX. $...$ is plain TeX. However, usually both work well, many prefer $...$ because it's easier to write or just classic.
              – Stefan Kottwitz
              Aug 15 '11 at 21:09






              3




              3




              @David: ( and ) are fragile by default. So, as Will Robertson said, don't use them unless you use fixltx2e package. And the default ( and ) have very few advantages compared with $.
              – Leo Liu
              Aug 16 '11 at 5:05






              @David: ( and ) are fragile by default. So, as Will Robertson said, don't use them unless you use fixltx2e package. And the default ( and ) have very few advantages compared with $.
              – Leo Liu
              Aug 16 '11 at 5:05














              @StefanKottwitz, what could I do if I need numbered equations?
              – Sigur
              Apr 3 '13 at 20:08




              @StefanKottwitz, what could I do if I need numbered equations?
              – Sigur
              Apr 3 '13 at 20:08












              @Sigur Use an equation environment.
              – Stefan Kottwitz
              Apr 3 '13 at 20:37




              @Sigur Use an equation environment.
              – Stefan Kottwitz
              Apr 3 '13 at 20:37










              up vote
              23
              down vote













              For line numbering to be done correctly the math environments has to be wrapped using the begin{linenomath*} and end{linenomath*} code:



              documentclass[12pt]{article}
              usepackage{amsmath}
              usepackage{lineno}
              linenumbers
              begin{document}
              For line numbering to be done correctly the math environments has to be wrapped using the ''linenomath`` code as follows:

              begin{linenomath*}
              begin{equation}
              a^2=b^2+c^2
              end{equation}
              end{linenomath*}
              some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text heresome text here.
              end{document}


              enter image description here






              share|improve this answer



















              • 1




                This is particularly valuable, because it works for the AMS align environment, too!
                – AJK
                Nov 21 '15 at 0:41















              up vote
              23
              down vote













              For line numbering to be done correctly the math environments has to be wrapped using the begin{linenomath*} and end{linenomath*} code:



              documentclass[12pt]{article}
              usepackage{amsmath}
              usepackage{lineno}
              linenumbers
              begin{document}
              For line numbering to be done correctly the math environments has to be wrapped using the ''linenomath`` code as follows:

              begin{linenomath*}
              begin{equation}
              a^2=b^2+c^2
              end{equation}
              end{linenomath*}
              some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text heresome text here.
              end{document}


              enter image description here






              share|improve this answer



















              • 1




                This is particularly valuable, because it works for the AMS align environment, too!
                – AJK
                Nov 21 '15 at 0:41













              up vote
              23
              down vote










              up vote
              23
              down vote









              For line numbering to be done correctly the math environments has to be wrapped using the begin{linenomath*} and end{linenomath*} code:



              documentclass[12pt]{article}
              usepackage{amsmath}
              usepackage{lineno}
              linenumbers
              begin{document}
              For line numbering to be done correctly the math environments has to be wrapped using the ''linenomath`` code as follows:

              begin{linenomath*}
              begin{equation}
              a^2=b^2+c^2
              end{equation}
              end{linenomath*}
              some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text heresome text here.
              end{document}


              enter image description here






              share|improve this answer














              For line numbering to be done correctly the math environments has to be wrapped using the begin{linenomath*} and end{linenomath*} code:



              documentclass[12pt]{article}
              usepackage{amsmath}
              usepackage{lineno}
              linenumbers
              begin{document}
              For line numbering to be done correctly the math environments has to be wrapped using the ''linenomath`` code as follows:

              begin{linenomath*}
              begin{equation}
              a^2=b^2+c^2
              end{equation}
              end{linenomath*}
              some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text here some text heresome text here.
              end{document}


              enter image description here







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Dec 5 '17 at 15:38









              Stefan Pinnow

              19.2k83175




              19.2k83175










              answered May 11 '15 at 16:53









              Bamzi

              23123




              23123








              • 1




                This is particularly valuable, because it works for the AMS align environment, too!
                – AJK
                Nov 21 '15 at 0:41














              • 1




                This is particularly valuable, because it works for the AMS align environment, too!
                – AJK
                Nov 21 '15 at 0:41








              1




              1




              This is particularly valuable, because it works for the AMS align environment, too!
              – AJK
              Nov 21 '15 at 0:41




              This is particularly valuable, because it works for the AMS align environment, too!
              – AJK
              Nov 21 '15 at 0:41










              up vote
              4
              down vote













              Mathematics environments need to be wrapped by begin{linenomath*} and end{linenomath*} as mentioned in Bamzi's answer.



              A quick way to change all your equations is to renew the equation environment by adding the code



              letoldequationequation
              letoldendequationendequation

              renewenvironment{equation}
              {linenomathNonumbersoldequation}
              {oldendequationendlinenomath}


              before begin{document}.






              share|improve this answer























              • Welcome to TeX.SX!
                – Bobyandbob
                Dec 5 '17 at 15:18






              • 1




                I'd say this is the most convenient answer. Thanks!
                – Yo B.
                Oct 18 at 10:36










              • This answer should be upvoted to top. Definitely.
                – WDC
                Nov 26 at 3:19















              up vote
              4
              down vote













              Mathematics environments need to be wrapped by begin{linenomath*} and end{linenomath*} as mentioned in Bamzi's answer.



              A quick way to change all your equations is to renew the equation environment by adding the code



              letoldequationequation
              letoldendequationendequation

              renewenvironment{equation}
              {linenomathNonumbersoldequation}
              {oldendequationendlinenomath}


              before begin{document}.






              share|improve this answer























              • Welcome to TeX.SX!
                – Bobyandbob
                Dec 5 '17 at 15:18






              • 1




                I'd say this is the most convenient answer. Thanks!
                – Yo B.
                Oct 18 at 10:36










              • This answer should be upvoted to top. Definitely.
                – WDC
                Nov 26 at 3:19













              up vote
              4
              down vote










              up vote
              4
              down vote









              Mathematics environments need to be wrapped by begin{linenomath*} and end{linenomath*} as mentioned in Bamzi's answer.



              A quick way to change all your equations is to renew the equation environment by adding the code



              letoldequationequation
              letoldendequationendequation

              renewenvironment{equation}
              {linenomathNonumbersoldequation}
              {oldendequationendlinenomath}


              before begin{document}.






              share|improve this answer














              Mathematics environments need to be wrapped by begin{linenomath*} and end{linenomath*} as mentioned in Bamzi's answer.



              A quick way to change all your equations is to renew the equation environment by adding the code



              letoldequationequation
              letoldendequationendequation

              renewenvironment{equation}
              {linenomathNonumbersoldequation}
              {oldendequationendlinenomath}


              before begin{document}.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Dec 5 '17 at 15:37









              Stefan Pinnow

              19.2k83175




              19.2k83175










              answered Dec 5 '17 at 15:10









              R.M

              412




              412












              • Welcome to TeX.SX!
                – Bobyandbob
                Dec 5 '17 at 15:18






              • 1




                I'd say this is the most convenient answer. Thanks!
                – Yo B.
                Oct 18 at 10:36










              • This answer should be upvoted to top. Definitely.
                – WDC
                Nov 26 at 3:19


















              • Welcome to TeX.SX!
                – Bobyandbob
                Dec 5 '17 at 15:18






              • 1




                I'd say this is the most convenient answer. Thanks!
                – Yo B.
                Oct 18 at 10:36










              • This answer should be upvoted to top. Definitely.
                – WDC
                Nov 26 at 3:19
















              Welcome to TeX.SX!
              – Bobyandbob
              Dec 5 '17 at 15:18




              Welcome to TeX.SX!
              – Bobyandbob
              Dec 5 '17 at 15:18




              1




              1




              I'd say this is the most convenient answer. Thanks!
              – Yo B.
              Oct 18 at 10:36




              I'd say this is the most convenient answer. Thanks!
              – Yo B.
              Oct 18 at 10:36












              This answer should be upvoted to top. Definitely.
              – WDC
              Nov 26 at 3:19




              This answer should be upvoted to top. Definitely.
              – WDC
              Nov 26 at 3:19










              up vote
              1
              down vote













              Use the mathlines option for lineno and write:



              begin{linenomath}
              begin{align*}
              z_{1}&=x_{1}+y_{1}\
              z_{2}&=x_{2}+y_{2}
              end{align*}
              end{linenomath}


              to obtain



              enter image description here






              share|improve this answer

























                up vote
                1
                down vote













                Use the mathlines option for lineno and write:



                begin{linenomath}
                begin{align*}
                z_{1}&=x_{1}+y_{1}\
                z_{2}&=x_{2}+y_{2}
                end{align*}
                end{linenomath}


                to obtain



                enter image description here






                share|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  Use the mathlines option for lineno and write:



                  begin{linenomath}
                  begin{align*}
                  z_{1}&=x_{1}+y_{1}\
                  z_{2}&=x_{2}+y_{2}
                  end{align*}
                  end{linenomath}


                  to obtain



                  enter image description here






                  share|improve this answer












                  Use the mathlines option for lineno and write:



                  begin{linenomath}
                  begin{align*}
                  z_{1}&=x_{1}+y_{1}\
                  z_{2}&=x_{2}+y_{2}
                  end{align*}
                  end{linenomath}


                  to obtain



                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 23 '15 at 15:33









                  Denis

                  2,038520




                  2,038520






















                      up vote
                      0
                      down vote













                      As @Denis has said, the mathlines option can be used in some cases (for article, but not for iopart, for example). If you do so, and you are also using the amsmath package, be sure to load lineno after amsmath. This MWE can be used to easily see the effect of that change:



                      documentclass{article}
                      % usepackage[mathlines]{lineno}
                      usepackage{amsmath}
                      usepackage[mathlines]{lineno}

                      begin{document}
                      linenumbers

                      Line number

                      No line number if lineno is loaded before amsmath!
                      begin{equation}
                      x = y
                      end{equation}

                      Line number
                      end{document}





                      share|improve this answer

























                        up vote
                        0
                        down vote













                        As @Denis has said, the mathlines option can be used in some cases (for article, but not for iopart, for example). If you do so, and you are also using the amsmath package, be sure to load lineno after amsmath. This MWE can be used to easily see the effect of that change:



                        documentclass{article}
                        % usepackage[mathlines]{lineno}
                        usepackage{amsmath}
                        usepackage[mathlines]{lineno}

                        begin{document}
                        linenumbers

                        Line number

                        No line number if lineno is loaded before amsmath!
                        begin{equation}
                        x = y
                        end{equation}

                        Line number
                        end{document}





                        share|improve this answer























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          As @Denis has said, the mathlines option can be used in some cases (for article, but not for iopart, for example). If you do so, and you are also using the amsmath package, be sure to load lineno after amsmath. This MWE can be used to easily see the effect of that change:



                          documentclass{article}
                          % usepackage[mathlines]{lineno}
                          usepackage{amsmath}
                          usepackage[mathlines]{lineno}

                          begin{document}
                          linenumbers

                          Line number

                          No line number if lineno is loaded before amsmath!
                          begin{equation}
                          x = y
                          end{equation}

                          Line number
                          end{document}





                          share|improve this answer












                          As @Denis has said, the mathlines option can be used in some cases (for article, but not for iopart, for example). If you do so, and you are also using the amsmath package, be sure to load lineno after amsmath. This MWE can be used to easily see the effect of that change:



                          documentclass{article}
                          % usepackage[mathlines]{lineno}
                          usepackage{amsmath}
                          usepackage[mathlines]{lineno}

                          begin{document}
                          linenumbers

                          Line number

                          No line number if lineno is loaded before amsmath!
                          begin{equation}
                          x = y
                          end{equation}

                          Line number
                          end{document}






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Oct 22 at 7:34









                          bers

                          2,29511436




                          2,29511436






























                              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%2f25784%2fwhy-doesnt-lineno-number-a-paragraph-when-it-is-followed-by-an-indented-equatio%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

                              mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

                              How to change which sound is reproduced for terminal bell?

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