# Right bracket not large enough in the align environment with split \left[ and \right ]' commands

when I split \left[ and \right] in the align environment and use breqn the equation doesn't compile. When I add \left. and \right. as virtual left and right delimiters, it works, but the \right] bracket does not have the right size.

Here is the minimal example:

\documentclass{minimal}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{breqn}

\newcommand{\Sf}{\mathbf{S}_f}
\newcommand{\U}{\mathbf{U}}

\begin{document}

\begin{align}
\left(\frac{\partial \phi}{\partial t}\right)_c^{n+1}  =
\dfrac{0.5}{\Omega_c} & \left[ \sum_f D_f \gradphi{f}^{n+1} \cdot \Sf + \sum_f D_f \gradphi{f}^n \cdot \Sf - \right. \nonumber \\
& - \sum_f \U_f \phi_f^{n+1} \cdot \Sf  - \sum_f \U_f \phi_f^{n} \cdot \Sf \nonumber \\
& \left. + S(\phi_c^n) + S(\phi_c^{n+1}) \right] + O(\delta t^2) + O(h^2)
\label{eq:phicrank}
\end{align}

\end{document}


and it generates this:

How can I obtain the right size for the bracket in the \right] command? Thanks!

• you have not specified that they should be the same size. However it is usually best to avoid \left\right and use \Biggl[ and \Biggr] choosing a suitable big variant name, then the issue does not arise. Mar 16 '20 at 16:09

Also Papeeria, that it is a tool online to write in LaTeX, it starts with a \documentclass named article (see the important comments of Schrödinger's cat). After you should read also the important comment of @David Carlisle: \Biggl+( or with [ etc. can be used when you split a formula without mistakes. To the end I have moved & of the your code to have a fine alignment.

\documentclass[12pt]{article}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{breqn}%<---Why do you use this package?

\newcommand{\Sf}{\mathbf{S}_f}
\newcommand{\U}{\mathbf{U}}

\begin{document}

\begin{align}
\Bigl(\frac{\partial \phi}{\partial t}\Bigr)_c^{n+1} & =
\dfrac{0.5}{\Omega_c}\Biggl[ \sum_f D_f \gradphi{f}^{n+1} \cdot \Sf + \sum_f D_f \gradphi{f}^n \cdot \Sf \nonumber \\
& - \sum_f \U_f \phi_f^{n+1} \cdot \Sf  - \sum_f \U_f \phi_f^{n} \cdot \Sf \nonumber \\
&  + S(\phi_c^n) + S(\phi_c^{n+1}) \Biggr] + O(\delta t^2) + O(h^2)
\label{eq:phicrank}
\end{align}
\end{document}


• I found an answere here stating that breqn helps with this issue, it doesn't. I have to remove it. Mar 16 '20 at 17:10

You can use a \vphantom.

\documentclass{article}% don't use \documentclass{minimal} see https://tex.stackexchange.com/q/42114

\usepackage{amssymb}
%\usepackage{breqn} % <-don't use

\newcommand{\Sf}{\mathbf{S}_f}
\newcommand{\U}{\mathbf{U}}

\begin{document}

\begin{align}
\left(\frac{\partial \phi}{\partial t}\right)_c^{n+1}  =
\dfrac{0.5}{\Omega_c} & \left[ \sum_f D_f \gradphi{f}^{n+1} \cdot \Sf + \sum_f D_f \gradphi{f}^n \cdot \Sf - \right. \nonumber \\
& - \sum_f \U_f \phi_f^{n+1} \cdot \Sf  - \sum_f \U_f \phi_f^{n} \cdot \Sf \nonumber \\
& \left. + S(\phi_c^n) + S(\phi_c^{n+1}) \vphantom{\sum_f}\right] + O(\delta t^2) + O(h^2)
\label{eq:phicrank}
\end{align}

\end{document}


• Thanks for the additional info about the other packages I am misusing. The answer with \Biggl and \Biggr seems cleaner than injecting additional \left. and \right.`.. Mar 16 '20 at 17:12