31

How do I reduce the vertical spacing of \intertext?

4 Answers 4

33

The mathtools package provides the command \shortintertext, which has less vertical space than the standard \intertext.

13

Below the upper part of the formula comes a vertical space with the height \belowdisplayskip. Afterwards comes the text by \intertext. Before the rest of the formula, a vertical space with a height of \abovedisplayskip will be inserted.

These are usual spaces before and after displayed math environments and surrounding text. So, it's the same for inserted texts. \abovedisplayshortskip and \belowdisplayshortskip are further such skips; these short skips would be used if the line before the display ends before the formula begins, for the visual appearance.

You could change those lengths. If you need it just at a certain place, you could modify the lengths there and limit this effect by grouping with braces or \begingroup, \endgroup:

{%
\setlength{\belowdisplayskip}{0pt}%
\setlength{\abovedisplayskip}{0pt}%
\begin{align}
...
\intertext{some text}
...
\end{align}%
}

Instead of 0 pt you could insert any other value. If you need it several times, you could consider to create a macro or to modify the behavior of \intertext.

5

one option, if you only want to change the spacing between lines in a certain part of your document (like one block of equations) is to use the setspace package, and use the spacing environment like this:

\begin{spacing}{.1}
    \begin{align}
        a = 4
        \intertext{this is a long line of text between your equations}
        b = 3
    \end{align}
\end{spacing}

the second argument for the spacing environment is the spacing factor. for smaller than normal, use values < 1.

5

It is possible to exploit \flalign to get better control of the vertical spacing.

The {\LaTeX} \verb|\intertext| command is generally unsatisfactory.
\begin{flalign*}
&& L_1 &= R_1 && \\
\intertext{Who needs this?}
&& L_2 &= R_2 && \\
&\text{Whatever needs to be said should be said here.}\hidewidth\\
&& L_3 &= R_3 &&
\end{flalign*}
We should get good alignment this way.
2
  • 1
    @CharlesStewart okay, perhaps then a sentence more would be very helpful to make it clear to all readers? For me (and perhaps my poor english) it was not ... But thanks for clarification!
    – Mensch
    May 1, 2013 at 16:39
  • 1
    David, could you rephrase your answer a little. In the current form it almost looks like a question. Also some explanation outside the code is generally favorable. It would also be very good if you could also add a screenshot of the result. May 2, 2013 at 6:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .