
我怎麼能做到如上圖所示的計數和方程式格式?
我嘗試了這段程式碼:
\documentclass[12pt,a4paper,fleqn, twocolumn]{article}
\usepackage[margin=1.5cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\usepackage{titlesec}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{esint}
\begin{align}
\begin{array}{l}
P^{TE}_q = Re\frac{j|E_0|^2}{2\eta}\\
\times \oiint\limits_S(A^i_qA^{i*}_q\bar{M}^{(1)}_q \times \bar{N}^{(1)*}_q + A^i_qA^{s*}_q\bar{M}^{(1)}_q \times \bar{N}^{(4)*}_q\\
+ A^s_qA^{i*}_q\bar{M}^{(4)}_q \times \bar{N}^{(1)*}_q + A^s_qA^{s*}_q\bar{M}^{(4)}_q \times \bar{N}^{(4)*}_q)\\
\cdot \hat{r}ds
\end{array}\\
\begin{array}{l}
P^{TM}_q = Re\frac{j|E_0|^2}{2\eta}\\
\times \oiint\limits_S(B^i_qB^{i*}_q\bar{N}^{(1)}_q \times \bar{M}^{(1)*}_q + B^i_qB^{s*}_q\bar{N}^{(1)}_q \times \bar{M}^{(4)*}_q\\
+ B^s_qB^{i*}_q\bar{N}^{(4)}_q \times \bar{M}^{(1)*}_q + B^s_qB^{s*}_q\bar{M}^{(4)}_q \times \bar{M}^{(4)*}_q)\\
\cdot \hat{r}ds
\end{array}
\end{align}
答案1
像這樣的東西嗎?請注意我會推薦不是指定選項fleqn
.我建議使用單一align
環境和無array
環境。
\documentclass[12pt,a4paper,twocolumn]{article} % no 'fleqn' option
\usepackage[margin=1.5cm]{geometry}
\usepackage{mathtools,esint}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\let\Re\relax
\DeclareMathOperator{\Re}{Re} % redefine '\Re'
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\begin{document}
\hrule % just to illustrate width of column
\setcounter{equation}{24} % just for this example
\begingroup
\thickmuskip=0mu
\medmuskip=0mu
\thinmuskip=0mu
\small
\begin{subequations}
\begin{align}
P^{\mathrm{TE}}_q &= \Re \frac{j\abs{E_0}^2}{2\eta} \notag\\
&\quad\times \oiint\limits_S \Bigl(
A^i_qA^{i*}_q\bar{M}^{(1)}_q \times \bar{N}^{(1)*}_q
+ A^i_qA^{s*}_q\bar{M}^{(1)}_q \times \bar{N}^{(4)*}_q \notag\\
&\qquad
+ A^s_qA^{i*}_q\bar{M}^{(4)}_q \times \bar{N}^{(1)*}_q
+ A^s_qA^{s*}_q\bar{M}^{(4)}_q \times \bar{N}^{(4)*}_q \Bigr) \notag\\
&\qquad \cdot \hat{r}\mkern3mu ds \\[1ex]
P^{\mathrm{TM}}_q &= \Re\frac{j\abs{E_0}^2}{2\eta} \notag\\
&\quad\times \oiint\limits_S \Bigl(
B^i_qB^{i*}_q\bar{N}^{(1)}_q \times \bar{M}^{(1)*}_q
+ B^i_qB^{s*}_q\bar{N}^{(1)}_q \times \bar{M}^{(4)*}_q \notag\\
&\qquad
+ B^s_qB^{i*}_q\bar{N}^{(4)}_q \times \bar{M}^{(1)*}_q
+ B^s_qB^{s*}_q\bar{M}^{(4)}_q \times \bar{M}^{(4)*}_q\Bigr) \notag\\
&\qquad\cdot \hat{r}\mkern3mu ds
\end{align}
\end{subequations}
\endgroup
\hrule % just to illustrate width of column
\end{document}
附錄:如果您的文件空間不足,實際上可以將每個方程式排版為 3 行,而不是初始螢幕截圖和上面答案中使用的 4 行。
以下解決方案也使用\widebar
(套件提供的巨集mathabx
)而\bar
不是上面的答案。使用\widebar
提供了一種“外觀”,可以更接近地複製您發布的螢幕截圖的外觀。
\documentclass[12pt,a4paper,twocolumn]{article} % no 'fleqn' option
\usepackage[margin=1.5cm]{geometry}
\usepackage{mathtools,mathabx,esint}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[russian]{babel}
\let\Re\relax
\DeclareMathOperator{\Re}{Re} % redefine '\Re'
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\begin{document}
\setcounter{equation}{24} % just for this example
\begin{subequations}
\begin{align}
&P^{\mathrm{TE}}_q = \Re \frac{j\abs{E_0}^2}{2\eta}
\times \oiint\limits_{S} \Bigl\{
A^i_qA^{i*}_q\widebar{M}^{(1)}_q \times \widebar{N}^{(1)*}_q \notag\\
&\quad+ A^i_qA^{s*}_q\widebar{M}^{(1)}_q \times \widebar{N}^{(4)*}_q
+ A^s_qA^{i*}_q\widebar{M}^{(4)}_q \times \widebar{N}^{(1)*}_q \notag\\
&\qquad+ A^s_qA^{s*}_q\widebar{M}^{(4)}_q \times \widebar{N}^{(4)*}_q \Bigr\} \hat{r}\, ds \\[1ex]
&P^{\mathrm{TM}}_q = \Re\frac{j\abs{E_0}^2}{2\eta}
\times \oiint\limits_{S} \Bigl\{
B^i_qB^{i*}_q\widebar{N}^{(1)}_q \times \widebar{M}^{(1)*}_q \notag \\
&\quad+ B^i_qB^{s*}_q\widebar{N}^{(1)}_q \times \widebar{M}^{(4)*}_q
+ B^s_qB^{i*}_q\widebar{N}^{(4)}_q \times \widebar{M}^{(1)*}_q \notag\\
&\qquad+ B^s_qB^{s*}_q\widebar{M}^{(4)}_q \times \widebar{M}^{(4)*}_q\Bigr\} \hat{r}\, ds
\end{align}
\end{subequations}
\end{document}
答案2
不同的提案,行數更多但更短;以兩列格式排版數學總是很痛苦。
\documentclass[12pt,a4paper,fleqn,twocolumn]{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\usepackage[margin=1.5cm]{geometry}
\usepackage{titlesec}
\usepackage{graphicx}
\usepackage{amsmath,mathtools}
\usepackage{esint}
\let\Re\relax
\DeclareMathOperator{\Re}{Re}
\begin{document}
\begin{align}
\begin{split}
P^{TE}_q ={}& \Re\frac{j|E_0|^2}{2\eta} \\
{} \times \mathop{\smash[b]{\oiint\limits_S}}\Bigl(
& A^i_qA^{i*}_q\bar{M}^{(1)}_q \times \bar{N}^{(1)*}_q \\
&+ A^i_qA^{s*}_q\bar{M}^{(1)}_q \times \bar{N}^{(4)*}_q \\
&+ A^s_qA^{i*}_q\bar{M}^{(4)}_q \times \bar{N}^{(1)*}_q \\
&+ A^s_qA^{s*}_q\bar{M}^{(4)}_q \times \bar{N}^{(4)*}_q \Bigr) \cdot \hat{r}\,ds
\end{split}
\\
\begin{split}
P^{TM}_q ={}& \Re\frac{j|E_0|^2}{2\eta} \\
{} \times \mathop{\smash[b]{\oiint\limits_S}}\Bigl(
& B^i_qB^{i*}_q\bar{N}^{(1)}_q \times \bar{M}^{(1)*}_q \\
&+ B^i_qB^{s*}_q\bar{N}^{(1)}_q \times \bar{M}^{(4)*}_q \\
&+ B^s_qB^{i*}_q\bar{N}^{(4)}_q \times \bar{M}^{(1)*}_q \\
&+ B^s_qB^{s*}_q\bar{M}^{(4)}_q \times \bar{M}^{(4)*}_q \Bigr) \cdot \hat{r}\,ds
\end{split}
\end{align}
\end{document}
其\smash[b]
構造是為了避免大積分將其下方的線推得太低。將其包裹起來\mathop
可確保正確的水平間距。