1

I have had a look at this thread here but that did not help me solve my problem. This post suggests defining another environment so that nothing breaks, but since I am using a style file, it is not helpful.

What I would like to do is to set \setlength{\itemsep}{\fill} for all the itemize environments in my beamer presentation. I would like to achieve this by somehow modifying all the itemize, enumerate and similar environments in the theme file for my presentation.

Thanks for the inputs.

Here's a minimal working example

\documentclass[xcolor=dvipsnames]{beamer}
\mode<presentation>

\usetheme{MyCustomTheme}
\begin{document}

\begin{frame}
  \frametitle{No Title}
  \begin{itemize} 
    \setlength{\itemsep}{\fill}
    \item item 1
    \item item 2
    \item item 3
  \end{itemize}
\end{frame} 

\end{document}

As you can see, I have used the \setlength{\itemsep}{\fill} command in my file. I would like to put the command somewhere in beamerthemeMyCustomTheme.sty so that I can have the effect without having to do it every time, for every presentation that is ever made using this theme.

The contents of beamerthemeMyCustomTheme.sty file presently are:

\mode<presentation>

%Loading essential fonts, changing default encoding to UTF-8 for symbol support
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

%Using a defailt outer theme to begin with
\useoutertheme[subsection=false]{smoothbars}

%Setting default structure
\definecolor{beamer@blendedblue}{RGB}{78,38,131}%

%Changing the colors of hyperlinks
\definecolor{links}{HTML}{2A1B81}
\hypersetup{colorlinks,linkcolor=blue!40!structure,urlcolor=links}

%Specifying colors and shadings for various aspects
\setbeamercolor{headline}{bg=white,fg=structure.fg}
\setbeamercolor{footline}{fg=white,bg=structure.fg!85!black}
\setbeamercolor{author in head/foot}{bg=white,fg=structure.fg!85!black}
\setbeamercolor{title in head/foot}{bg=white,fg=structure.fg!85!black}
\setbeamercolor{frametitle}{bg=white,fg=structure.fg!90}
\setbeamercolor{section in head/foot}{bg=white,fg=structure.fg}
\setbeamercolor{subsection in head/foot}{bg=white,fg=structure.fg}
\setbeamercolor{subtitle}{fg=black}
\setbeamercolor{title}{fg=structure,bg=white}

\mode
<all>
ste_kwr
  • 419
  • Sorry but it seems that every help isn't expedient as long as we don't know your introduced style file. It ought be the best if you add a minimal working example. – Marco Daniel May 20 '13 at 09:45
  • I'm not sure what to provide for a minimal working example. But I've given it a shot. – ste_kwr May 23 '13 at 23:08
  • @set_kwr we don't know if your style file redefines the list-like environments. Can you please upload the beamerthemeMyCustomTheme.sty file here (or elsewhere (pastebin, for example), and provide a link here, if it is too long)? – Gonzalo Medina May 24 '13 at 00:05
  • It doesn't. It is simply a bunch of \setbeamercolor and \usebeamerfont commands. I've updated it in the post, however. – ste_kwr May 24 '13 at 05:28

1 Answers1

2

beamer defines the global structure of list environments in the file beamerbaselocalstructure.sty. Inside this file the default definitions are done be the following commands: % % List stuff %

\setlength\leftmargini  {2em}
\setlength\leftmarginii  {2em}
\setlength\leftmarginiii  {2em}
\setlength  \labelsep  {.5em}
\setlength  \labelwidth{\leftmargini}
\addtolength\labelwidth{-\labelsep}

\def\@listi{\leftmargin\leftmargini
            \topsep 3\p@ \@plus2\p@ \@minus2.5\p@
            \parsep 0\p@
            \itemsep3\p@ \@plus2\p@ \@minus3\p@}
\let\@listI\@listi
\def\@listii{\leftmargin\leftmarginii
              \topsep    2\p@ \@plus1\p@ \@minus2\p@
              \parsep    0\p@   \@plus\p@
              \itemsep   \parsep}
\def\@listiii{\leftmargin\leftmarginiii
              \topsep    2\p@ \@plus1\p@ \@minus2\p@
              \parsep    0\p@   \@plus\p@
              \itemsep   \parsep}

If you want to change \itemsep to \fill you can simply redefine these commands:

\def\@listi{\leftmargin\leftmargini
            \topsep 3\p@ \@plus2\p@ \@minus2.5\p@
            \parsep 0\p@
            \itemsep\fill}
\let\@listI\@listi
\def\@listii{\leftmargin\leftmarginii
              \topsep    2\p@ \@plus1\p@ \@minus2\p@
              \parsep    0\p@   \@plus\p@
              \itemsep   \fill}
\def\@listiii{\leftmargin\leftmarginiii
              \topsep    2\p@ \@plus1\p@ \@minus2\p@
              \parsep    0\p@   \@plus\p@
              \itemsep   \fill}

Related to your example:

\documentclass[]{beamer}
\makeatletter
\def\@listi{\leftmargin\leftmargini
            \topsep 3\p@ \@plus2\p@ \@minus2.5\p@
            \parsep 0\p@
            \itemsep\fill}
\let\@listI\@listi
\makeatother
\begin{document}
\begin{frame}
  \frametitle{No Title}
  \begin{itemize} 

    \item item 1
    \item item 2
    \item item 3
  \end{itemize}
\end{frame} 
\end{document}

enter image description here

Marco Daniel
  • 95,681
  • Thanks a ton. This is exactly what I was looking for. I had expected that I would need to redefine those, but did not know how to do that. – ste_kwr May 24 '13 at 23:15