2

I am in the situation of using \intertext/\shortintertext with the Revtex document class, but it seems there are some spacing issues.

Consider:

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

enter image description here

and there is large spacing before and after the and text. This is not present if I switch out the document class to article, so how to fix this?

ps. Strangely, using \shortintertext gives rise to a larger spacing than \intertext.. why is this so?

ksgj1
  • 637
  • 1
    Does adding the directive \raggedbottom in the preamble make a difference? – Mico Dec 31 '18 at 21:06
  • 1
    @Mico No, unfortunately not. (I placed it right before begindocument). I don't think this is the usual spurious spacing, from, say, poor float placement. – ksgj1 Dec 31 '18 at 21:08

2 Answers2

6

I propose this work-around: use the optional argument for \intertext, introduced by package 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} 

enter image description here

Bernard
  • 271,350
  • nccmath redefines the \intertext command? is there any other redefinitions that I should worry about when using in conjunction with amsmath, mathtools etc.? (incompatibilities, redefinitions using different syntax) If I load this package I can no longer use \shortintertext? – ksgj1 Dec 31 '18 at 21:39
  • 1
    I don't think this one is incompatible, as nccmath loads amsmath. I use it mainly for its medium size formula commands and environment, with which I never hadd any problem. The redefinition of \intertext is documented on p.12 of the documentation (commented code). – Bernard Dec 31 '18 at 21:45
5

You can modify the vertical space before and after both \intertext and \shortintertext: here's a possibility, adjust to suit your needs.

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

enter image description here

egreg
  • 1,121,712