7

I intended to use \left and \right command to display large parentheses in my paper, but the output is not exactly what I wanted.

The output is enter image description here

as can be found, the parentheses and square bracket in above and below are not in a uniform scale. What I wanted is
enter image description here

That is, the parenthesis right ) and square bracket right ] shall have the same size as the corresponding above ones. How can I solve it?

\documentclass[]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
(P_k^i)^{-1}
& \geq \sum_{j\in \mathcal{N}} \pi_{L,k}^{i,j} \alpha_{k-1}  F_{k-1}^{-T} \;(P^{j}_{k-1})^{-1} F_{k-1}^{-1}\notag\\
&\quad+ \sum_{j\in \mathcal{N}} \pi_{L,k}^{i,j}  (H_k^j)^T (R_k^j)^{-1}H_k^j  \notag\\
 & = \alpha({k-2},k)  \left[ \sum_{j\in \mathcal{N}} \pi_{L,k}^{i,j}  (F_{k-1}^j)^{-T}\left( \sum_{o\in \mathcal{N}} \pi_{L,{k-1}}^{j,o}\right. \right.\notag\\ 
 & \quad  \times \left. \left. (F_{k-2}^o)^{-T}  (P^{o}_{k-2})^{-1} (F_{k-2}^o)^{-1} \right) (F_{k-1}^j)^{-1}\right] \notag\\
  &\quad + \alpha_{k-1} \left[ \sum_{j\in \mathcal{N}} \pi_{L,k}^{i,j}  (F_{k-1}^j)^{-T}\left( \sum_{o\in \mathcal{N}} \pi_{L,{k-1}}^{j,o}\right. \right.\notag\\  
 & \quad  \times \left.\left. (H_{k-1}^o)^T (R_{k-1}^o)^{-1}H_{k-1}^o  \right) (F_{k-1}^j)^{-1}\right] \notag\\
 & \quad + \sum_{j\in \mathcal{N}} \pi_{L,k}^{i,j} (H_k^j)^T (R_k^j)^{-1}H_k^j
\end{align}
\end{document}
  • BTW: There is really no reason for the fences around the sums to be that large. – daleif Sep 21 '15 at 7:39
  • It looks clear, and it's very convenient to check the proof procedure. – wayne Sep 21 '15 at 7:41
  • Not really, it takes up too much space and draws attention to itself, which is a bad thing while reading. – daleif Sep 21 '15 at 8:46
  • Well, it depends. You have the point, but from my viewpoint, a better layout is important for the peer review. – wayne Sep 21 '15 at 11:27
6

This is one of the cases which tell you that \left and \right constructs are better be avoided. You can use \Bigg from amsmath. For details, see amsldoc, page 18, section 4.14.1.

\documentclass[]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
(P_k^i)^{-1}
& \geq \sum_{j\in \mathcal{N}} \pi_{L,k}^{i,j} \alpha_{k-1}  F_{k-1}^{-T} \;(P^{j}_{k-1})^{-1} F_{k-1}^{-1}\notag\\
&\quad+ \sum_{j\in \mathcal{N}} \pi_{L,k}^{i,j}  (H_k^j)^T (R_k^j)^{-1}H_k^j  \notag\\
 & = \alpha({k-2},k)  \Biggl[ \sum_{j\in \mathcal{N}} \pi_{L,k}^{i,j}  (F_{k-1}^j)^{-T}\Biggl( \sum_{o\in \mathcal{N}} \pi_{L,{k-1}}^{j,o} \notag\\
 & \quad  \times  (F_{k-2}^o)^{-T}  (P^{o}_{k-2})^{-1} (F_{k-2}^o)^{-1} \Biggr) (F_{k-1}^j)^{-1}\Biggr] \notag\\
  &\quad + \alpha_{k-1} \Biggl[ \sum_{j\in \mathcal{N}} \pi_{L,k}^{i,j}  (F_{k-1}^j)^{-T}\Biggl( \sum_{o\in \mathcal{N}} \pi_{L,{k-1}}^{j,o} \notag\\
 & \quad  \times  (H_{k-1}^o)^T (R_{k-1}^o)^{-1}H_{k-1}^o  \Biggr) (F_{k-1}^j)^{-1}\Biggr] \notag\\
 & \quad + \sum_{j\in \mathcal{N}} \pi_{L,k}^{i,j} (H_k^j)^T (R_k^j)^{-1}H_k^j
\end{align}
\end{document}

enter image description here

With \Bigg and friends, you don't need to have the matching in the same line.

  • Besides, the syntax of it is much easier than using left and right, since you needn't to define the a null left. or right., when break a large equation. – wayne Sep 21 '15 at 7:39
  • 4
    \Bigg is too big; better \bigg, in this case. Also use \biggl(\, with a thin space when a summation with a wide subscript follows – egreg Sep 21 '15 at 8:31
5

The problem appears because the \right] is paired with the corresponding \left., and sized according to what appears between the two. It does not try to resize according to what was in the previous line, because it is a totally different expression to him.

If you want the lower brackets to be the same size as the ones above, you have to trick them into thinking that their content is as large as the one above.

You can achieve that using the command \vphantom: it creates an empty object with the same height as its argument.

As already mentioned in the comments of the other answer, the syntax is more inconvenient than manually sizing the delimiters. At that cost, the delimiters will automatically resize to accomodate changes of content (if you maintain the content of the \vphantom as well).

Here is a (simplified) example:

\documentclass[]{article}
\usepackage{amsmath}
\begin{document}
Without \verb|\vphantom|:
\begin{align*}
  E = & \left[ \sum_{i=1}^{n} \frac{a^{b^{c}}}{i^{i}} \right. \\
  & \left. + 2 \right]
\end{align*}

With \verb|\vphantom|:
\begin{align*}
  E =& \left[ \sum_{i=1}^{n} \frac{a^{b^{c}}}{i^{i}} \right. \\
  &\left. + 2
   \vphantom{\sum_{i=1}^{n} \frac{a^{b^{c}}}{i^{i}}} % I just copied the first line into the vphantom
  \right] 
\end{align*}

\end{document}

enter image description here

  • Thank you very much for your answer, the solution is great and impressive. I wish I could accept two answers. – wayne Sep 21 '15 at 11:40

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.