Global setting of spacing between items in itemize environment for beamer

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> ). 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.

asked Apr 27, 2011 at 22:18 Vinh Nguyen Vinh Nguyen 1,411 3 3 gold badges 15 15 silver badges 17 17 bronze badges Related question beamer: how to increase space between bullet and text in itemize environment? Commented Jan 26, 2018 at 14:36

7 Answers 7

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

\let\tempone\itemize \let\temptwo\enditemize \renewenvironment<\tempone\addtolength<\itemsep>>

(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 \let\oldframe\frame \renewcommand>% > % \begin \begin \begin \item The first. \item The second. \item The third. \end \end % \begin \begin \item The fourth. \item The fifth. \item The sixth. \end \end % \end

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

\documentclass \newlength \setlength <\itemsep>\addtolength \let\olditem\item \renewcommand<\item><\setlength<\itemsep>\olditem> % \begin \begin \begin \item The first. \item The second. \item The third. \end \end % \begin[shrink=50] \begin \item The fourth. \item The fifth. \item The sixth. \end \end % \end

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

\newenvironment<\itemize\addtolength<\itemsep>>

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

answered Apr 27, 2011 at 22:49 Ian Thompson Ian Thompson 44.2k 8 8 gold badges 118 118 silver badges 182 182 bronze badges

I am a user of the wideitemize environment. When I have them nested though, I cannot change the font size of the inner one using \fontsize . only the outer one. Do you know why this might be the case?

Commented Nov 4, 2020 at 14:59

@luchonacho --- I would guess it's a grouping issue. I suggest asking a new question about this, with an example code for others to play around with. It shouldn't be too difficult to fix this, once we see exactly what you are doing (famous last words).

Commented Nov 4, 2020 at 20:32

Actually, it has nothing to so with the new environment. Question here: tex.stackexchange.com/q/569624/77895

Commented Nov 4, 2020 at 22:19

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

\let\OLDitemize\itemize \renewcommand\itemize<\OLDitemize\addtolength<\itemsep>> 

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

\usepackage \setitemize
answered Apr 28, 2011 at 6:22 Stufazi Hoqckt Stufazi Hoqckt 1,137 8 8 silver badges 16 16 bronze badges

@Michael enumitem does not work with beamer as I've described. @Stufazi this did not work for me. I placed it right after \documentclass

Commented Apr 29, 2011 at 19:39 Thanks for \setitemize , worked for me. Commented Nov 25, 2020 at 15:05 or you can use \usepackage and then \begin[itemsep=100pt] . Commented Feb 5, 2022 at 7:41

it is possible that this interacts poorly with the bracket arguments after \begin like [] ? The first solution causes a missing \item error in code that compiled previously. This is my best guess.

Commented Jun 9, 2023 at 15:59

After diving a bit into beamer's source files, I think that I've found the best way to implement this without breaking other options or advanced features of the itemize or frame environments. The solution is to define a new frame option like:

\makeatletter \define@key[30pt]> \makeatother 

So that one can later write:

\begin[wide] % . \end

to get “wider”, more spacey, versions of all the itemize , enumerate and description environments used in the frame. This is actually just a copy from another squeeze option already defined by beamer, so I'm guessing this would be the “proper” way to implement this without breaking anything.

Set as default

One would also want, probably, an option to make this the default for all frames. Unfortunately beamer does not seem to support setting default frame options. The following is a bit of a hack, but I'm hoping it not to break anything. Throw all of this code in a style file (say beamer-extra.sty ):

\NeedsTeXFormat \ProvidesPackage[2013/08/22 Some extra beamer features] \RequirePackage % A command to set default frame options: % \defaultframeoptions> % append some more defaults options % \defaultframeoptions*> % clear past defaults, set some new \def\beamer@extra@frameoptions<> \def\beamer@extra@setframeoptions#1% >> \def\defaultframeoptions\beamer@extra@setframeoptions> > \define@key% <\def\beamer@frameenvironmentsubst\beamer@extra@frameoptions> % A new frame option for wider items \define@key[30pt]> 

And then use it like:

\documentclass \usepackage \defaultframeoptions \begin \begin \frametitle \begin \item One \item Two \item Three \end \end \end
answered Aug 22, 2013 at 11:00 Juan A. Navarro Juan A. Navarro 63.3k 33 33 gold badges 143 143 silver badges 169 169 bronze badges This works perfectly, thank you Commented Jun 9, 2020 at 13:51 Also works for note ( beamernotes ) Commented Nov 2, 2020 at 12:24

Another solution that works with beamer is to redefine \item as suggested in this answer to a related question:

\let\olditem\item \renewcommand<\item>> 

This puts a space after items, even when they are followed by sub-items, unlike solutions based on \itemsep .

Rather than using a fixed size, this solution can be used with \fill so that the items (and sub-items) are spread out to fill the slide:

\let\olditem\item \renewcommand<\item>> 

This is useful for squeezing space when you want to put a bit more on a slide, or stretching space when a slide doesn't have so much content, so both look reasonable (within limits!).

answered Jun 12, 2015 at 17:22 Heather Turner Heather Turner 361 3 3 silver badges 6 6 bronze badges This changes the spacing between items but breaks arguments after \item like \item . Commented Sep 16, 2019 at 8:57

As the other answers show, it is quite viable to redefine the environments to your liking. A more beamer specific approach would be to have templates take care of these settings.

There are predefined templates available, that allow us to modify the behaviour of itemize and enumerate environments alike. The following 6, one per line, can be used to decorate these environments.

itemize/enumerate body begin itemize/enumerate body end itemize/enumerate subbody begin itemize/enumerate subbody end itemize/enumerate subsubbody begin itemize/enumerate subsubbody end 

The sub and subsub templates are used for nesting these environments. The body begin templates, and especially the itemize/enumerate body begin template, can be used to "globally" set item-spacing in itemize (and enumerate) environments for beamer.

(Currently) Beamer starts our subject environments like this

\usebeamertemplate \list \beamer@cramped \raggedright \beamer@firstlineitemizeunskip 

For nested environments it uses the subbody -versions of the template.

Let's focus on the internal macro \beamer@cramped : Currently, using only the beamer class and styles as provided by the beamer package, this macro is either empty, or \itemsep0pt\topsep0.5pt\relax . At least \itemsep is one of the settings we are looking for and it is a list -specific (and therefore itemize and enumerate specific) setting. Apparently this macro was introduced exactly for the purpose we are looking for!

This means we are unlikely to break anything, by modifying this macro. We can write templates like this:

\defbeamertemplate* < \let\this@beamer@cramped\beamer@cramped \renewcommand< \this@beamer@cramped \addtolength<\itemsep> > > \defbeamertemplate*

I constructed this code in order to fit the question. Personally, I don't do the \let and \addtolength things. I simply define \beamer@cramped to set \itemsep to an absolute value, i.e.

\renewcommand

I keep the \relax at the end of my \beamer@cramped definition, because the original authors of \beamer@cramped probably had a reason to put it there in the first place.

The tricky thing is that we need to set \itemsep after \list is called, which means, we cannot simply set \itemsep in the template. By modifying \beamer@cramped we can put our code at a useful position.

It is possible that all of this happens inside of groups, so that our redefinition of `\beamer@cramped is only effective for a specific environment and its nested environments, I didn't investigate.