[Tex/LaTex] How to make \left, \right pairs of delimiter work over multiple lines

math-mode

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?

Best Answer

The breqn package is a package that defines a set of new math environments, with the purpose of enabling automatic line breaking of displayed math. These new environments also let you have \left and \right on different lines, though it is not the main goal of the package.

Note that the package has several known problems and incompatibilities, so depending on your use case it might not be for you. I recommend a look at the manual.


The example below is one where you definitely shouldn't use \left and \right in the first place, but it serves to illustrate that it works. The dmath environment is similar to equation.

enter image description here

\documentclass{article}
\usepackage{geometry}
\geometry{a5paper, margin=5cm}

\usepackage{breqn}
\begin{document}
Automatic breaking:
\begin{dmath}
55 - \left(1+2+3+4+5+6+7+8+9+10\right) = 0
\end{dmath}

Manually breaking a line seems to work as well:
\begin{dmath}
55 - \left(1+2+3+4+\\5+6+7+8+9+10\right) = 0
\end{dmath}
\end{document}
Related Question