LaTeX adjusting sum limits












36















is there a way to show sum limits partially in inline mode and partially in display mode? i.e., I want to write



begin{equation}
sum_{n=-infty}^{+infty} [...]
end{equation}


but this way the lower limit is too wide, and I don't like it. So I was hoping to write something like this:



begin{equation}
sum_{-infty}^{+infty}nolimits_{n} [...]
end{equation}


to write the index n on the right side of the sum symbol, while the limits of the summation remain above and below.



Of course it doesn't work, LaTeX is pissed because there is a double subscript. Anyone knows if it's possible to do what I want to?










share|improve this question















migrated from stackoverflow.com Jan 5 '13 at 12:45


This question came from our site for professional and enthusiast programmers.























    36















    is there a way to show sum limits partially in inline mode and partially in display mode? i.e., I want to write



    begin{equation}
    sum_{n=-infty}^{+infty} [...]
    end{equation}


    but this way the lower limit is too wide, and I don't like it. So I was hoping to write something like this:



    begin{equation}
    sum_{-infty}^{+infty}nolimits_{n} [...]
    end{equation}


    to write the index n on the right side of the sum symbol, while the limits of the summation remain above and below.



    Of course it doesn't work, LaTeX is pissed because there is a double subscript. Anyone knows if it's possible to do what I want to?










    share|improve this question















    migrated from stackoverflow.com Jan 5 '13 at 12:45


    This question came from our site for professional and enthusiast programmers.





















      36












      36








      36


      14






      is there a way to show sum limits partially in inline mode and partially in display mode? i.e., I want to write



      begin{equation}
      sum_{n=-infty}^{+infty} [...]
      end{equation}


      but this way the lower limit is too wide, and I don't like it. So I was hoping to write something like this:



      begin{equation}
      sum_{-infty}^{+infty}nolimits_{n} [...]
      end{equation}


      to write the index n on the right side of the sum symbol, while the limits of the summation remain above and below.



      Of course it doesn't work, LaTeX is pissed because there is a double subscript. Anyone knows if it's possible to do what I want to?










      share|improve this question
















      is there a way to show sum limits partially in inline mode and partially in display mode? i.e., I want to write



      begin{equation}
      sum_{n=-infty}^{+infty} [...]
      end{equation}


      but this way the lower limit is too wide, and I don't like it. So I was hoping to write something like this:



      begin{equation}
      sum_{-infty}^{+infty}nolimits_{n} [...]
      end{equation}


      to write the index n on the right side of the sum symbol, while the limits of the summation remain above and below.



      Of course it doesn't work, LaTeX is pissed because there is a double subscript. Anyone knows if it's possible to do what I want to?







      math-operators






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 5 '13 at 12:57









      mafp

      14.5k252100




      14.5k252100










      asked Jan 4 '13 at 2:27









      gbasogbaso

      181126




      181126




      migrated from stackoverflow.com Jan 5 '13 at 12:45


      This question came from our site for professional and enthusiast programmers.









      migrated from stackoverflow.com Jan 5 '13 at 12:45


      This question came from our site for professional and enthusiast programmers.
























          2 Answers
          2






          active

          oldest

          votes


















          42














          In this instance a better approach would be to use mathtools's mathclap, which provides a centred overlap in math mode. The centred overlap implies a zero-width box containing stuff that overlaps on the left and right:



          enter image description here



          documentclass{article}
          usepackage{mathtools}% http://ctan.org/pkg/mathtools
          begin{document}
          begin{align*}
          A &= sum_{n=-infty}^{+infty} f(x) \
          B &= smashoperator[r]{sum_{n=-infty}^{+infty}} f(x) \
          C &= sum_{mathclap{n=-infty}}^{+infty} f(x) \
          D &= sum_{substack{n={}\-infty}}^{+infty} f(x) \
          E &= sum_{-infty}^{infty}mathop{}_{mkern-5mu n} f(x)
          end{align*}
          end{document}


          Sure mathtools also loads amsmath, but both these provide excellent tools in terms of typesetting mathematical content (and otherwise).



          To add multiple things under a math operator (like sum), see How do you put multiple things under a limit?, which suggests substack (as I've done in the last horrible visual).






          share|improve this answer





















          • 1





            If you asked me, I vote for option no. 2.

            – yo'
            Jan 5 '13 at 13:13











          • Thank you. I am looking for something like point E., but with prod, not sum. When I tried copying using mathop{}_{mkern-5mu n} it did not look so good. How would you do it with prod?

            – user119615
            Feb 9 '17 at 12:09



















          -1














          I was looking for this nice work, and I wanna add something you may find it good. Try to use displaystyle in any equation to see how nice it is. For example, write the sum with down limits only:



          $displaystyle sum_{n=1} f(x)$.


          Good luck.






          share|improve this answer










          New contributor




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





















          • This could be a comment instead.

            – zyy
            1 hour ago











          • Welcome! In many cases, an answer is not considered to be complete if it doesn't include an MWE. Therefore, please add an MWE so that future reader may find it helpful.

            – JouleV
            27 mins ago











          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
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f89447%2flatex-adjusting-sum-limits%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









          42














          In this instance a better approach would be to use mathtools's mathclap, which provides a centred overlap in math mode. The centred overlap implies a zero-width box containing stuff that overlaps on the left and right:



          enter image description here



          documentclass{article}
          usepackage{mathtools}% http://ctan.org/pkg/mathtools
          begin{document}
          begin{align*}
          A &= sum_{n=-infty}^{+infty} f(x) \
          B &= smashoperator[r]{sum_{n=-infty}^{+infty}} f(x) \
          C &= sum_{mathclap{n=-infty}}^{+infty} f(x) \
          D &= sum_{substack{n={}\-infty}}^{+infty} f(x) \
          E &= sum_{-infty}^{infty}mathop{}_{mkern-5mu n} f(x)
          end{align*}
          end{document}


          Sure mathtools also loads amsmath, but both these provide excellent tools in terms of typesetting mathematical content (and otherwise).



          To add multiple things under a math operator (like sum), see How do you put multiple things under a limit?, which suggests substack (as I've done in the last horrible visual).






          share|improve this answer





















          • 1





            If you asked me, I vote for option no. 2.

            – yo'
            Jan 5 '13 at 13:13











          • Thank you. I am looking for something like point E., but with prod, not sum. When I tried copying using mathop{}_{mkern-5mu n} it did not look so good. How would you do it with prod?

            – user119615
            Feb 9 '17 at 12:09
















          42














          In this instance a better approach would be to use mathtools's mathclap, which provides a centred overlap in math mode. The centred overlap implies a zero-width box containing stuff that overlaps on the left and right:



          enter image description here



          documentclass{article}
          usepackage{mathtools}% http://ctan.org/pkg/mathtools
          begin{document}
          begin{align*}
          A &= sum_{n=-infty}^{+infty} f(x) \
          B &= smashoperator[r]{sum_{n=-infty}^{+infty}} f(x) \
          C &= sum_{mathclap{n=-infty}}^{+infty} f(x) \
          D &= sum_{substack{n={}\-infty}}^{+infty} f(x) \
          E &= sum_{-infty}^{infty}mathop{}_{mkern-5mu n} f(x)
          end{align*}
          end{document}


          Sure mathtools also loads amsmath, but both these provide excellent tools in terms of typesetting mathematical content (and otherwise).



          To add multiple things under a math operator (like sum), see How do you put multiple things under a limit?, which suggests substack (as I've done in the last horrible visual).






          share|improve this answer





















          • 1





            If you asked me, I vote for option no. 2.

            – yo'
            Jan 5 '13 at 13:13











          • Thank you. I am looking for something like point E., but with prod, not sum. When I tried copying using mathop{}_{mkern-5mu n} it did not look so good. How would you do it with prod?

            – user119615
            Feb 9 '17 at 12:09














          42












          42








          42







          In this instance a better approach would be to use mathtools's mathclap, which provides a centred overlap in math mode. The centred overlap implies a zero-width box containing stuff that overlaps on the left and right:



          enter image description here



          documentclass{article}
          usepackage{mathtools}% http://ctan.org/pkg/mathtools
          begin{document}
          begin{align*}
          A &= sum_{n=-infty}^{+infty} f(x) \
          B &= smashoperator[r]{sum_{n=-infty}^{+infty}} f(x) \
          C &= sum_{mathclap{n=-infty}}^{+infty} f(x) \
          D &= sum_{substack{n={}\-infty}}^{+infty} f(x) \
          E &= sum_{-infty}^{infty}mathop{}_{mkern-5mu n} f(x)
          end{align*}
          end{document}


          Sure mathtools also loads amsmath, but both these provide excellent tools in terms of typesetting mathematical content (and otherwise).



          To add multiple things under a math operator (like sum), see How do you put multiple things under a limit?, which suggests substack (as I've done in the last horrible visual).






          share|improve this answer















          In this instance a better approach would be to use mathtools's mathclap, which provides a centred overlap in math mode. The centred overlap implies a zero-width box containing stuff that overlaps on the left and right:



          enter image description here



          documentclass{article}
          usepackage{mathtools}% http://ctan.org/pkg/mathtools
          begin{document}
          begin{align*}
          A &= sum_{n=-infty}^{+infty} f(x) \
          B &= smashoperator[r]{sum_{n=-infty}^{+infty}} f(x) \
          C &= sum_{mathclap{n=-infty}}^{+infty} f(x) \
          D &= sum_{substack{n={}\-infty}}^{+infty} f(x) \
          E &= sum_{-infty}^{infty}mathop{}_{mkern-5mu n} f(x)
          end{align*}
          end{document}


          Sure mathtools also loads amsmath, but both these provide excellent tools in terms of typesetting mathematical content (and otherwise).



          To add multiple things under a math operator (like sum), see How do you put multiple things under a limit?, which suggests substack (as I've done in the last horrible visual).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 13 '17 at 12:36









          Community

          1




          1










          answered Jan 4 '13 at 3:21









          WernerWerner

          447k699891695




          447k699891695








          • 1





            If you asked me, I vote for option no. 2.

            – yo'
            Jan 5 '13 at 13:13











          • Thank you. I am looking for something like point E., but with prod, not sum. When I tried copying using mathop{}_{mkern-5mu n} it did not look so good. How would you do it with prod?

            – user119615
            Feb 9 '17 at 12:09














          • 1





            If you asked me, I vote for option no. 2.

            – yo'
            Jan 5 '13 at 13:13











          • Thank you. I am looking for something like point E., but with prod, not sum. When I tried copying using mathop{}_{mkern-5mu n} it did not look so good. How would you do it with prod?

            – user119615
            Feb 9 '17 at 12:09








          1




          1





          If you asked me, I vote for option no. 2.

          – yo'
          Jan 5 '13 at 13:13





          If you asked me, I vote for option no. 2.

          – yo'
          Jan 5 '13 at 13:13













          Thank you. I am looking for something like point E., but with prod, not sum. When I tried copying using mathop{}_{mkern-5mu n} it did not look so good. How would you do it with prod?

          – user119615
          Feb 9 '17 at 12:09





          Thank you. I am looking for something like point E., but with prod, not sum. When I tried copying using mathop{}_{mkern-5mu n} it did not look so good. How would you do it with prod?

          – user119615
          Feb 9 '17 at 12:09











          -1














          I was looking for this nice work, and I wanna add something you may find it good. Try to use displaystyle in any equation to see how nice it is. For example, write the sum with down limits only:



          $displaystyle sum_{n=1} f(x)$.


          Good luck.






          share|improve this answer










          New contributor




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





















          • This could be a comment instead.

            – zyy
            1 hour ago











          • Welcome! In many cases, an answer is not considered to be complete if it doesn't include an MWE. Therefore, please add an MWE so that future reader may find it helpful.

            – JouleV
            27 mins ago
















          -1














          I was looking for this nice work, and I wanna add something you may find it good. Try to use displaystyle in any equation to see how nice it is. For example, write the sum with down limits only:



          $displaystyle sum_{n=1} f(x)$.


          Good luck.






          share|improve this answer










          New contributor




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





















          • This could be a comment instead.

            – zyy
            1 hour ago











          • Welcome! In many cases, an answer is not considered to be complete if it doesn't include an MWE. Therefore, please add an MWE so that future reader may find it helpful.

            – JouleV
            27 mins ago














          -1












          -1








          -1







          I was looking for this nice work, and I wanna add something you may find it good. Try to use displaystyle in any equation to see how nice it is. For example, write the sum with down limits only:



          $displaystyle sum_{n=1} f(x)$.


          Good luck.






          share|improve this answer










          New contributor




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










          I was looking for this nice work, and I wanna add something you may find it good. Try to use displaystyle in any equation to see how nice it is. For example, write the sum with down limits only:



          $displaystyle sum_{n=1} f(x)$.


          Good luck.







          share|improve this answer










          New contributor




          MathGuy 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








          edited 27 mins ago









          JouleV

          5,16511239




          5,16511239






          New contributor




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









          answered 2 hours ago









          MathGuyMathGuy

          11




          11




          New contributor




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





          New contributor





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






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













          • This could be a comment instead.

            – zyy
            1 hour ago











          • Welcome! In many cases, an answer is not considered to be complete if it doesn't include an MWE. Therefore, please add an MWE so that future reader may find it helpful.

            – JouleV
            27 mins ago



















          • This could be a comment instead.

            – zyy
            1 hour ago











          • Welcome! In many cases, an answer is not considered to be complete if it doesn't include an MWE. Therefore, please add an MWE so that future reader may find it helpful.

            – JouleV
            27 mins ago

















          This could be a comment instead.

          – zyy
          1 hour ago





          This could be a comment instead.

          – zyy
          1 hour ago













          Welcome! In many cases, an answer is not considered to be complete if it doesn't include an MWE. Therefore, please add an MWE so that future reader may find it helpful.

          – JouleV
          27 mins ago





          Welcome! In many cases, an answer is not considered to be complete if it doesn't include an MWE. Therefore, please add an MWE so that future reader may find it helpful.

          – JouleV
          27 mins ago


















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f89447%2flatex-adjusting-sum-limits%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

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Insert data from modal to MySQL (multiple modal on website)