[Tex/LaTex] How to left align text inside a gathered equation environment

equations

I am currently trying to add an equation to my thesis and due to the length of it I would like to use short hand to split the equation up. What I would like to achieve is a equation with two line breaks, followed by a left aligned where, and the other equations under one gathered environment with the equation number aligned to the top line. I have achieved most of this but I cannot get the "where" line left aligned in a gathered environment, I have tried \intertext and it doesn't appear to work when using gathered. Any suggestions?

\begin{equation}\label{eq:triclinic(hkl)}
        \begin{gathered}[t]
        \frac{1}{d^2} = \frac{1}{V^2} (S_{11}h^2 + S_{22} k^2 + S_{33} \ell^2 + 2S_{12}hk + 2S_{23}k\ell + 2S_{13}h\ell)\\~\\
        \text{where}\\~\\
        V      = abc \sqrt{1 - cos^2(\alpha) - cos^2(\beta) - cost^2(\gamma) + 2cos(\alpha) cos(\beta) cos(\gamma)}\\
        S_{11} = b^2c^2sin^2(\alpha)\\
        S_{22} = a^2c^2sin^2(\beta)\\
        S_{33} = a^2 b^2 sin^2 (\gamma)\\
        S_{12} = abc^2 (cos(\alpha) cos(\beta) - cos(\gamma))\\
        S_{23} = a^2bc (cos(\beta) cos(\gamma) - cos(\alpha)\\
        S_{13} = ab^2c (cos(\gamma) cos(\alpha) - cos(\beta)\\
        \end{gathered}
    \end{equation}

Best Answer

You can set this in an align and use \notag to remove any equation numbers for equations you don't need numbered:

enter image description here

\documentclass{article}

\usepackage{mathtools}

\begin{document}

Original equation
\begin{equation}
  \begin{gathered}[t]
    \frac{1}{d^2} = \frac{1}{V^2} (S_{11}h^2 + S_{22} k^2 + S_{33} \ell^2 + 2S_{12}hk + 2S_{23}k\ell + 2S_{13}h\ell)\\~\\
    \text{where}\\~\\
    V      = abc \sqrt{1 - cos^2(\alpha) - cos^2(\beta) - cost^2(\gamma) + 2cos(\alpha) cos(\beta) cos(\gamma)}\\
    S_{11} = b^2c^2sin^2(\alpha)\\
    S_{22} = a^2c^2sin^2(\beta)\\
    S_{33} = a^2 b^2 sin^2 (\gamma)\\
    S_{12} = abc^2 (cos(\alpha) cos(\beta) - cos(\gamma))\\
    S_{23} = a^2bc (cos(\beta) cos(\gamma) - cos(\alpha)\\
    S_{13} = ab^2c (cos(\gamma) cos(\alpha) - cos(\beta)\\
  \end{gathered}
\end{equation}

Proposed improvement
\begin{align}
    \frac{1}{d^2} &= \frac{1}{V^2} \bigl( S_{11}h^2 + S_{22} k^2 + S_{33} \ell^2 + 2S_{12}hk + 2S_{23}k\ell + 2S_{13}h\ell \bigr) \\
\shortintertext{where}
         V &= a b c \sqrt{1 - \cos^2(\alpha) - \cos^2(\beta) - \cos^2(\gamma) + 2 \cos(\alpha) \cos(\beta) \cos(\gamma)} \notag \\
    S_{11} &= b^2 c^2 \sin^2(\alpha) \notag \\
    S_{22} &= a^2 c^2 \sin^2(\beta) \notag \\
    S_{33} &= a^2 b^2 \sin^2 (\gamma) \notag \\
    S_{12} &= a b c^2 \bigl( \cos(\alpha) \cos(\beta) - \cos(\gamma) \bigr) \notag \\
    S_{23} &= a^2 b c \bigl( \cos(\beta) \cos(\gamma) - \cos(\alpha) \bigr) \notag \\
    S_{13} &= a b^2 c \bigl( \cos(\gamma) \cos(\alpha) - \cos(\beta) \bigr) \notag
\end{align}

\end{document}