0

I'm having a vertical spacing problem when I show four equations, in two columns. This MWE shows the problem:

\documentclass[11pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}

\begin{document}

\begin{align}
    \nabla \cdot \vec{E} &= 0,
    &\nabla \times \vec{E} &= -\: \frac{\partial \vec{B}}{\partial t}, \\
    \nabla \cdot \vec{B} &= 0,
    &\nabla \times \vec{B} &= +\: \frac{\partial \vec{E}}{\partial t}.
\end{align}
Blablabla bla bla blabla:
\begin{align}
\begin{split}
    \nabla \cdot \vec{E} &= 0, \\
    \nabla \cdot \vec{B} &= 0,
\end{split}
&
\begin{split}
    \nabla \times \vec{E} &= -\: \frac{\partial \vec{B}}{\partial t}, \\
    \nabla \times \vec{B} &= +\: \frac{\partial \vec{E}}{\partial t}.
\end{split}
\end{align}

\end{document}

The first set of equations is perfect, but I need a single tag number for the whole set, instead of two tag numbers. So I used the split environment for a second set of identical equations.

Preview with the problem shown in red:

enter image description here

What am I doing wrong? How can I make the vertical spacing exactly the same for the two columns? Is there a way to do this without adding a \vphantom part?

The winner wins a cookie.

4
  • The \: commands should be removed.
    – egreg
    Mar 14 '20 at 20:57
  • @egreg, why? Without them, there's not enough space between - and the fraction.
    – Cham
    Mar 14 '20 at 20:58
  • Which is the normally used way.
    – egreg
    Mar 14 '20 at 20:59
  • @egreg, well I always found this very ugly, and not clear enough. I believe there should be a bit more space there, so that's why I use \:.
    – Cham
    Mar 14 '20 at 21:00
1

enter image description here

\documentclass[11pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{mathtools}

\begin{document}

\begin{align}
    \nabla \cdot \vec{E} &= 0,
    &\nabla \times \vec{E} &= -\: \frac{\partial \vec{B}}{\partial t}, \\
    \nabla \cdot \vec{B} &= 0,
    &\nabla \times \vec{B} &= +\: \frac{\partial \vec{E}}{\partial t}.
\end{align}

Blablabla bla bla blabla:
\begin{equation}
\begin{alignedat}{2}
    \nabla \cdot \vec{E} &= 0,\qquad&\nabla \times \vec{E} &= -\: \frac{\partial \vec{B}}{\partial t}, \\[\jot]
    \nabla \cdot \vec{B} &= 0,&\nabla \times \vec{B} &= +\: \frac{\partial \vec{E}}{\partial t}.
\end{alignedat}
\end{equation}



\end{document}
4
  • Well, now the horizontal spacing is too small.
    – Cham
    Mar 14 '20 at 20:34
  • @Cham, instead of qquad use \hspace{5em} ...
    – Zarko
    Mar 14 '20 at 20:35
  • @Zarko or 100cm is even bigger Mar 14 '20 at 20:38
  • Why use alignedat? Why not just aligned? Mar 14 '20 at 21:07

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.