# How to reduce a gap between the enumeration and the context from above it?

\documentclass[xcolor=x11names,compress]{beamer}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{enumitem}


I have a following code

\textbf{Definition 1.1} A {\it{design}} is a pair $(X,\mathcal{A})$ iff:
\begin{enumerate}[label={\it{\arabic*}}.,leftmargin=1cm,itemsep=0ex,parsep=-0.3ex]
\item \;\; $X$ is a set of {\it{points}};
\item \;\; $\mathcal{A}$ is a set of {\it{blocks}}.
\end{enumerate}


which can be compiled as

.

But as you can see, the gap between the context and enumeration is quite big. I've used topmargin but didn't worked. How to reduce a gap between them?

• Adjust topsep as well... – Werner Jul 18 '14 at 3:08
• – Werner Jul 18 '14 at 3:46
• enumitem is not full compatible with beamer – skpblack Jul 18 '14 at 4:09

You have relevant keys in enumitem itself: nosep or noitemsep. Also, instead of adding horizontal space between label and item body for each item, set labelsep in the options. Last, I replaced TeX syntax ({\it…}) with LaTeX syntax (\emph{…}).

Final advice: you should make your definition a theorem-like environment: formatting (boldface) could be pre-defined and numbering would be automatic, making cross-references easy. Imagine what would happen if you should decide to add a definition in the middle of your document.

\documentclass[xcolor=x11names,compress]{beamer}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{enumitem}

\begin{document}

\textbf{Definition 1.1} A \emph{design} is a pair $(X,\mathcal{A})$ iff:
\begin{enumerate}[label=\em \arabic*., labelsep = 0.5em,  leftmargin=1cm, nosep]
\item $X$ is a set of \emph{points};
\item $\mathcal{A}$ is a set of \emph{blocks}.
\end{enumerate}
\vskip4ex

\textbf{Definition 1.1} A \emph{design} is a pair $(X,\mathcal{A})$ iff:
\begin{enumerate}[label=\em \arabic*., labelsep = 0.5em,  leftmargin=1cm, noitemsep]
\item $X$ is a set of \emph{points};
\item $\mathcal{A}$ is a set of \emph{blocks}.
\end{enumerate}

\end{document}


A possible solution is use of \vspace{-xxpt} right before \item.

Code

\documentclass[xcolor=x11names,compress]{beamer}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{enumitem}

\begin{document}

Before:

\textbf{Definition 1.1} A {\it{design}} is a pair $(X,\mathcal{A})$ iff:
\begin{enumerate}[label={\it{\arabic*}}.,leftmargin=1cm,itemsep=0ex,parsep=-0.3ex]
\item \;\; $X$ is a set of {\it{points}};
\item \;\; $\mathcal{A}$ is a set of {\it{blocks}}.
\end{enumerate}

After:

\textbf{Definition 1.1} A {\it{design}} is a pair $(X,\mathcal{A})$ iff:
\begin{enumerate}[label={\it{\arabic*}}.,leftmargin=1cm,itemsep=0ex,parsep=-0.3ex]
\vspace{-5pt}
\item \;\; $X$ is a set of {\it{points}};
\item \;\; $\mathcal{A}$ is a set of {\it{blocks}}.
\end{enumerate}
\end{document}


\setlist{nolistsep} can reduce a little bit. Probably need to go through the package manual.

• Where is \set from? You probably mean \setlist? – Werner Jul 18 '14 at 4:18
• Yes, I made a mistake. It should be \setlist{nolistsep}, right after the package usage statement. – tao sheng Jul 19 '14 at 1:26
• You can edit your question in order to revise it. Click on the edit link below your post. – Werner Jul 19 '14 at 3:57