# Align multiple short and long equations

Can someone help me with this? I tried already many of the other similar suggestions, but none of them seem to give the results i would like. I have a set of short and long equations

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{subequations}
\begin{gather}
\mathcal{C}\left(\vec{u}_h,q_h, \rho\right)  = \mathcal{B}^1(q_h),\label{DiscretizedConti} \\
\mathcal{U}^C\left(\vec{u}_h,\vec{u}_h,\vec{v}_h, \rho\right) + \mathcal{U}^P\left(p_h,\vec{v}_h\right) + \frac{1}{\text{Re}}\mathcal{U}^D\left(\vec{u}_h,\vec{v}_h,\mu\right) + \frac{1}{\text{Fr}^2}\mathcal{U}^S\left(\rho, \vec{v}_h\right) = \mathcal{B}^2(\vec{v}_h),  \\
\mathcal{S}^C\left(\vec{u}_h,T_h,r_h, \rho\right) + \frac{1}{\text{Re}~\text{Pr}}\mathcal{S}^D\left(T_h,r_h,k/c_p(T_h)\right) + \text{H}~\textbf{Da} ~ \mathcal{S}^S\left(r_h, Q(T_h,\vec{Y}_h), \omega(T_h,\vec{Y}_h),c_p\right) = \mathcal{B}^3(r_h),  \\
\mathcal{S}^C\left(\vec{u}_h,Y_i, s_{\alpha h}, \rho\right) + \frac{1}{\text{Re}~\text{Pr}~\text{Le}\alpha}\mathcal{S}^D\left(Y_i,s_{\alpha h},\rho\right) + \mathcal{M}^S_\alpha\left(s_{\alpha h},\omega(T_h,\vec{Y}_h )\right) = \mathcal{B}^3(s_{\alpha h}).
\end{gather}
\end{subequations}
\end{document}


I would like to get something like this

thank you for your help/ suggestions!

• Off-topic: Do please replace all instances of \textbf and \text with \mathbf and \mathrm, respectively.
– Mico
Sep 21, 2022 at 20:10

Like this?

With use of the multlined environment defined in the mathtools package:

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\begin{subequations}
\begin{gather}
\mathcal{C}\left(\vec{u}_h,q_h, \rho\right)
= \mathcal{B}^1(q_h),\label{DiscretizedConti} \\
\begin{multlined}[0.7\linewidth]
\mathcal{U}^C\left(\vec{u}_h,\vec{u}_h,\vec{v}_h, \rho\right) +
\mathcal{U}^P\left(p_h,\vec{v}_h\right) +    \\
\frac{1}{\text{Re}}\mathcal{U}^D\left(\vec{u}_h,\vec{v}_h,\mu\right) +
\frac{1}{\text{Fr}^2}\mathcal{U}^S\left(\rho, \vec{v}_h\right) = \mathcal{B}^2(\vec{v}_h),
\end{multlined} \\
\begin{multlined}[0.7\linewidth]
\mathcal{S}^C\left(\vec{u}_h,T_h,r_h, \rho\right) +
\frac{1}{\text{Re}~\Pr}\mathcal{S}^D\left(T_h,r_h,k/c_p(T_h)\right) + \\
\text{H}~\mathbf{Da} ~ \mathcal{S}^S\left(r_h, Q(T_h,\vec{Y}_h), \omega(T_h,\vec{Y}_h),c_p\right)
= \mathcal{B}^3(r_h),
\end{multlined} \\
\begin{multlined}[0.7\linewidth]
\mathcal{S}^C\left(\vec{u}_h,Y_i, s_{\alpha h}, \rho\right) +
\frac{1}{\mathrm{Re}~\Pr ~\mathrm{Le}\alpha}\mathcal{S}^D\left(Y_i,s_{\alpha h},\rho\right) +\\
\mathcal{M}^S_\alpha\left(s_{\alpha h},\omega(T_h,\vec{Y}_h )\right)
= \mathcal{B}^3(s_{\alpha h}).
\end{multlined}
\end{gather}
\end{subequations}
\end{document}


How about flipping the left-hand and right-hand sides of the equations, so that the \mathcal{B} terms occur at the start instead of at the end of each equation? Making this change would allow a natural-looking use of an align environment.

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{subequations}
\begin{align}
\mathcal{B}^1(q_h)
&= \mathcal{C}(\vec{u}_h,q_h, \rho) \,, \label{DiscretizedConti} \\[1ex]
\mathcal{B}^2(\vec{v}_h)
&= \mathcal{U}^C(\vec{u}_h,\vec{u}_h,\vec{v}_h, \rho) + \mathcal{U}^P(p_h,\vec{v}_h)
+ \frac{1}{\mathrm{Re}}\mathcal{U}^D(\vec{u}_h,\vec{v}_h,\mu) \notag \\
&\quad + \smash{\frac{1}{\mathrm{Fr}^2}}\,\mathcal{U}^S(\rho, \vec{v}_h) \,,  \\[1ex]
\mathcal{B}^3(r_h)
&= \mathcal{S}^C(\vec{u}_h,T_h,r_h, \rho)
+ \frac{1}{\mathrm{Re}\,\mathrm{Pr}}\mathcal{S}^D\bigl(T_h,r_h,k/c_p(T_h)\bigr) \notag\\
&\quad + \mathrm{H}\,\mathbf{Da} \,\mathcal{S}^S \bigl(r_h, Q(T_h,\vec{Y}_h),
\omega(T_h,\vec{Y}_h),c_p\bigr) \,,  \\[1ex]
\mathcal{B}^3(s_{\alpha h})
&=\mathcal{S}^C(\vec{u}_h,Y_i, s_{\alpha h}, \rho)
+ \frac{1}{\mathrm{Re}\,\mathrm{Pr}\,\mathrm{Le}\,\alpha}
\mathcal{S}^D(Y_i,s_{\alpha h},\rho) \notag \\
&\quad + \mathcal{M}^S_\alpha \bigl(s_{\alpha h},\omega(T_h,\vec{Y}_h ) \bigr) \,.
\end{align}
\end{subequations}

\end{document}


Observe that I've removed all 11 pairs \left and \right sizing directives. They don't appear to be doing anything useful, but they do create an awful amount of code clutter.