TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

One of the difficulties I have with writing formulas in LaTeX is that the standard sizing tools for the variable-size operators (parentheses, etc.) do not account for "high" symbols and "low" symbols separately. Thus, for instance, if you write something like

\[ \left(
0\le i\le m \\ 0<j<n}}
\right) \]

which (using the amsmath package) produces a summation symbol with two lines of subscript, then the tops of the enclosing parentheses extend well above the top of the text:

rendering of the example

Things get vastly worse if you try to enclose a commutative diagram in parentheses.

Is there any way to make the size vary asymmetrically? The parentheses should be able to extend far down without having to extend far up, and vice versa.

share|improve this question
Hmm, is it just me, or doesn't the above look typographically correct? – morbusg Aug 26 '11 at 20:56
up vote 16 down vote accepted

There's probably a package to do this ... but in the meantime, here's a way to do it that keeps the baseline correct. It lowers the line by a specified amount just before the opening parenthesis and then raises it back to where it should be just after. Then it does the same again the other end. One could add additional options to have one command deal with all styles of parenthesis and to deal with inline versus displaystyle (this is for displaystyle) - I'd wait to see if there's a package before tackling that! The drawback of this is that you have to decide what the "drop" should be for yourself. A more sophisticated approach would compute that for you.


  \raisebox{-#1}{\(\displaystyle\left(\raisebox{#1}{\(\displaystyle #2\)}\right)\)}}

  Y = \lowerparen{6pt}{\sum_{\substack{0 \le i \le m \\ 0 < j < m}}X}


Here's a slightly fuller solution, based on the above but with a little more flexibility with regard to mathmodes (thanks to this question on mathmodes).



\settoheight{\parenheight}{\(#4 #2\)}%
\settodepth{\parendepth}{\(#4 #2\)}



  \myleft(\prod_{{s = 0 \atop s \ne 3}} X_s\myright)^2 \left(A\right) \left(x\right)

  \myleft(\prod_{{s = 0 \atop s \ne 3}} X_s\myright)^2 \left(A\right) \left(x\right)


I haven't tested it very much. I suspect that something will break with the way I've coded the 'left-right' matching. The main point is to get the heights lined up.

(As this answer has been accepted, I don't feel I should simply replace the original answer with this new one but it's only a little development of the original so doesn't really deserve a new answer. So I'm posting it as an addendum.)

share|improve this answer
I'm inclined to accept this, but then, I felt the same way about Stefan Kottwitz's answer until you pointed out the issue with the baseline, so I'll wait and see if someone has something even better. If not, I'll accept. – Charles Staats Aug 4 '10 at 16:00
Definitely wait! It sounds like the sort of thing that there'd be a package for, but I tend to prefer hacking something than searching CTAN (I can never figure out how best to find something there). I'll be interested to see if there is a package. – Loop Space Aug 4 '10 at 16:41
Yes, andrew is known to provide snippets of custom code to do just about anything =)))) – Dima Aug 29 '10 at 22:38

Another option is the nath package which does the "right thing" without any user intervention


( \sum_{0\le i\le m\\ 0<j<n} P(i,j)) 

Notice, no \left \right tags, no \substack, and even then you get the correct scaling of delimiters. Unfortunately, nath does not work well with amsmath. I hope that someone will separate the nath "goodies" from nath display math features, so that the former work with amsmath.

share|improve this answer
Shame about the amsmath incompatibility, but otherwise looks interesting. – Loop Space Aug 4 '10 at 17:47
I tried this out. In my compiler, the parentheses do not extend down to cover the subscripts. In addition, the package is incompatible with xypic, so I could not even test how it works with commutative diagrams. – Charles Staats Aug 6 '10 at 15:24
Actually, nath goes to a great deal of trouble to ensure that the brackets do not extend to cover all the subscripts. It is not considered a good style (although I cannot find a reference for that right now). – Aditya Aug 30 '10 at 17:35

Using an array environment would be an easy way to achieve vertically centered alignment:

\sum_{\substack{ 0\le i\le m\\ 0<j<n}} P(i,j)%
share|improve this answer
This shifts the baseline, so if there's other stuff on the line then it looks a little odd. However, if the parentheses are the outermost bits then I'd go for this. – Loop Space Aug 4 '10 at 15:46
Another thing is that it adds in some extra space for padding. I found that adding \mspace{-9mu} on either side of the middle line more or less corrected this. In any case, it's a vast improvement. – Charles Staats Aug 4 '10 at 15:52
How about just changing the array column specification to @{}c@{}? – TH. Aug 30 '10 at 4:13
Or using \begin{pmatrix} and \end{pmatrix} instead of \left(\begin{array}{c} and \end{array}\right). – Bruno Le Floch Jan 25 '11 at 17:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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