0

I've got a system of equations that I can't seem to be able to properly aligned. I've attached an image of how I want to align the equations - all the red points aligned together, and all the blue together.

The code I have currently is below

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align} ik\widehat{\text{v}{{x}}} + \frac{d\widehat{\text{v}{z}}}{dz}={}&0, \label{massLin} \ \left[\widehat{T} - St, \widehat{\phi} \right]\sigma + \widehat{\text{v}{{z}}} ={}& \left(-k^2 + \frac{d^2}{dz^2}\right)\widehat{T}, \label{HeatLin} \ \bigg[\widehat{S} - \frac{\rho{\text{s}}}{\rho_{\text{l}}}\bigg(\mathcal{L} + \frac{1}{2}+ z\bigg)\widehat{\phi}{}& \bigg]\sigma + \widehat{\text{v}{{z}}} \nonumber \ = \tau {}& \left(-k^2 + \frac{d^2}{dz^2}\right)\widehat{S}, \label{saltLine} \ \sigma\widehat{\text{v}{{x}}} = -ik\widehat{P} + Pr {}& \left(-k^2 + \frac{d^2}{dz^2}\right)\widehat{\text{v}{{x}}}, \label{vxLin} \ \sigma\widehat{\text{v}{{z}}} = -\frac{d\widehat{P}}{dz} + Pr{}&\left(-k^2 + \frac{d^2}{dz^2}\right)\widehat{\text{v}{{z}}} \nonumber \ +Pr,Ra{\text{T}}\bigg(1+\frac{\beta}{\Gamma \alpha}{}& \bigg)\widehat{T} + Pr,{Ra}_{\phi},\widehat{\phi}, \label{vzLin} \ \widehat{S} - \widehat{T} = 0, \label{LiquidusLin} \end{align}

\end{document}

I just cannot seem to get this. Any help is very appreciated. enter image description here

Bernard
  • 271,350
John
  • 101
  • 1
    Hi, please can you add a complete minimal example to be compiled your code? – Sebastiano May 30 '21 at 21:08
  • 1
    Have done so now – John May 30 '21 at 21:12
  • Do you know the alignat enviroment? – Sebastiano May 30 '21 at 21:17
  • I've not come across that before? – John May 30 '21 at 21:22
  • You can use also flalign: https://tex.stackexchange.com/questions/209645/aligning-equations-with-left-and-right-comment – Sebastiano May 30 '21 at 21:29
  • 4
    It's going to be difficult to align all of these as you have indicated, since two lines have material that's wider than the "allowed" component of an aligned display. The first line of (24) and the second line of (26) will need to be artificially adjusted using \mathrlap and \mathllap from the \mathtools package. See the package documentation for instructions and examples. The alignat environment is provided by amsmath and well documented in the user guide {texdoc amsldoc). – barbara beeton May 30 '21 at 21:39
  • 1
    To align the red points as well as the blue ones, larger spaces in the equation will appear on some lines because the equations are not the same size. – CrocoDuck May 30 '21 at 23:05

0 Answers0