# Center single line(s) in align

How is it able to center a single line in an align?

I want to center 0 = 0.

MWE:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
0 = 0\\
a &= b & c &= d\\
a &= b & c &= d\\
a &= b & c &= d\\
a &= b & c &= d
\end{align*}

\end{document}

• This question contains some possibly relevant information regarding using aligned together with gather*. Mar 5 '19 at 15:42
• @barbarabeeton I'm unsure what exactly you want to point out
– Ben
Mar 5 '19 at 16:28
• The answers contain examples using both gather* and aligned, although only a single "column" is aligned. This might not be an obvious help to you, but it might help some future person loolking for information. Mar 5 '19 at 17:24

To have more or less the spacing of the original code, I'd use the alignedat environment, to have full control on the spacing:

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\begin{gather*}
0 = 0\\
\begin{alignedat}{2}
a &= b &\hspace{10em} c &= d\\
a &= b & c &= d\\
a &= b & c &= d\\
a &= b & c &= d
\end{alignedat}
\end{gather*}

\end{document}


• Is it possible, to align the 0=0 with a more equations -0=0, ...?
– Ben
Mar 5 '19 at 13:47
• Not sure to fully see what you want, but try nesting them in another aligned environment. Mar 5 '19 at 14:17
• This works. Another question: Did YOU choose the space 10em freely? AMS splits the hole free horizontal space around and in-between the equations equally, doesn't it?
– Ben
Mar 5 '19 at 14:24
• Actually &\hspace{10em}c denotes the l.h.s. of the 2nd column of alignment. This l.h.s. is right-aligned w.r.t. the following &=. Mar 5 '19 at 14:36
• I'm unsure, if I got this right. Especially I'm unsure, what l.h.s. stands for... I guess alignedat is just an aligned with zero space between the equations, right?
– Ben
Mar 5 '19 at 16:34
\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{gather*}
0 = 0\\
\begin{aligned}
a &= b & c &= d\\
a &= b & c &= d\\
a &= b & c &= d\\
a &= b & c &= d
\end{aligned}
\end{gather*}

\end{document}


• :-( Also I was using gathered package :-) LOL. Mar 5 '19 at 12:44
• @Sebastiano Great minds think alike! Mar 5 '19 at 12:45