マクスウェル方程式の構造とLaTeXでの番号付け

マクスウェル方程式の構造とLaTeXでの番号付け

これをどう書けばいいでしょうか:

ここに画像の説明を入力してください

ありがとう。

答え1

左揃えまたは右揃えのコメントが付いた、一連のソリューション。後者の場合、flalign理想的ですが、私の知る限り、flaligned方程式のグループに対して 1 つの数値を許可する環境は存在しません。

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

関連情報