Problem with { and } when splitting equation into two lines

I am using the following equation which works perfect when it is a single-line equation:

$$\mathrm{NPIF}^\ast_i \mathrel{\mathop:}= \sum_{j=1}^{\mathrm{N}_\mathrm{L}} \biggl\{ w_{\mathrm{L},j} \, \tilde{l}_j \left[ \mathrm{PTDF}^{\left[ k_+ \right]}_{ij} \, \bigl( x_{\mathrm{L,max},j}^{\left[ k_+ \right]} \bigr)^{\mathrm{n}_1} + \mathrm{PTDF}^{\left[ k_- \right]}_{ij} \, \bigl( x_{\mathrm{L,min},j}^{\left[ k_- \right]} \bigr)^{\mathrm{n}_1} \right] \biggr\}$$


I would like to break this equation into two lines using the splitenvironment:

$$\begin{split} \mathrm{NPIF}^\ast_i \mathrel{\mathop:}= \sum_{j=1}^{\mathrm{N}_\mathrm{L}} \biggl\{ w_{\mathrm{L},j} \, \tilde{l}_j \left[ \mathrm{PTDF}^{\left[ k_+ \right]}_{ij} \, \bigl( x_{\mathrm{L,max},j}^{\left[ k_+ \right]} \bigr)^{\mathrm{n}_1} \\ + \mathrm{PTDF}^{\left[ k_- \right]}_{ij} \, \bigl( x_{\mathrm{L,min},j}^{\left[ k_- \right]} \bigr)^{\mathrm{n}_1} \right] \biggr\} \end{split}$$


The last code gives me a ! Extra }, or forgotten \right. error. I tried to close the two brackets in the first line by using \right. \right. and a corresponding \left. \left. on the second line but this did not solve the error... Any ideas?

• Left right constructions cannot be broken. Scale the fences manually using the four big levels. Then breaks are supported. Btw: next time please post a full minimal example next time. That makes it a lot easier for others to help. Jul 27 '17 at 18:01
• You can also use \left{ \right. or \left. \right} where the . (dot) closes a \left \rightpair without printing it. See tex.stackexchange.com/questions/380641 for example. Jul 27 '17 at 20:17

You have \left in one line and the matching \right in the other one: this is not allowed.

Also, there's no need that outer parentheses are larger than inner ones; in this case \Big size is enough; also the square brackets are in the same size for ease of reading. The alignment point can be at “PDTF”, in order to exploit the symmetry.

I introduced a shorthand for \mathrm; a more semantic command is better anyway (change the name into one that suits you best). I'm not sure about \mathrm applied to the exponent n_1, though. I'm also dubious about the usefulness of the braces.

\documentclass{article}
\usepackage{mathtools}

\newcommand{\rv}[1]{\mathrm{#1}}

\begin{document}

$$\begin{split} \rv{NPIF}^\ast_i \coloneqq \sum_{j=1}^{\rv{N}_\rv{L}} \Bigl\{ w_{\rv{L},j} \tilde{l}_j \Bigl[ & \rv{PTDF}^{[k_+]}_{ij} (x_{\rv{L,max},j}^{[ k_+]} )^{\rv{n}_1} \\ {} + {} & \rv{PTDF}^{[k_-]}_{ij}( x_{\rv{L,min},j}^{[k_-]})^{\rv{n}_1} \Bigr] \Bigr\} \end{split}$$

\end{document}


In your case you want to break the line at the + sign. Therefore you have one open \left in the first line and an open \right in the second line.

So you need one \right. in the first line and one \left. in the second line (see the marked lines <======== in the following MWE).

The following MWE compiles with no errors:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

$$\mathrm{NPIF}^\ast_i \mathrel{\mathop:}= \sum_{j=1}^{\mathrm{N}_\mathrm{L}} \biggl\{ w_{\mathrm{L},j} \, \tilde{l}_j \left[ \mathrm{PTDF}^{\left[ k_+ \right]}_{ij} \, \bigl( x_{\mathrm{L,max},j}^{\left[ k_+ \right]} \bigr)^{\mathrm{n}_1} + \mathrm{PTDF}^{\left[ k_- \right]}_{ij} \, \bigl( x_{\mathrm{L,min},j}^{\left[ k_- \right]} \bigr)^{\mathrm{n}_1} \right] \biggr\}$$

$$\begin{split} \mathrm{NPIF}^\ast_i \mathrel{\mathop:}= \sum_{j=1}^{\mathrm{N}_\mathrm{L}} \biggl\{ w_{\mathrm{L},j} \, \tilde{l}_j \left[ \mathrm{PTDF}^{\left[ k_+ \right]}_{ij} \, \bigl( x_{\mathrm{L,max},j}^{\left[ k_+ \right]} \bigr)^{\mathrm{n}_1} \right.\\ % <===================================================== + \left. % <======================================================== \mathrm{PTDF}^{\left[ k_- \right]}_{ij} \, \bigl( x_{\mathrm{L,min},j}^{\left[ k_- \right]} \bigr)^{\mathrm{n}_1} \right] \biggr\} \end{split}$$

\end{document}

• Which of course have issues if the material of the two parts does not have the same height. Just leaving this comment for others who come by. Jul 28 '17 at 16:33