4

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{equation}
      \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{equation}
\end{document}

pic

  • 1
    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
6

Just use the "internal" form alignedat.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{equation}
  \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{equation}

\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
0

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...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.