I have trouble combining two things for a set of slides:
- Adjust item separation globally
- Use default overlays of lists locally (parameter
[<+->]
)
I use enumitem
for 1. but it seems to disturb beamer
quite a bit. To begin with, I had to employ some trickery to not have enumtitle
overwrite the selected slide style.
With the linked solution in effect, adding [<+->]
to an itemize
does not have any effect at all. I would expect it to overwrite the global setting, but evidently it does not.
How can I achieve 1. and 2. simultaneously?
Minimal failing example:
\documentclass{beamer}
\usepackage{enumitem}
\setitemize{itemsep=1.5em,%
label=\usebeamerfont*{itemize item}%
\usebeamercolor[fg]{itemize item}%
\usebeamertemplate{itemize item}%
}
\begin{document}
\begin{frame}
\begin{itemize}[<+->]
\item On slide 1
\item On slide 2
\end{itemize}
\end{frame}
\end{document}
Best Answer
As you already mentioned,
enumitem
"disturbs"beamer
. This is because the document class (beamer
in this case) defines (or redefines) all the necessary commands/macros and environments to it's liking. Then, each loaded package does the same sequentially. As such, sinceenumitem
follows the document class, it redefines theitemize
(and other) environments, thereby removingbeamer
's modified overlay specification.It is possible to tap into the main level list environment parameters by patching the command
\@listI
. The following shows the definition of the three levels contained inbeamerbaselocalstructure.sty
:A patch using
\patchcmd
, as provided byetoolbox
, that changes\itemsep3\p@
to\itemsep2em
(say) modifies the command globally from3pt
to2em
:The use of the
\makeatletter
/\makeatother
pair is required, since the macro definition of\@listI
contains@
. Note that this patch does not modify the shrink (3pt
) or stretch (2pt
) of\itemsep
.