Equations – Gather vs Aligned for Centered Equation with One Number

equations

What is the way to achieve something between gather and aligned?

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[utf8]{inputenc}

\begin{document}
\begin{gather}
    3(a-x) = 3.5x + a - 1 \\
    3a - 3x = 3.5x + a -1 \\
    a = \frac{13}{4}x - \frac{1}{2} 
\end{gather}

\begin{equation}
    \begin{aligned}
        3(a-x) = 3.5x + a - 1           \\
        3a - 3x = 3.5x + a -1           \\
        a = \frac{13}{4}x - \frac{1}{2} 
    \end{aligned}
\end{equation}
\end{document}

Result:

enter image description here

But…
How to achieve something like this? I'd like to keep the centering.
enter image description here

Is this possible somehow?

Best Answer

The gathered environment, used within math mode, is what you're looking for.

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{equation}
\begin{gathered}
3(a-x) = 3.5x + a - 1 \\
3a - 3x = 3.5x + a - 1 \\
a = \frac{13}{4}x - \frac{1}{2}
\end{gathered}
\end{equation}
\end{document}

output

Wikibooks LaTeX has a fairly nice list of the different kinds of equation and align environments.