\intertext
我正处于使用/与 Revtex 文档类的情况\shortintertext
,但似乎存在一些间距问题。
考虑:
\documentclass[aps,prl,reprint]{revtex4-1}
% \documentclass{article}
\usepackage{mathtools}
\usepackage{bm}
\usepackage{newtxtext,newtxmath}
\usepackage{lipsum}
\begin{document}
\lipsum*[1]
\begin{subequations}
\begin{align}
\varepsilon_0(\bm{q}) &= \varepsilon_1(\bm{q}) = 0 \\
\varepsilon_2(\bm{q}) &=\beta \bigl[ 4(1 - J') + 4J' Q - 2(1+2J')\sqrt{1+Q} \, \bigr]\\
\varepsilon_3(\bm{q}) &= \beta \bigl[4(1 - J') + 4J' Q + 2(1+2J')\sqrt{1+Q} \, \bigr] \,, \\
\shortintertext{and}
Q &= a + b + c + d + e + f - 3
\end{align}
\end{subequations}
\lipsum*[1-3]
\end{document}
并且文本前后有很大的间距and
。如果我将文档类切换为,则不会出现这种情况article
,那么如何修复此问题?
ps. 奇怪的是,使用\shortintertext
会产生一个更大间距比\intertext
..为什么会这样?
答案1
\intertext
您可以修改和之前和之后的垂直空间\shortintertext
:这是一种可能性,请根据您的需要进行调整。
\documentclass[aps,prl,reprint]{revtex4-1}
\usepackage{mathtools}
\usepackage{newtxtext,newtxmath}
\usepackage{bm}
\usepackage{lipsum}
\mathtoolsset{
above-shortintertext-sep=-\belowdisplayshortskip,
below-shortintertext-sep=-\abovedisplayskip,
above-intertext-sep=0pt, % default
below-intertext-sep=-.5\abovedisplayskip,
}
\begin{document}
\lipsum*[1]
\begin{subequations}
\begin{align}
\varepsilon_0(\bm{q}) &= \varepsilon_1(\bm{q}) = 0 \\
\varepsilon_2(\bm{q}) &=\beta \bigl[ 4(1 - J') + 4J' Q - 2(1+2J')\sqrt{1+Q} \, \bigr]\\
\varepsilon_3(\bm{q}) &= \beta \bigl[4(1 - J') + 4J' Q + 2(1+2J')\sqrt{1+Q} \, \bigr] \,, \\
\shortintertext{and}
Q &= a + b + c + d + e + f - 3
\end{align}
\end{subequations}
\lipsum*[4]
\begin{subequations}
\begin{align}
\varepsilon_0(\bm{q}) &= \varepsilon_1(\bm{q}) = 0 \\
\varepsilon_2(\bm{q}) &=\beta \bigl[ 4(1 - J') + 4J' Q - 2(1+2J')\sqrt{1+Q} \, \bigr]\\
\varepsilon_3(\bm{q}) &= \beta \bigl[4(1 - J') + 4J' Q + 2(1+2J')\sqrt{1+Q} \, \bigr] \,, \\
\intertext{and}
Q &= a + b + c + d + e + f - 3
\end{align}
\end{subequations}
\lipsum
\end{document}
答案2
\intertext
我建议采用这种解决方法:使用包中引入的可选参数nccmath
:
\documentclass[aps,prl,reprint]{revtex4-1}
% \documentclass{article}
\usepackage{newtxtext,newtxmath}
\usepackage{mathtools, bm, nccmath}
\usepackage{lipsum}
\begin{document}
\lipsum*[1]
\begin{subequations}
\begin{align}
\varepsilon_0(\bm{q}) &= \varepsilon_1(\bm{q}) = 0 \\
\varepsilon_2(\bm{q}) &=\beta \bigl[ 4(1 - J') + 4J' Q - 2(1+2J')\sqrt{1+Q} \, \bigr]\\
\varepsilon_3(\bm{q}) &= \beta \bigl[4(1 - J') + 4J' Q + 2(1+2J')\sqrt{1+Q} \, \bigr] \,, \\
\intertext[0 ex]{and}
Q &= a + b + c + d + e + f - 3
\end{align}
\end{subequations}
\lipsum*[1-3]
\end{document}