split
软件包中是否存在允许一行中有两个对齐方程的环境变体amsmath
?我想将两对麦克斯韦方程格式化为两行,并在两行之间放置单个方程编号。不幸的是,一行中split
只允许一个对齐选项卡&
,而我需要三个,如下例所示:
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\Div}{div}
\DeclareMathOperator{\Rot}{rot}
\begin{document}
\begin{align}
\label{18.1:1}
%\begin{split}
\Rot\vec{E} &=-\frac{1}{c}\parder{\vec{B}}{t}
,
&
\Div\vec{B} &=0,
\\
\label{18.1:2}
\Rot\vec{B} &=\frac{1}{c}\parder{\vec{E}}{t}
+\frac{4\pi}{c}\,\vec{j}
,
&
\Div\vec{E} &=4\pi\rho_{\varepsilon }
%\end{split}
\end{align}
\end{document}
这里每一行都有自己的编号。
答案1
我认为你追求的是aligned
:
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\Div}{div}
\DeclareMathOperator{\Rot}{rot}
\newcommand{\parder}[2]{\frac{\partial {#1}}{\partial {#2}}}
\begin{document}
\begin{align}
\label{18.1:1}
\begin{aligned}
\Rot\vec{E} &=-\frac{1}{c}\parder{\vec{B}}{t},&
\Div\vec{B} &=0,
\\
\Rot\vec{B} &=\frac{1}{c}\parder{\vec{E}}{t}
+\frac{4\pi}{c}\,\vec{j},&
\Div\vec{E} &=4\pi\rho_{\varepsilon}.
\end{aligned}
\end{align}
\end{document}
答案2
只需使用split
:
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\Div}{div}
\DeclareMathOperator{\Rot}{rot}
\newcommand\parder[2]{\frac{\partial #1}{\partial #2}}
\begin{document}
\begin{align}
\label{18.1:1}
\begin{split}
\Rot\vec{E} &=-\frac{1}{c}\parder{\vec{B}}{t},
\\
\Div\vec{B} &=0,
\end{split}
\\[2ex]
\label{18.1:2}
\begin{split}
\Rot\vec{B} &=\frac{1}{c}\parder{\vec{E}}{t}+\frac{4\pi}{c}\,\vec{j},
\\
\Div\vec{E} &=4\pi\rho_{\varepsilon }
\end{split}
\end{align}
\end{document}