# How space itemize

How to set space between each items to 2ex, between subitems to 1ex, between an item and its subitem to 1ex, between a subitem and the next item to 2ex?

I've tried to proceed this way:

\documentclass{beamer}
\makeatletter
\def\@listii{\leftmargin\leftmarginii
\topsep    1ex
\parsep    0\p@   \@plus\p@
\itemsep   \parsep}
\makeatother
\begin{document}
\begin{frame}
\begin{itemize}
\item Here are two interesting things:
\begin{itemize}
\item Here are two interesting things:
\item Here are two interesting things:
\end{itemize}
\item Here are two interesting things:
\item Here are two interesting things:
\end{itemize}
\end{frame}
\end{document}


-
enumitem package could help. – Manuel May 13 '14 at 15:36
@Manuel unfortunately, the enumitem package and beamer don't cooperate well. – Gonzalo Medina May 13 '14 at 16:01
@GonzaloMedina I supposed so, but I tried :P – Manuel May 13 '14 at 16:49

One option redefining \itemize (as defined in beamerbaselocalstructure.sty) to conditionally set \itemsep based on the value of \@itemdepth (the new code is signaled by % start change, % end change):

\documentclass{beamer}

\makeatletter
\renewcommand{\itemize}[1][]{%
\beamer@ifempty{#1}{}{\def\beamer@defaultospec{#1}}%
\ifnum \@itemdepth >2\relax\@toodeep\else
\beamer@computepref\@itemdepth% sets \beameritemnestingprefix
\usebeamerfont{itemize/enumerate \beameritemnestingprefix body}%
\usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}%
\usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}%
\list
{\usebeamertemplate{itemize \beameritemnestingprefix item}}
{\def\makelabel##1{%
{%
\hss\llap{{%
\usebeamerfont*{itemize \beameritemnestingprefix item}%
\usebeamercolor[fg]{itemize \beameritemnestingprefix item}##1}}%
}%
}%
% start change
\ifnum\@itemdepth=1\relax
\setlength\itemsep{2ex}
\else
\ifnum\@itemdepth=2\relax
\setlength\itemsep{1ex}
\fi\fi%
% end change
}
\fi%
\beamer@cramped%
\raggedright%
\beamer@firstlineitemizeunskip%
}
\makeatother

\begin{document}

\begin{frame}
\begin{itemize}
\item Here are two interesting things:
\begin{itemize}
\item Here are two interesting things:
\item Here are two interesting things:
\item Here are two interesting things:
\end{itemize}
\item Here are two interesting things:
\item Here are two interesting things:
\end{itemize}
\end{frame}

\end{document}


With the help of xpatch we can patch \itemize and the code simplifies a little:

\documentclass{beamer}
\usepackage{xpatch}

\xpatchcmd{\itemize}
{\def\makelabel}
{\ifnum\@itemdepth=1\relax
\setlength\itemsep{2ex}
\else
\ifnum\@itemdepth=2\relax
\setlength\itemsep{1ex}
\fi\fi\def\makelabel
}
{}
{}

\begin{document}

\begin{frame}
\begin{itemize}
\item Here are two interesting things:
\begin{itemize}
\item Here are two interesting things:
\item Here are two interesting things:
\item Here are two interesting things:
\end{itemize}
\item Here are two interesting things:
\item Here are two interesting things:
\end{itemize}
\end{frame}

\end{document}

-