Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like to modify the spacing between items in the itemize environment. This post shows how to modify a specific itemize environment (\addtolength{\itemsep}{0.5\baselineskip}). However, I'd like to do it globally for the entire document. This post suggests the enumitem package. However, I get an error in beamer when i use this package (just declaring it). Any suggestions? I'm currently using the addtolength method on all my itemize environments. I'd like a global solution. Thanks.

share|improve this question

2 Answers

up vote 3 down vote accepted

In most documents, you can do this, which avoids the use of extra packages.

\let\tempone\itemize
\let\temptwo\enditemize
\renewenvironment{itemize}{\tempone\addtolength{\itemsep}{0.5\baselineskip}}{\temptwo}

(Stufazi suggested a neater way of doing this in his answer, which I will use below.)

However, I think that the frame environment in beamer resets the properties of itemize. You could do something like this, but it will prevent frame's optional arguments from working.

\documentclass{beamer}
\let\oldframe\frame
\renewcommand{\frame}{%
\oldframe
\let\olditemize\itemize
\renewcommand\itemize{\olditemize\addtolength{\itemsep}{100pt}}%
}
%
\begin{document}
\begin{frame}
\begin{itemize}
\item The first.
\item The second.
\item The third.
\end{itemize}
\end{frame}
%
\begin{frame}
\begin{itemize}
\item The fourth.
\item The fifth.
\item The sixth.
\end{itemize}
\end{frame}
%
\end{document}

Alternatively, you could try this, but I can't guarantee that it won't break something else.

\documentclass{beamer}
\newlength{\wideitemsep}
\setlength{\wideitemsep}{\itemsep}
\addtolength{\wideitemsep}{100pt}
\let\olditem\item
\renewcommand{\item}{\setlength{\itemsep}{\wideitemsep}\olditem}
%
\begin{document}
\begin{frame}
\begin{itemize}
\item The first.
\item<2-> The second.
\item<3-> The third.
\end{itemize}
\end{frame}
%
\begin{frame}[shrink=50]
\begin{itemize}
\item The fourth.
\item The fifth.
\item The sixth.
\end{itemize}
\end{frame}
%
\end{document}

It might be safer to define your own list environment based on itemize and use this in future; thus

\newenvironment{wideitemize}{\itemize\addtolength{\itemsep}{100pt}}{\enditemize}

This would avoid the necessity for hacks that have unwanted side effects.

share|improve this answer
this did not work for me in beamer. – Vinh Nguyen Apr 29 '11 at 19:43
@Vinh Nguyen --- my apologies. I have edited my answer. – Ian Thompson Apr 30 '11 at 10:35
thanks it works. I don't have enough rep to mark the check. Sorry – Vinh Nguyen Apr 30 '11 at 14:10
This solution sort of breaks other frame options. For example, I have a bibliography frame that extends multiple slides: \begin{frame}[allowframebreaks]{References} \bibliographystyle{apa} \bibliography{/home/vinh/Documents/Literature/bibliography} \end{frame} The "allowframebreaks" shows up as text and so the option is not used. Suggestions? – Vinh Nguyen Apr 30 '11 at 15:27
@Vinh --- tried again! – Ian Thompson Apr 30 '11 at 17:37

Just put the two line in your foredocument (change the 100pt to any value you want):

\let\OLDitemize\itemize
\renewcommand\itemize{\OLDitemize\addtolength{\itemsep}{100pt}}

And if next time you write your document using the enumitem package (recommended!), you could

\setitemize{itemsep=100pt}
share|improve this answer
I second the recommendation for the enumitem package. – Michael Ummels Apr 28 '11 at 9:49
@Michael enumitem does not work with beamer as I've described. @Stufazi this did not work for me. I placed it right after \documentclass{beamer} – Vinh Nguyen Apr 29 '11 at 19:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.