4
\begin{align}

&\vec{\nabla} \cdot \vec{E} = \frac{\rho}{\epsilon_0} & \text{Gauss’s Law}\\

&\vec{\nabla} \cdot \vec{B} = 0 & \text{Gauss’s Law for Magnetism}

\end{align}

enter image description here

12

. You've forgotten that n alignment points requires 2n -1 ampersands: one to introduce each alignment column but the first, and one for each alignment point in its column. So try this:

\begin{align}    
\vec{\nabla} \cdot \vec{E} &= \frac{\rho}{\epsilon_0} & &\text{Gauss’ Law}\\
\vec{\nabla} \cdot \vec{B} &= 0 & &\text{Gauss’ Law for Magnetism}    
\end{align}
2
  • 4
    Also, you can't have a blank line in an align environment.
    – Teepeemm
    Oct 21 at 17:39
  • @Teepeem: That's right. I mainly focused on the number of ampersands, so I forgot this point. Thanks for pointing it!
    – Bernard
    Oct 21 at 17:44
3

A different approach using a simple enviroment array where I have used a different aesthetic of LaTeX-code. It is possible also to use also alignat instead of an array.

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\begin{document}
\[
\begin{array}{lll}
\boldsymbol{\nabla}\cdot \mathbf{E} = \dfrac{\rho}{\epsilon_0} &\qquad \text{Gauss's Law}\\
\boldsymbol{\nabla}\cdot \mathbf{B} = \mathbf{0} &\qquad  \text{Gauss's Law for Magnetism} 
\end{array}
\]
\end{document}

enter image description here

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.