# Eliminating extra vertical space inside theorem environment and enumerate

A friend and I are writing an Analysis book. We are using ntheorem and many times enumerate inside of various custom theorem style environments. Each time I put enumerate inside any of our theorem environments, I get extra unwanted vertical space between the heading and the beginning of the enumerated list.

Here is my MWE:

\documentclass[a4paper,12pt,twoside]{book}
\usepackage[left=1.65cm,right=1.65cm,top=2.45cm,bottom=2.60cm]
{geometry}
\usepackage{amsmath,amssymb,amscd,amsbsy,mathabx,array,color}
\usepackage{mathtools}

\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor,multicol}
\usepackage{picture}
\usepackage{indentfirst}
\usepackage{enumitem}

\usepackage[amsmath,framed,thmmarks]{ntheorem}

\newtheorem{Theorem}{Theorem}

\theoremclass{Theorem}
\theoremstyle{break}
\theoreminframepreskip{0pt}
\theoreminframepostskip{0pt}
\theoremframepreskip{1cm}
\theoremframepostskip{1cm}
\theoremstyle{break}
\def\theoremframecommand{%

\begin{document}

\begin{them}
Let $X$ and $Y$ be sets. Then:
\begin{enumerate}
\item If $X$ and $Y$ are finite disjoint sets, then $X \bigcup$ is finite and $\overline{\overline{X \bigcup Y}} = \overline{\overline{X}} + \overline{\overline{Y}}$.
\item If $X$ and $Y$ are finite sets, then $X \bigcup Y$ is finite and $\overline{\overline{X \bigcup Y}} = \overline{\overline{X}} + \overline{\overline{Y}} \setminus (\overline{\overline{X \bigcap Y}})$.
\item If $X_1,X_2, \ldots, X_n$ are finite sets, then
$\displaystyle{\bigcup_{i=1}^n X_i}$ is finite.
\end{enumerate}
\end{them}

\end{document}


Any help is appreciated.

• Have a look at the package documentation of the enumitem package.The vertical spacing of enumerate environments is explained here: https://tex.stackexchange.com/a/300512/118714 . As you have loaded the enumitem package, you can use keyval-syntax for adjusting: \begin{enumerate}[topsep=...] Commented Jul 5, 2018 at 20:47
• You should type X\cup Y, not X\bigcup Y and, similarly, X\cap Y. The final formula should be $\bigcup_{i=1}^n X_i$, without \displaystyle that spoils the interline spacing. Commented Jul 5, 2018 at 22:05

Here is a solution with enumitem. I took the opportunity to improve a bit your theorem layout, mainly making a blurred shadow, and upshpae enumerate numbers. Also, I borrowed a code from the answer to double-bar-overline to defined small package defining a \widedblbar command, that fits better italic letters. I removed package mathabx, as it also defines a \widebar command, and anyway, it overwrites mathematical symbols.

\documentclass[a4paper, 12pt, twoside]{book}
\usepackage[hmargin=1.65cm, top=2.45cm, bottom=2.60cm]{geometry}
\usepackage{mathtools}
\usepackage{amssymb,amscd,amsbsy, array,color}%mathabx,
\usepackage{widedblbar}
\usepackage{fancyhdr, framed, latexsym, multicol,slashed, xcolor}
\usepackage{pstricks, pst-blur}
\usepackage{picture}
\usepackage{indentfirst}
\usepackage{enumitem}

\usepackage[amsmath, framed, thmmarks]{ntheorem}

\newtheorem{Theorem}{Theorem}

\theoremclass{Theorem}
\theoremstyle{break}
\theoreminframepreskip{0pt}
\theoreminframepostskip{0pt}
\theoremframepreskip{1cm}
\theoremframepostskip{1cm}
\theoremstyle{break}
\def\theoremframecommand{%

\begin{document}

\begin{them}
Let $X$ and $Y$ be sets. Then:
\begin{enumerate}[wide=0pt, font=\upshape, topsep=0pt, itemsep=0pt]
\item If $X$ and $Y$ are finite disjoint sets, then $X \bigcup Y$ is finite and $\widedblbar{X \bigcup Y} = \widedblbar{X} + \widedblbar{Y}$.
\item If $X$ and $Y$ are finite sets, then $X \bigcup Y$ is finite and $\widedblbar{X \bigcup Y} = \widedblbar{X} + \widedblbar{Y} \setminus (\widedblbar{X \bigcap Y})$.
\item If $X_1,X_2, \ldots, X_n$ are finite sets, then
$\displaystyle \bigcup_{i=1}^n X_i$ is finite.
\end{enumerate}
\end{them}

\end{document}


Code in the small package:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This code is a slight modification of Hendrik Vogt's \widebar %%
%% See: https://tex.stackexchange.com/questions/16337 %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
% IDENTIFICATION
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{widedblbar}

\let\save@mathaccent\mathaccent
\newcommand*\if@single[3]{%
\setbox0\hbox{${\mathaccent"0362{#1}}^H$}%
\setbox2\hbox{${\mathaccent"0362{\kern0pt#1}}^H$}%
\ifdim\ht0=\ht2 #3\else #2\fi
}
%The bar will be moved to the right by a half of \macc@kerna, which is computed by amsmath:
\newcommand*\rel@kern[1]{\kern#1\dimexpr\macc@kerna}
%If there's a superscript following the bar, then no negative kern may follow the bar;
%an additional {} makes sure that the superscript is high enough in this case:
\newcommand*\wideaccent[2]{\@ifnextchar^{{\wide@accent{#1}{#2}{0}}}{\wide@accent{#1}{#2}{1}}}
%Use a separate algorithm for single symbols:
\newcommand*\wide@accent[3]{\if@single{#2}{\wide@accent@{#1}{#2}{#3}{1}}{\wide@accent@{#1}{#2}{#3}{2}}}
\newcommand*\wide@accent@[4]{%
\begingroup
\def\mathaccent##1##2{%
%Enable nesting of accents:
\let\mathaccent\save@mathaccent
%If there's more than a single symbol, use the first character instead (see below):
\if#42 \let\macc@nucleus\first@char \fi
%Determine the italic correction:
\setbox\z@\hbox{$\macc@style{\macc@nucleus}_{}$}%
\setbox\tw@\hbox{$\macc@style{\macc@nucleus}{}_{}$}%
\dimen@\wd\tw@
%Now \dimen@ is the italic correction of the symbol.
\divide\dimen@ 3
\@tempdima\wd\tw@
%Now \@tempdima is the width of the symbol.
\divide\@tempdima 10
%Now \dimen@ = (italic correction / 3) - (Breite / 10)
\ifdim\dimen@>\z@ \dimen@0pt\fi
%The bar will be shortened in the case \dimen@<0 !
\rel@kern{0.6}\kern-\dimen@
\if#41
#1{\rel@kern{-0.6}\kern\dimen@\macc@nucleus\rel@kern{0.4}\kern\dimen@}%
%Place the combined final kern (-\dimen@) if it is >0 or if a superscript follows:
\let\final@kern#3%
\ifdim\dimen@<\z@ \let\final@kern1\fi
\if\final@kern1 \kern-\dimen@\fi
\else
#1{\rel@kern{-0.6}\kern\dimen@#2}%
\fi
}%
\macc@depth\@ne
\let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar
\mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax}%
\macc@set@skewchar\relax
\let\mathaccentV\macc@nested@a
%The following initialises \macc@kerna and calls \mathaccent:
\if#41
\macc@nested@a\relax111{#2}%
\else
%If the argument consists of more than one symbol, and if the first token is
%a letter, use that letter for the computations:
\def\gobble@till@marker##1\endmarker{}%
\futurelet\first@char\gobble@till@marker#2\endmarker
\ifcat\noexpand\first@char A\else
\def\first@char{}%
\fi
\macc@nested@a\relax111{\first@char}%
\fi
\endgroup
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\widebar{\wideaccent\overline}
\newcommand\widedblbar{\wideaccent\doubleoverline}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%