[Tex/LaTex] Aligning a set of equations with one equation number

amsmathequationsmath-mode

The following set of equations cannot be aligned from left to right. Since, I need to index them just with one number, I had to use split equations:

\begin{equation}
\begin{split}
X={}^ 2 \bar{x} + {}^ 1 z \\
Y={}^ 1 \bar{x} + {}^ 2 z + {}^ 2 \bar{w} \\
W= {}^ 1 y\\
Z={}^ 1 w
\end{split}
\label{eq: logical 1}
\end{equation}

Any suggestion please?

Best Answer

\documentclass{article}

\usepackage{amsmath}
\begin{document}

\begin{equation}
\begin{split}
&X={}^ 2 \bar{x} + {}^ 1 z \\
&Y={}^ 1 \bar{x} + {}^ 2 z + {}^ 2 \bar{w} \\
&W= {}^ 1 y\\
&Z={}^ 1 w
\end{split}
\label{eq: logical 1}
\end{equation}

However probably better:

\begin{equation}
\begin{aligned}
X&={}^ 2 \bar{x} + {}^ 1 z \\
Y&={}^ 1 \bar{x} + {}^ 2 z + {}^ 2 \bar{w} \\
W&= {}^ 1 y\\
Z&={}^ 1 w
\end{aligned}
\label{eq: logical 1}
\end{equation}

\end{document}

enter image description here

Related Question