- #1

Master1022

- 611

- 117

- TL;DR Summary
- I have wrapped equations in single space environments within a double spaced document. This has lead to some extra superfluous space above the equations, which I would like to remove. How can I do that?

Hi,

From reading online, I have the following code at the top of my LaTeX:

Below is some quick code I have put together to demonstrate the issue:

As shown in that code, the second equation has no spacing above it. The first set of equations (in the align environment) have more spacing when using the single-space environment and I was wondering how I can get rid of it? I needed to use the single-space environment around some equations as there are some examples in my document which take up a lot of space.

Thanks in advance for any help.

**Question:**How can I remove the extra spacing above the single-space equation environment. I have wrapped the equations in a single-space environment as the document has to be double spaced (and I wanted to save as much space as possible)From reading online, I have the following code at the top of my LaTeX:

LaTeX spacing package code:

```
\usepackage{titlesec}
\titlespacing\section{0pt}{0pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{0pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{0pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
% this code is to decrease the spacing between equations and text
\newcommand{\zerodisplayskips}{%
\setlength{\abovedisplayskip}{0pt}%
\setlength{\belowdisplayskip}{0pt}%
\setlength{\abovedisplayshortskip}{0pt}%
\setlength{\belowdisplayshortskip}{0pt}}
\appto{\normalsize}{\zerodisplayskips}
\appto{\small}{\zerodisplayskips}
\appto{\footnotesize}{\zerodisplayskips}
```

Example code:

```
\documentclass{article}
\usepackage{lipsum}
\usepackage{titlesec}
\usepackage{parskip}
\usepackage{multicol}
\usepackage{setspace}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[margin= 20mm]{geometry}
\usepackage{hyperref}
\usepackage{subcaption}
\usepackage{verbatim}
\usepackage{etoolbox}
\doublespacing\titlespacing\section{0pt}{0pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{0pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{0pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
% this code is to decrease the spacing between equations and text
\newcommand{\zerodisplayskips}{%
\setlength{\abovedisplayskip}{0pt}%
\setlength{\belowdisplayskip}{0pt}%
\setlength{\abovedisplayshortskip}{0pt}%
\setlength{\belowdisplayshortskip}{0pt}}
\appto{\normalsize}{\zerodisplayskips}
\appto{\small}{\zerodisplayskips}
\appto{\footnotesize}{\zerodisplayskips}
\begin{document}
\section{Section}
\lipsum[1]
Look how much space is below this sentence:
\begin{singlespace}
\begin{align*}
y = a x^2 + bx + c \\
y = mx + b
\end{align*}
\end{singlespace}
\lipsum[2]. When I would prefer it to look like this:
\begin{equation}
y = ax^2 + bx + c
\end{equation}
\lipsum[3]
\end{document}
```

As shown in that code, the second equation has no spacing above it. The first set of equations (in the align environment) have more spacing when using the single-space environment and I was wondering how I can get rid of it? I needed to use the single-space environment around some equations as there are some examples in my document which take up a lot of space.

Thanks in advance for any help.