Is there a way to stop the vertical spread of multiple super- and sub-scripts?











up vote
12
down vote

favorite
5












I'd like to be able to place multiple sub and superscripts (in maths mode) on an element without having them expand vertically. That is, so that in the output of ${x^2_4}^6_8$, the 2 and 6 were aligned, as were the 4 and 8 (obviously, I'd expect to do this with a macro rather than the super- and subscript commands). As a bonus, it'd be nice to be able to control whether or not this appeared like $x^{26}_{48}$ or $x^{2phantom{4}6}_{phantom{2}4phantom{6}8}$. And it would be nice to truly be able to do this incrementally, so that each subscript or superscript could be added without having to know all the previous ones (useful for adding stuff via macros). Simply writing $x^2_4{}^6_8$ wouldn't work as the latter super and subscripts wouldn't know the difference between x and X and ∏.



(see also non-kludgey left subscripts)










share|improve this question




















  • 4




    +1 this would be really useful for writing tensors in Einstein notation. I've thought about trying to figure out a way but never got around to it, so I'll be interested to see what answers come up.
    – David Z
    Jul 27 '10 at 10:48















up vote
12
down vote

favorite
5












I'd like to be able to place multiple sub and superscripts (in maths mode) on an element without having them expand vertically. That is, so that in the output of ${x^2_4}^6_8$, the 2 and 6 were aligned, as were the 4 and 8 (obviously, I'd expect to do this with a macro rather than the super- and subscript commands). As a bonus, it'd be nice to be able to control whether or not this appeared like $x^{26}_{48}$ or $x^{2phantom{4}6}_{phantom{2}4phantom{6}8}$. And it would be nice to truly be able to do this incrementally, so that each subscript or superscript could be added without having to know all the previous ones (useful for adding stuff via macros). Simply writing $x^2_4{}^6_8$ wouldn't work as the latter super and subscripts wouldn't know the difference between x and X and ∏.



(see also non-kludgey left subscripts)










share|improve this question




















  • 4




    +1 this would be really useful for writing tensors in Einstein notation. I've thought about trying to figure out a way but never got around to it, so I'll be interested to see what answers come up.
    – David Z
    Jul 27 '10 at 10:48













up vote
12
down vote

favorite
5









up vote
12
down vote

favorite
5






5





I'd like to be able to place multiple sub and superscripts (in maths mode) on an element without having them expand vertically. That is, so that in the output of ${x^2_4}^6_8$, the 2 and 6 were aligned, as were the 4 and 8 (obviously, I'd expect to do this with a macro rather than the super- and subscript commands). As a bonus, it'd be nice to be able to control whether or not this appeared like $x^{26}_{48}$ or $x^{2phantom{4}6}_{phantom{2}4phantom{6}8}$. And it would be nice to truly be able to do this incrementally, so that each subscript or superscript could be added without having to know all the previous ones (useful for adding stuff via macros). Simply writing $x^2_4{}^6_8$ wouldn't work as the latter super and subscripts wouldn't know the difference between x and X and ∏.



(see also non-kludgey left subscripts)










share|improve this question















I'd like to be able to place multiple sub and superscripts (in maths mode) on an element without having them expand vertically. That is, so that in the output of ${x^2_4}^6_8$, the 2 and 6 were aligned, as were the 4 and 8 (obviously, I'd expect to do this with a macro rather than the super- and subscript commands). As a bonus, it'd be nice to be able to control whether or not this appeared like $x^{26}_{48}$ or $x^{2phantom{4}6}_{phantom{2}4phantom{6}8}$. And it would be nice to truly be able to do this incrementally, so that each subscript or superscript could be added without having to know all the previous ones (useful for adding stuff via macros). Simply writing $x^2_4{}^6_8$ wouldn't work as the latter super and subscripts wouldn't know the difference between x and X and ∏.



(see also non-kludgey left subscripts)







math-mode positioning subscripts superscripts






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 '17 at 12:35









Community

1




1










asked Jul 27 '10 at 10:24









Loop Space

111k29297600




111k29297600








  • 4




    +1 this would be really useful for writing tensors in Einstein notation. I've thought about trying to figure out a way but never got around to it, so I'll be interested to see what answers come up.
    – David Z
    Jul 27 '10 at 10:48














  • 4




    +1 this would be really useful for writing tensors in Einstein notation. I've thought about trying to figure out a way but never got around to it, so I'll be interested to see what answers come up.
    – David Z
    Jul 27 '10 at 10:48








4




4




+1 this would be really useful for writing tensors in Einstein notation. I've thought about trying to figure out a way but never got around to it, so I'll be interested to see what answers come up.
– David Z
Jul 27 '10 at 10:48




+1 this would be really useful for writing tensors in Einstein notation. I've thought about trying to figure out a way but never got around to it, so I'll be interested to see what answers come up.
– David Z
Jul 27 '10 at 10:48










1 Answer
1






active

oldest

votes

















up vote
14
down vote



accepted










My answer to the linked question on "non-kludgy left index" also works here. Use the tensor package. The tensor form leaves phantom spaces, while the tensor* form compresses everything.






share|improve this answer





















  • Should've checked CTAN myself ;-) +1
    – David Z
    Jul 27 '10 at 18:40










  • It is a bit hard to find. (Which keywords would one search for?) I came across the package a short while back by accident when I was looking for some way to typeset nuclides.
    – Willie Wong
    Jul 27 '10 at 19:09










  • This looks just right! Thanks.
    – Loop Space
    Jul 29 '10 at 10:48











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%2f336%2fis-there-a-way-to-stop-the-vertical-spread-of-multiple-super-and-sub-scripts%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
14
down vote



accepted










My answer to the linked question on "non-kludgy left index" also works here. Use the tensor package. The tensor form leaves phantom spaces, while the tensor* form compresses everything.






share|improve this answer





















  • Should've checked CTAN myself ;-) +1
    – David Z
    Jul 27 '10 at 18:40










  • It is a bit hard to find. (Which keywords would one search for?) I came across the package a short while back by accident when I was looking for some way to typeset nuclides.
    – Willie Wong
    Jul 27 '10 at 19:09










  • This looks just right! Thanks.
    – Loop Space
    Jul 29 '10 at 10:48















up vote
14
down vote



accepted










My answer to the linked question on "non-kludgy left index" also works here. Use the tensor package. The tensor form leaves phantom spaces, while the tensor* form compresses everything.






share|improve this answer





















  • Should've checked CTAN myself ;-) +1
    – David Z
    Jul 27 '10 at 18:40










  • It is a bit hard to find. (Which keywords would one search for?) I came across the package a short while back by accident when I was looking for some way to typeset nuclides.
    – Willie Wong
    Jul 27 '10 at 19:09










  • This looks just right! Thanks.
    – Loop Space
    Jul 29 '10 at 10:48













up vote
14
down vote



accepted







up vote
14
down vote



accepted






My answer to the linked question on "non-kludgy left index" also works here. Use the tensor package. The tensor form leaves phantom spaces, while the tensor* form compresses everything.






share|improve this answer












My answer to the linked question on "non-kludgy left index" also works here. Use the tensor package. The tensor form leaves phantom spaces, while the tensor* form compresses everything.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jul 27 '10 at 17:54









Willie Wong

12.5k45583




12.5k45583












  • Should've checked CTAN myself ;-) +1
    – David Z
    Jul 27 '10 at 18:40










  • It is a bit hard to find. (Which keywords would one search for?) I came across the package a short while back by accident when I was looking for some way to typeset nuclides.
    – Willie Wong
    Jul 27 '10 at 19:09










  • This looks just right! Thanks.
    – Loop Space
    Jul 29 '10 at 10:48


















  • Should've checked CTAN myself ;-) +1
    – David Z
    Jul 27 '10 at 18:40










  • It is a bit hard to find. (Which keywords would one search for?) I came across the package a short while back by accident when I was looking for some way to typeset nuclides.
    – Willie Wong
    Jul 27 '10 at 19:09










  • This looks just right! Thanks.
    – Loop Space
    Jul 29 '10 at 10:48
















Should've checked CTAN myself ;-) +1
– David Z
Jul 27 '10 at 18:40




Should've checked CTAN myself ;-) +1
– David Z
Jul 27 '10 at 18:40












It is a bit hard to find. (Which keywords would one search for?) I came across the package a short while back by accident when I was looking for some way to typeset nuclides.
– Willie Wong
Jul 27 '10 at 19:09




It is a bit hard to find. (Which keywords would one search for?) I came across the package a short while back by accident when I was looking for some way to typeset nuclides.
– Willie Wong
Jul 27 '10 at 19:09












This looks just right! Thanks.
– Loop Space
Jul 29 '10 at 10:48




This looks just right! Thanks.
– Loop Space
Jul 29 '10 at 10:48


















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%2f336%2fis-there-a-way-to-stop-the-vertical-spread-of-multiple-super-and-sub-scripts%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?