我有这张图片,我想在 latex 中重新创建它。方程式必须左对齐,方程式旁边的文本必须右对齐,还必须包含方程式的编号。我试过 \begin{subequations} 、 \begin{arrays} 、 \begin{align} ,但我无法获得对齐和编号。
以下是我没有对齐的代码
"Maxwell's equations" are named for James Clark Maxwell and are as follow:
\begin{equation}
\overrightarrow{\nabla} \cdot \overrightarrow{E}\quad =\quad \frac{\rho}{\epsilon_0} \text{{Gauss's Law}}
\end{equation}
\begin{equation}
\overrightarrow{\nabla} \cdot \overrightarrow{B}\quad = \quad 0 \text{{Gauss's Law for Magnetism}}
\end{equation}
\begin{equation}
\overrightarrow{\nabla} \times \overrightarrow{E}\quad = \quad - \frac{\partial \overrightarrow{B} }{\partial t} \text {{Faraday's Law of Induction}}
\end{equation}
\begin{equation}
\overrightarrow{\nabla} \times \overrightarrow{B} \quad = \quad \frac{\mu_0}{\epsilon_0} \text{{Ampere's Circuital Law}}
\end{equation}
答案1
这可以通过使用标准align
环境来实现:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
``Maxwell's equations'' are named for James Clark Maxwell and are as follow:
\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} \\
\vec{\nabla} \times \vec{E} &= -\frac{\partial \vec{B}}{\partial t} &&
\text{Faraday's Law of Induction} \\
\vec{\nabla} \times \vec{B} &= \mu_0 \biggl( \epsilon_0 \frac{\partial \vec{E}}{\partial t} + \vec{J} \biggr) &&
\text{Ampere's Circuital Law}
\end{align}
\end{document}