6

Is there a way to vertically adjust the lower limits of the two sums below, such that 'p' and 'q' are vertically aligned?

\sum_{p=1}^{\mathcal{M}}\sum_{q\in\mathfrak{N}_p^+}

image

EDIT: As per egreg's comment below, I tried

\sum_{p=1\vphantom{\mathfrak{N}_p^+}}^{\mathcal{M}}\sum_{q\in \mathfrak{N}_{p}^+}

This results in

enter image description here

However, I would prefer to shift the second lower limit up to the first, than the other way round. I tried

\sum_{p=1}^{\mathcal{M}}\sum_{q\in\mathfrak{N}_{p}^+\vphantom{p=1}},

but this does nothing.

2
  • 1
    You need _{p=1\vphantom{\mathfrak{N}_p^+}}
    – egreg
    Sep 10 '20 at 10:16
  • Okay, thanks. This shifts the vertical position of the first subscript. And I also tried applying it to the second subscript, but it does not shift it upward. I would prefer to align the second with the first, than the other way round.
    – niran90
    Sep 10 '20 at 10:21
6

You can equalize the two subscripts by using a phantom.

I like more the (more complex) second suggestion where the + is smashed at the top, so the two subscripts are a bit nearer the summation sign.

\documentclass{article}
\usepackage{amsmath,amssymb}

\begin{document}

Original
\[
\sum_{p=1}^{\mathcal{M}}\sum_{q\in\mathfrak{N}_p^+}
\]

First suggestion
\[
\sum_{p=1\vphantom{q\in\mathfrak{N}_p^+}}^{\mathcal{M}}\sum_{q\in\mathfrak{N}_p^+}
\]

Second suggestion
\[
\sum_{p=1\vphantom{q\in\mathfrak{N}_p^{\smash[t]{+}}}}^{\mathcal{M}}\sum_{q\in\mathfrak{N}_p^{\smash[t]{+}}}
\]

\end{document}

enter image description here

For producing the rule on the baseline I used a trick not shown in the code above.

1
  • Your second suggestion is just what I'm looking for! Thanks so much!
    – niran90
    Sep 10 '20 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.