# [Tex/LaTex] How to decrease space above and below displayed equations

equations

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