111

I have a very long equation that must be separated into two lines, and it has several pairs of nesting \left \right delimiters. Unfortunately, it seems that they need to be on the same line in order for them to work.

Also I'm using the align environment because I need the aligning functionality. Is there a way to have the size of delimiters automatically adjusted over multiple lines?

41

The breqn package allows for automatic line breaking of equations, and for having \left and \right on different lines.

7
  • 1
    Is it compatible with amsmath and amssym? Oct 13 '11 at 9:10
  • 2
    @TobiasKienzler Judging from the manual, yes, but load breqn after any other packages dealing with math, such as those you mentioned. Oct 13 '11 at 9:16
  • 1
    Warning that breqn package caused errors in my existing align equations; seemed to be related to the underset command. Using virtual dot delimiters (\right.) was a much simpler solution in this case - the answer by Mark Mikofski
    – JStrahl
    Apr 30 '18 at 13:08
  • 1
    breqn and package for allowing big brackets over more than one line. 119 pages of packages documentation. Welcome to Latex.
    – spinkus
    Oct 15 '19 at 7:10
  • 3
    Would be good to add an example to this.
    – kennyB
    Nov 14 '19 at 23:53
81

You can't.

You can use some thing like \biggl, \biggr, or \left.\vphantom{...}\right). For example:

\[
\begin{split}
a &= \left( \frac12 + \frac13 + \frac14 \right. \\
  &\quad \left. {}+ a + b + c \vphantom{\frac12}\right)
\end{split}
\]
11
  • 9
    Note that the alignment points (the &s) have to be outside the \left/\right.
    – Lev Bishop
    Jun 22 '11 at 3:30
  • Could one modify \left and \right to include \vphantoms of all the lines in between? Oct 13 '11 at 9:12
  • 3
    @TobiasKienzler: It's not easy to determine what to put in the \vphantom. TeX cannot understand the meaning of the equations. Anyway, you can use breqn.
    – Leo Liu
    Oct 13 '11 at 13:14
  • Do you know whether it is possible to get this kind of pre-formatting from Mathematica for large system of equations? More here.
    – hhh
    Oct 14 '12 at 1:19
  • 1
    This is a better answer for more general situations.
    – Ziqi Fan
    Jan 3 at 13:47
48

The solution for me was to use virtual dot delimiters

\frac{\partial F}{\partial x} &= \left[ \frac{\partial y}{\partial z} \right. \\
                              &* \left. \frac{\partial z}{\partial x} \right]

which was the comment posted by percusse in this question which was marked as a duplicate.

The virtual dot delimiters are in Leo Liu's answer above, but a TeX n00b like me wouldn't have seen it.

FYI Sphinx-1.1.3 already supports multi-line math with the math directive using the AmSMath LaTeX package, i.e. breqn is not necessary.

3
  • 3
    This doesn't give the right sizes if the material on the first and second lines have different height. Leo Liu's answer corrects for this by adding the \vphantom. Nov 13 '12 at 23:09
  • Thanks eldering, that's very good to know! Nov 14 '12 at 6:57
  • I could not see where sphinx makes a line break with \left in the link which you provided. How does sphinx solve the problem? Apr 15 '17 at 19:54
7

Have a look at the nath package.

3
  • 1
    Is it compatible with amsmath? Oct 13 '11 at 9:08
  • 2
    @Tobias: No. As I know, it is uncommon to use nath.
    – Leo Liu
    Oct 13 '11 at 13:12
  • 2
    @Tobias: nath is incompatible with amsmath; it does provide some support for multi-line display, and lot of nice features like automatic scaling of delimiters (no need for \left ... \right) that also works across line breaks, ignoring the height of the subscripts and superscripts (of operators like \sum) when calculating the scaling of delimiters, smart display of \frac, amongst others which do are cumbersome when using amsmath.
    – Aditya
    Oct 13 '11 at 16:34
0

I had the same problem. I wanted to show this equation

\begin{equation*}
    V_{sal} = -\left(1.V_8 + \frac{1}{2}.V_7 + \frac{1}{8}.V_6 +\frac{1}{8}.V_5  + \frac{1}{16}.V_4 \right.\\
     \left. + \frac{1}{32}.V_3 + \frac{1}{64}.V_2 + \frac{1}{128}.V_1\right) 
\end{equation*}

but since it is too long (in a two column document), I used multline enviroment but it gives an error (something like Missing \right. inserted. \end{multline*} or Extra \right. \end{multline*}). I solved it with this new code

\begin{multline*}
V_{sal} = -\left(1.V_8 + \frac{1}{2}.V_7 + \frac{1}{8}.V_6 +\frac{1}{8}.V_5  + \frac{1}{16}.V_4 \right.\\
 \left. + \frac{1}{32}.V_3 + \frac{1}{64}.V_2 + \frac{1}{128}.V_1\right) 
\end{multline*}

Note that I added a \right. at the end of the first row and \left. at the beginning of the second row.

1
  • 1
    Welcome to TeX.SE! Your answer is the same as of @Mark Mikofski (difference are only in used parenthesis/ bracked.
    – Zarko
    Jan 10 at 15:39

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.