3

Happy lockdown. I am currently trying to align three split equations together while using the overbrace function to describe the functions of each section (they are symmetrical but for co-ordinate direction). The current code I have is:

\begin{align}
\label{eqn:mom2}
\begin{split}
    &x : \overbrace{\rho \frac{Du}{Dt}}^\text{Convection} = \overbrace{\rho g_x - \frac{\delta p}{\delta x} }^\text{Pressure} + \overbrace{\mu (\frac{\delta^2 u}{\delta x^2} + \frac{\delta^2 u}{\delta y^2} + \frac{\delta^2 u}{\delta z^2}) }^\text{Diffusion} 
    \\ 
    &y : \rho \frac{Dv}{Dt} = \rho g_y - \frac{\delta p}{\delta y} + \mu (\frac{\delta^2 v}{\delta x^2} + \frac{\delta^2 v}{\delta y^2} + \frac{\delta^2 v}{\delta z^2})
    \\ 
    &z : \rho \frac{Dw}{Dt} = \rho g_z - \frac{\delta p}{\delta z} + \mu (\frac{\delta^2 w}{\delta x^2} + \frac{\delta^2 w}{\delta y^2} + \frac{\delta^2 w}{\delta z^2}) 
\end{split}
\end{align}

If you see the attached, the presence of the overbracket misaligns the first equation line with the other two.

Would appreciate any help massively, causing a big headache!!

Thank you in advance,

Josh enter image description here

  • 1
    Welcome to TeX.SE. – Mico Mar 29 at 16:22
  • 1
    I also advise you to fix the round brackets that are too small :-)....and to put a complete code with the packages. Welcome again. – Sebastiano Mar 29 at 16:29
  • 1
    @Sebastiano - I've updated my answer to incorporte your suggestion. :-) – Mico Mar 29 at 16:32
4

You were very close! I suggest you encase \text{Convection} in a \mathclap directive, effectively making it have zero width. Separately, I would increase the size of the parentheses in the "diffusion" block.

enter image description here

\documentclass{article}
\usepackage{mathtools} % for \mathclap macro; loads 'amsmath' automatically
\begin{document}
\begin{equation}
\label{eqn:mom2}
\begin{split}
x :\quad {\overbrace{\rho \frac{Du}{Dt}}^{\mathclap{\text{Convection}}}} &= 
  {\overbrace{\rho g_x - \frac{\delta p}{\delta x} }^{\text{Pressure}}} 
  + {\overbrace{\mu \Bigl(\frac{\delta^2 u}{\delta x^2} 
  + \frac{\delta^2 u}{\delta y^2} 
  + \frac{\delta^2 u}{\delta z^2}\Bigr)\phantom{x} }^{\text{Diffusion}}}
\\ 
y :\quad \rho \frac{Dv}{Dt} &= 
  \rho g_y - \frac{\delta p}{\delta y} 
  + \mu \Bigl(\frac{\delta^2 v}{\delta x^2} 
  + \frac{\delta^2 v}{\delta y^2} 
  + \frac{\delta^2 v}{\delta z^2}\Bigr)
\\ 
z :\quad \rho \frac{Dw}{Dt} &= 
  \rho g_z - \frac{\delta p}{\delta z} 
  + \mu \Bigl(\frac{\delta^2 w}{\delta x^2} 
  + \frac{\delta^2 w}{\delta y^2} 
  + \frac{\delta^2 w}{\delta z^2}\Bigr) 
\end{split}
\end{equation}
\end{document}
| improve this answer | |

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.