28

This is my code.

\documentclass{article}
\usepackage{amssymb,amsmath,amsthm,enumitem}

\begin{document}
How can I decrease vertical space between text above and below \$\$ \ldots \$\$ ?
$$x^{2}+y^{2} = 1$$
How can I decrease vertical space between text above and below \$\$ \ldots \$\$ ?

And how can I decrease vertical space between text above and below align command ?
\begin{align*}
abdefg &= 1\\
     &\leq 2.
\end{align*}
How can I decrease vertical space between text above and below align command ?
\end{document}

And it shows as this picture enter image description here

Everyone know how to fix it? Please help.

4
  • It is the default space. Maybe it is too big because you don't have material enough on the page to fill. Insert a lot of text (using \lipsum[1] from the lipsum package, for example) and see if the vertical space is smaller. – Sigur Jan 26 '15 at 11:36
  • 1
    Also, don't use double dollar. Use \[ \] instead. – Sigur Jan 26 '15 at 11:37
  • @sigur It does not different. – Mr.Lilly Jan 26 '15 at 11:40
  • So, don't worry. Just let TeX decide to you. When you finish your document you can try some adjustment. – Sigur Jan 26 '15 at 11:45
33

The spacing above equations is determined by the length \abovedisplayskip while the spacing below them is determined by the length \belowdisplayskip, so, modify them to achieve what you want, for example,

\setlength{\abovedisplayskip}{3pt}
\setlength{\belowdisplayskip}{3pt}

MWE

\documentclass{article}
\usepackage{amssymb,amsmath,amsthm,enumitem}

\begin{document}

\setlength{\abovedisplayskip}{3pt}
\setlength{\belowdisplayskip}{3pt}

How can I decrease vertical space between text above and below \$\$ \ldots \$\$?
\[x^{2}+y^{2} = 1\]
How can I decrease vertical space between text above and below \$\$ \ldots \$\$?

And how can I decrease vertical space between text above and below align command?
\begin{align*}
abdefg &= 1\\
     &\leq 2.
\end{align*}
How can I decrease vertical space between text above and below align command?
\end{document} 

enter image description here

2
  • 7
    You may also want to mention the parameters \abovedisplayshortskip and \belowdisplayshortskip, which come into play if the last line immediately before an equation is, well, short. – Mico Jan 26 '15 at 17:01
  • @Mico Thanks for the comment. But that's already in the duplicate link... – karlkoeller Jan 26 '15 at 20:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.