麦克斯韦方程的结构和 Latex 中的编号

麦克斯韦方程的结构和 Latex 中的编号

请问我们该如何写这个:

在此处输入图片描述

谢谢。

答案1

一系列解决方案,注释可以左对齐或右对齐。对于后一种情况,这flalign将是理想的,但据我所知,没有flaligned环境允许一组方程式只有一个数字。

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry}
\usepackage[leqno]{mathtools}
\usepackage{chngcntr}
\counterwithin{equation}{section}
\usepackage[roman, thin, thinp, thinc]{esdiff}

\begin{document}

\setcounter{section}{1}
\texttt{Comments left-aligned: }

\begin{equation}
    \begin{alignedat}{3}
        & \hskip8em &\diffp{\mathcal D}{t}& = ∇ × \mathcal H & \hskip8em &\text{\rlap{(Loi de Faraday)}} \\[0.5ex]
        & & \diffp{\mathcal B}{t}& = -∇ × \mathcal E & &\text{\rlap{(Loi d'Ampère)}} \\[0.5ex]
        &\vphantom{\diffp{\mathcal B}{t}} &∇ · \mathcal B & =0 & &\text{\rlap{(Loi de Gauss)}} \\[0.5ex]
        &\vphantom{\diffp{\mathcal B}{t}} & ∇ · \mathcal D & =0 & &\text{\rlap{(Loi de Coulomb)}}
    \end{alignedat}
\end{equation}
\vskip0.5cm

\texttt{Comments right-aligned: }
\begin{equation}
    \begin{alignedat}{3}
        & \hskip14em &\diffp{\mathcal D}{t}& = ∇ × \mathcal H & \hskip14em&\text{\llap{(Loi de Faraday)}} \\[0.5ex]
        & & \diffp{\mathcal B}{t}& = -∇ × \mathcal E &&\text{\llap{(Loi d'Ampère)}} \\[0.5ex]
        &\vphantom{\diffp{\mathcal B}{t}} &∇ · \mathcal B & =0 && \text{\llap{(Loi de Gauss)}}\\[0.5ex]
        &\vphantom{\diffp{\mathcal B}{t}} & ∇ · \mathcal D & =0 &&\text{\llap{(Loi de Coulomb)}}
    \end{alignedat}
\end{equation}
\vskip0.5cm


\texttt{With flalign, comments right-aligned: }

\begin{flalign}
    & &\diffp{\mathcal D}{t}& = ∇ × \mathcal H &&\text{\llap{(Loi de Faraday)}} \\[0.5ex]
    & & \diffp{\mathcal B}{t}& = -∇ × \mathcal E &&\text{\llap{(Loi d'Ampère)}} \\[0.5ex]
    &\vphantom{\diffp{\mathcal B}{t}} &∇ · \mathcal B & =0 && \text{\llap{(Loi de Gauss)}}\\[0.5ex]
    &\vphantom{\diffp{\mathcal B}{t}} & ∇ · \mathcal D & =0 &&\text{\llap{(Loi de Coulomb)}}
\end{flalign}

\end{document} 

在此处输入图片描述

答案2

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage[leqno]{amsmath}

\begin{document}

\begin{equation}
\begin{aligned}
\frac{\partial\mathcal{D}}{\partial t} \quad & = \quad \nabla\times\mathcal{H},   & \quad \text{(Loi de Faraday)} \\[5pt]
\frac{\partial\mathcal{B}}{\partial t} \quad & = \quad -\nabla\times\mathcal{E},  & \quad \text{(Loi d'Ampère)}   \\[5pt]
\nabla\cdot\mathcal{B}                 \quad & = \quad 0,                         & \quad \text{(Loi de Gauss)}   \\[5pt]
\nabla\cdot\mathcal{D}                 \quad & = \quad 0.                         & \quad \text{(Loi de Colomb)}
\end{aligned}
\end{equation}

\end{document} 

在此处输入图片描述

答案3

暂无评论!

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}
\begin{document}
  \begin{align}
   \begin{aligned}
    \frac{\partial \bm{\mathcal{D}}}{\partial t} &= \bm{\nabla} \times \bm{\mathcal{H}}
                &\qquad &\text{Loi de Faraday}\\[2\jot]
    \frac{\partial \bm{\mathcal{B}}}{\partial t} &= -\bm{\nabla} \times \bm{\mathcal{E}}
                &\qquad &\text{Loi d'Amp\`{e}re}\\[2\jot]
    \bm{\nabla} \cdot \bm{\mathcal{B}}    &= 0 & \qquad &\text{Loi de Gauss}\\[2\jot]
    \bm{\nabla} \cdot \bm{\mathcal{D}}    &= 0 & \qquad &\text{Loi de Coulomb}
   \end{aligned}
  \end{align}
\end{document}

在此处输入图片描述

要将方程编号放在左边,请使用leqno如下方法\documentclass[leqno]{article}

相关内容