4

I am using empheq along with subequations as given in the MWE. However, the use of subequations create a vertical space between the paragraph and equation as shown in figure, which I don't want. I already tried answers available in [1,2]. Both the answers are not available to remove the space. Implementation of these answers provided in MWE 1 and 2, respectively.

enter image description here

MWE

\documentclass[a4paper,twoside,12pt]{report}
\usepackage{lipsum}
\usepackage[overload]{empheq}

\begin{document}
\lipsum
\begin{subequations}
    \begin{empheq}[left={H=\empheqlbrace\,}]{align}
        & 2 G_{0} - 2.6 \quad \forall \quad G_{0}~<~100~K \\
        & 2 G_{0} - 9.8 \quad \forall \quad G_{0}~>~100~K  
    \end{empheq}
    \label{eq:k_temperature_correlation}
\end{subequations}
\lipsum
\end{document}

MWE 1

\documentclass[a4paper,twoside,12pt]{report}
\usepackage{lipsum}
\usepackage[overload]{empheq}
\usepackage{etoolbox}
\preto\subequations{\ifhmode\unskip\fi}

\begin{document}
\lipsum
\begin{subequations}
    \begin{empheq}[left={H=\empheqlbrace\,}]{align}
        & 2 G_{0} - 2.6 \quad \forall \quad G_{0}~<~100~K \\
        & 2 G_{0} - 9.8 \quad \forall \quad G_{0}~>~100~K  
    \end{empheq}
    \label{eq:k_temperature_correlation}
\end{subequations}
\lipsum
\end{document}

MWE 2

\documentclass[a4paper,twoside,12pt]{report}
\usepackage{lipsum}
\usepackage[overload]{empheq}

\begin{document}
\begin{subequations}
\lipsum
    \begin{empheq}[left={H=\empheqlbrace\,}]{align}
        & 2 G_{0} - 2.6 \quad \forall \quad G_{0}~<~100~K \\
        & 2 G_{0} - 9.8 \quad \forall \quad G_{0}~>~100~K  
    \end{empheq}
    \label{eq:k_temperature_correlation}
\end{subequations}
\lipsum
\end{document}

How to remove vertical space between equation and paragraph when using combination of subequations and empheq?

nxkryptor
  • 1,478
  • 2
    I've tried to remove both subequations and empheq (replaced it by the align environment). The vertical space remains. It disappears after I drop the empheq package or remove the overload option. Though it disappears for align only. For empheq it strikes again. So I think the issue is in the empheq package and not in subequations. – Sergei Golovan Sep 21 '17 at 08:16
  • 1
    I see no particular excess space in MWE2, provided the ending \par of \lipsum is suppressed (\lipsum*). There's no rule about having to do like in MWE1. I'd say that to the contrary it is better to include in subequations also the paragraph parts before and after the equations/displays involved in subequations. – egreg Sep 21 '17 at 08:34

1 Answers1

3

The additional space is an artifact of using lipsum, which by default adds a \par at the end of each \lipsum command.

Without lipsum you can see that the space is OK:

\documentclass[a4paper,twoside,12pt]{report}
\usepackage[overload]{empheq}

\usepackage{siunitx}

\newcommand{\sta}{some random text} \newcommand{\stb}{\sta\space\sta\space\sta\space\sta\space\sta} \newcommand{\st}{\stb\space\stb\space\stb}

\begin{document} \st \begin{subequations} \begin{empheq}[left={H=\empheqlbrace,}]{align} & 2 G_{0} - 2.6 \quad \forall \quad G_{0}~<~100~K \ & 2 G_{0} - 9.8 \quad \forall \quad G_{0}~>~100~K
\end{empheq} \label{eq:k_temperature_correlation} \end{subequations} \st

\bigskip

\begin{subequations}\label{a-better-place-for-label} \st \begin{empheq}[left={H=\empheqlbrace,}]{align} & 2 G_{0} - 2.6 \quad \forall, G_{0} < \qty{100}{\kelvin} \ & 2 G_{0} - 9.8 \quad \forall, G_{0} > \qty{100}{\kelvin}
\end{empheq} \st \end{subequations}

\end{document}

Here I define \st so that it produces “some random text” several times.

enter image description here

Some points to note, for which you should look at the second part of the code above:

  1. your \label is in the wrong place and you can clearly see the small indent after the display which is due exactly to the misplaced \label

  2. since a display has related text above and usually also below, it's more consistent to have this text inside subequations

  3. you're manually adding spaces around > and <: don't

  4. symbols for units should be upright, so 100 K and not 100 K; exploit siunitx or type in 100\,\mathrm{K} if your usage is occasional

  5. the “for all” symbol should be removed or, at least, positioned nearer G0

egreg
  • 1,121,712