Is there an environment similar to alignat, but embedded in a single equation?

As explained in this answer, the difference between align and alignat lies chiefly in the presence of some spacing between even and odd columns.

I would like to get the same result as with alignat (i.e. no spacing) but with a unique equation tag, similar to the use of aligned within equation (which adds spacing in the same way as align)

mwe

\documentclass[preview]{standalone}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\begin{document}
I would like the same spacing as in:
\begin{alignat}{2}
\nu_n &= \mu_n \vec{F}_n &&= - \mu_n \nabla\phi_n\\
\nu_p &= \mu_p \vec{F}_p &&= - \mu_p \nabla\phi_p,
\end{alignat}
but with only one tag, as in:
\begin{aligned} \nu_n &= \mu_n \vec{F}_n &&= - \mu_n \nabla\phi_n\\ \nu_p &= \mu_p \vec{F}_p &&= - \mu_p \nabla\phi_p \end{aligned}.
\end{document}


• you might try taking a look at the amsmath user's guide (texdoc amsmath). it covers all the possibilities in very few pages. – barbara beeton Dec 8 '15 at 14:17

Just use the "internal" form alignedat.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{alignedat}{2} \nu_n &= \mu_n \vec{F}_n &&= - \mu_n \nabla\phi_n\\ \nu_p &= \mu_p \vec{F}_p &&= - \mu_p \nabla\phi_p, \end{alignedat}

\end{document}


You may want to add a small negative space \! in front of the alignedat environment, see e.g. here.

• wow i was looking for an alignedat environment exactly.... but when i tried something was wrong in my code (errors showed up), so i thought that ther was no alignedat ended up googling.. but nothing showed up for alignedat! – Davide Dec 8 '15 at 13:28

a partial solution may be to use subequations:

\documentclass[preview]{standalone}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\begin{document}
\begin{subequations}\label{both:equations}
\begin{alignat}{2}
\nu_n &= \mu_n \vec{F}_n &&= - \mu_n \nabla\phi_n\\
\nu_p &= \mu_p \vec{F}_p &&= - \mu_p \nabla\phi_p,
\end{alignat}
\end{subequations}
\end{document}


which allows to reference both equations with one number - but still produces two tags...