[Tex/LaTex] Equations aligned center

alignequationshorizontal alignmentnumberingsubequations

The following code

\begin{equation} \label{eq:test}
\begin{aligned} 
A=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\
B=BBBBBBBBBBBBBBBB\\
C=CCCCC, D=DDDDDDD\\    
E=EEEEE, F=FFFFFFF
\end{aligned}
\end{equation}

Alligns the equations from right while I need them to be at the center. Using gather does not allow me to give number to my equation. What is the standard way to implement what I intend to do?

enter image description here

Best Answer

If you want to have each equation centered rather than aligned on some specific point (such as the first = symbol), you should use a gathered environment instead of an aligned environment.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation} \label{eq:test}
\begin{gathered}
A=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\
B=BBBBBBBBBBBBBBBB\\
C=CCCCC, D=DDDDDDD\\
E=EEEEE, F=FFFFFFF
\end{gathered}
\end{equation}
\end{document} 

result