Place subscript below math operator and its following symbols











up vote
1
down vote

favorite












I'm dealing with equations from statistics that include expectations over quite long expressions. To display those without too many line breaks, I'd like to place the subscript below the operator and its arguments.



Normal subscript



newcommand{E}[3]{mathbb{operatorname{E}}_{#2}#1[#3#1]}
E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}




Subscript below



This related question describes how to use mathop{} to place the subscript underneath the operator. However, the large space around the operator takes up too much space.



newcommand{E}[3]{mathop{mathbb{E}}_{#2}#1[#3#1]}
E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}




I've also found this related question about left aligning the subscript but it still introduces a lot of space to the right of the operator.



Desired outcome



Here is an example of how I'd like the subscript to behave. Is should be left-aligned below the operator without creating additional spacing to the right of the operator.












share|improve this question




























    up vote
    1
    down vote

    favorite












    I'm dealing with equations from statistics that include expectations over quite long expressions. To display those without too many line breaks, I'd like to place the subscript below the operator and its arguments.



    Normal subscript



    newcommand{E}[3]{mathbb{operatorname{E}}_{#2}#1[#3#1]}
    E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}




    Subscript below



    This related question describes how to use mathop{} to place the subscript underneath the operator. However, the large space around the operator takes up too much space.



    newcommand{E}[3]{mathop{mathbb{E}}_{#2}#1[#3#1]}
    E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}




    I've also found this related question about left aligning the subscript but it still introduces a lot of space to the right of the operator.



    Desired outcome



    Here is an example of how I'd like the subscript to behave. Is should be left-aligned below the operator without creating additional spacing to the right of the operator.












    share|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I'm dealing with equations from statistics that include expectations over quite long expressions. To display those without too many line breaks, I'd like to place the subscript below the operator and its arguments.



      Normal subscript



      newcommand{E}[3]{mathbb{operatorname{E}}_{#2}#1[#3#1]}
      E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}




      Subscript below



      This related question describes how to use mathop{} to place the subscript underneath the operator. However, the large space around the operator takes up too much space.



      newcommand{E}[3]{mathop{mathbb{E}}_{#2}#1[#3#1]}
      E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}




      I've also found this related question about left aligning the subscript but it still introduces a lot of space to the right of the operator.



      Desired outcome



      Here is an example of how I'd like the subscript to behave. Is should be left-aligned below the operator without creating additional spacing to the right of the operator.












      share|improve this question















      I'm dealing with equations from statistics that include expectations over quite long expressions. To display those without too many line breaks, I'd like to place the subscript below the operator and its arguments.



      Normal subscript



      newcommand{E}[3]{mathbb{operatorname{E}}_{#2}#1[#3#1]}
      E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}




      Subscript below



      This related question describes how to use mathop{} to place the subscript underneath the operator. However, the large space around the operator takes up too much space.



      newcommand{E}[3]{mathop{mathbb{E}}_{#2}#1[#3#1]}
      E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}




      I've also found this related question about left aligning the subscript but it still introduces a lot of space to the right of the operator.



      Desired outcome



      Here is an example of how I'd like the subscript to behave. Is should be left-aligned below the operator without creating additional spacing to the right of the operator.









      spacing horizontal-alignment vertical-alignment subscripts






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 3 hours ago

























      asked 3 hours ago









      danijar

      279212




      279212






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          Based on this recent answer, I'd suggest



          documentclass{article}
          usepackage{amsfonts}
          usepackage{mathtools}
          newlengthmywdE
          newcommand{E}[3]{settowidthmywdE{$mathbb{E}$}
          mathop{mathbb{E}}_{mathmakebox[0.5mywdE][l]{#2}}#1[#3#1]}
          %
          begin{document}
          [E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}]
          end{document}


          enter image description here



          You can e.g. use a vphantom to move the subscript down.



          documentclass{article}
          usepackage{amsfonts}
          usepackage{mathtools}
          newlengthmywdE
          newcommand{E}[3]{settowidthmywdE{$mathbb{E}$}
          mathop{mathbb{E}}_{vphantom{|^|}mathmakebox[0.5mywdE][l]{#2}}#1[#3#1]}
          %
          begin{document}
          [E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}]
          end{document}


          enter image description here






          share|improve this answer























          • Thanks a lot! How would I move the subscript a bit further down to avoid overlaps, while keeping the spacing to the line below (to not create new overlap there)?
            – danijar
            3 hours ago










          • @danijar I added a possible way.
            – marmot
            2 hours 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',
          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%2f462506%2fplace-subscript-below-math-operator-and-its-following-symbols%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








          up vote
          1
          down vote













          Based on this recent answer, I'd suggest



          documentclass{article}
          usepackage{amsfonts}
          usepackage{mathtools}
          newlengthmywdE
          newcommand{E}[3]{settowidthmywdE{$mathbb{E}$}
          mathop{mathbb{E}}_{mathmakebox[0.5mywdE][l]{#2}}#1[#3#1]}
          %
          begin{document}
          [E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}]
          end{document}


          enter image description here



          You can e.g. use a vphantom to move the subscript down.



          documentclass{article}
          usepackage{amsfonts}
          usepackage{mathtools}
          newlengthmywdE
          newcommand{E}[3]{settowidthmywdE{$mathbb{E}$}
          mathop{mathbb{E}}_{vphantom{|^|}mathmakebox[0.5mywdE][l]{#2}}#1[#3#1]}
          %
          begin{document}
          [E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}]
          end{document}


          enter image description here






          share|improve this answer























          • Thanks a lot! How would I move the subscript a bit further down to avoid overlaps, while keeping the spacing to the line below (to not create new overlap there)?
            – danijar
            3 hours ago










          • @danijar I added a possible way.
            – marmot
            2 hours ago















          up vote
          1
          down vote













          Based on this recent answer, I'd suggest



          documentclass{article}
          usepackage{amsfonts}
          usepackage{mathtools}
          newlengthmywdE
          newcommand{E}[3]{settowidthmywdE{$mathbb{E}$}
          mathop{mathbb{E}}_{mathmakebox[0.5mywdE][l]{#2}}#1[#3#1]}
          %
          begin{document}
          [E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}]
          end{document}


          enter image description here



          You can e.g. use a vphantom to move the subscript down.



          documentclass{article}
          usepackage{amsfonts}
          usepackage{mathtools}
          newlengthmywdE
          newcommand{E}[3]{settowidthmywdE{$mathbb{E}$}
          mathop{mathbb{E}}_{vphantom{|^|}mathmakebox[0.5mywdE][l]{#2}}#1[#3#1]}
          %
          begin{document}
          [E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}]
          end{document}


          enter image description here






          share|improve this answer























          • Thanks a lot! How would I move the subscript a bit further down to avoid overlaps, while keeping the spacing to the line below (to not create new overlap there)?
            – danijar
            3 hours ago










          • @danijar I added a possible way.
            – marmot
            2 hours ago













          up vote
          1
          down vote










          up vote
          1
          down vote









          Based on this recent answer, I'd suggest



          documentclass{article}
          usepackage{amsfonts}
          usepackage{mathtools}
          newlengthmywdE
          newcommand{E}[3]{settowidthmywdE{$mathbb{E}$}
          mathop{mathbb{E}}_{mathmakebox[0.5mywdE][l]{#2}}#1[#3#1]}
          %
          begin{document}
          [E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}]
          end{document}


          enter image description here



          You can e.g. use a vphantom to move the subscript down.



          documentclass{article}
          usepackage{amsfonts}
          usepackage{mathtools}
          newlengthmywdE
          newcommand{E}[3]{settowidthmywdE{$mathbb{E}$}
          mathop{mathbb{E}}_{vphantom{|^|}mathmakebox[0.5mywdE][l]{#2}}#1[#3#1]}
          %
          begin{document}
          [E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}]
          end{document}


          enter image description here






          share|improve this answer














          Based on this recent answer, I'd suggest



          documentclass{article}
          usepackage{amsfonts}
          usepackage{mathtools}
          newlengthmywdE
          newcommand{E}[3]{settowidthmywdE{$mathbb{E}$}
          mathop{mathbb{E}}_{mathmakebox[0.5mywdE][l]{#2}}#1[#3#1]}
          %
          begin{document}
          [E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}]
          end{document}


          enter image description here



          You can e.g. use a vphantom to move the subscript down.



          documentclass{article}
          usepackage{amsfonts}
          usepackage{mathtools}
          newlengthmywdE
          newcommand{E}[3]{settowidthmywdE{$mathbb{E}$}
          mathop{mathbb{E}}_{vphantom{|^|}mathmakebox[0.5mywdE][l]{#2}}#1[#3#1]}
          %
          begin{document}
          [E{q(s_{t-1} mid o_{leq t},a_{<t})}{p(s_t mid s_{t-1},a_{t-1})}]
          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 hours ago

























          answered 3 hours ago









          marmot

          79.3k488166




          79.3k488166












          • Thanks a lot! How would I move the subscript a bit further down to avoid overlaps, while keeping the spacing to the line below (to not create new overlap there)?
            – danijar
            3 hours ago










          • @danijar I added a possible way.
            – marmot
            2 hours ago


















          • Thanks a lot! How would I move the subscript a bit further down to avoid overlaps, while keeping the spacing to the line below (to not create new overlap there)?
            – danijar
            3 hours ago










          • @danijar I added a possible way.
            – marmot
            2 hours ago
















          Thanks a lot! How would I move the subscript a bit further down to avoid overlaps, while keeping the spacing to the line below (to not create new overlap there)?
          – danijar
          3 hours ago




          Thanks a lot! How would I move the subscript a bit further down to avoid overlaps, while keeping the spacing to the line below (to not create new overlap there)?
          – danijar
          3 hours ago












          @danijar I added a possible way.
          – marmot
          2 hours ago




          @danijar I added a possible way.
          – marmot
          2 hours 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.





          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%2f462506%2fplace-subscript-below-math-operator-and-its-following-symbols%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

          Accessing regular linux commands in Huawei's Dopra Linux

          Can't connect RFCOMM socket: Host is down

          Kernel panic - not syncing: Fatal Exception in Interrupt