LaTeX adjusting sum limits












37















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.























    37















    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.





















      37












      37








      37


      15






      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

      186126




      186126




      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.
























          1 Answer
          1






          active

          oldest

          votes


















          43














          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











          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

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          43














          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
















          43














          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














          43












          43








          43







          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

          448k709921697




          448k709921697








          • 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


















          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

          Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

          ComboBox Display Member on multiple fields

          Is it possible to collect Nectar points via Trainline?