31

I've noticed that when I change the font size of a list, the font size is not automatically changed for its sublists. Is there a way to change the font size for a whole list?

\documentclass{beamer}
\usetheme{Dresden}
\setbeamertemplate{footline}
  {
    \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
    \end{beamercolorbox}
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,
      leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}
      \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}
      \hfill
      {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}
    \end{beamercolorbox}
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,
      leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}
      {\usebeamerfont{title in head/foot}\insertshorttitle} \hfill     \insertframenumber,/\inserttotalframenumber
    \end{beamercolorbox}
    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
    \end{beamercolorbox}
  }
\usecolortheme{beaver}
\setbeamercolor{itemize item}{fg=darkred}
\setbeamercolor{itemize subitem}{fg=red}
\setbeamercolor{enumerate item}{fg=darkred}
\setbeamercolor{block title}{fg=darkred}
\setbeamercolor{institute in head/foot}{fg=darkred}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\begin{document}

\begin{frame}
\frametitle{Frame title}
{\footnotesize
\begin{itemize}
\item First item 
\item Second item
\item Third item
\item Fourth item
\item Fifth item
\begin{itemize}
\item First subitem
\item Second subitem
\end{itemize}
\end{itemize}

}
\end{frame}

\end{document}

In this example, the font size of the third and fourth item would be bigger than the size of the previous list elements.

3 Answers 3

36

When working with beamer one always should use beamer syntax:

\documentclass{beamer}
\usetheme{Dresden}


\setbeamertemplate{itemize/enumerate body begin}{\large}
\setbeamertemplate{itemize/enumerate subbody begin}{\tiny}

\begin{document}

\begin{frame}
\frametitle{Frame title}

\begin{itemize}
\item First item 

\begin{itemize}
\item First subitem
\item Second subitem
\end{itemize}
\end{itemize}


\end{frame}

\end{document}

This simply sets the item body to a size. One level below (3rd) can be accessed via \setbeamertemplate{itemize/enumerate subsubbody begin}{<...>}. As one may encounter, the labels aren't properly aligned after the change of the fontsize. This is a result of beamers' manual like definition of the alignment of the labels. The orginal definition is \defbeamertemplate*{itemize item}{default}{\scriptsize\raise1.25pt\hbox{\donotcoloroutermaths$\blacktriangleright$}} so one needs to alter the size and the vertical position of labels. One may even need to alter the skips between the items.

1
  • The problem for me is that when a slide has few words, they might as well be \normalsize. But when there's a lot that I need to put on a slide (yes, I do), \small or \footnotesize is large enough and allows me to fit all of the text on the page. So I don't want a global change. I want a per-slide change that propagates into sublists.
    – Mars
    Commented May 10 at 16:35
12

Please always post complete documents that show the problem. I get consistent font size when I tried your fragment, but you may have conflicting packages.

In this case it seems to be a beamer feature which you can avoid by changing one line to say

\footnotesize \let\small\footnotesize

Makes \small locally the same as \foototesize so when beamer decides to insert \small no harm is done. (There may be a proper beamer configuration for this I don't know beamer that well)

Original answer:

I fixed a couple of markup errors (the inner {} are not needed and there should be a blank line before the closing } of a font size command. But they make no difference in this case.

enter image description here

\documentclass{article}

\begin{document}

{\footnotesize
\begin{itemize}
\item First item
\item Second item
\begin{itemize}
\item Third item
\item Fourth item
\end{itemize}
\end{itemize}

}

\end{document}
2
  • Thanks, I've updated my question fixing the markup errors and adding the complete code. Commented Jan 13, 2013 at 12:19
  • 3
    David appears to be quite right, as usual: there does not seem to be a Beamer-native way to ensure that all sub[sub]lists are typeset at the same size as outer lists. Possibly this is because of an assumption that lower-level lists should be smaller à la Powerpoint. I would be interested to know if anyone has a way of fixing this, preferably permanently. Commented Aug 20, 2013 at 21:04
0

Adding to the other answers but focusing on applying the sizing to one slide only: one can use \begingroup and \endgroup around the frame to ensure it's only applied on the selected frame(s).

\documentclass{beamer}
\usetheme{Dresden}

\begin{document}

\begingroup
\begin{frame}
\frametitle{Frame title}
\setbeamertemplate{itemize/enumerate body begin}{\large}
\setbeamertemplate{itemize/enumerate subbody begin}{\tiny}

\begin{itemize}
\item First item 

\begin{itemize}
\item First subitem
\item Second subitem
\end{itemize}
\end{itemize}


\end{frame}
\endgroup

\end{document}
2
  • Welcome to TeX.SE!
    – Mensch
    Commented Jun 10 at 14:44
  • 1
    Each frame is automatically in a group. If you make the font size changes within the frame, you don't need an extra group around it. Commented Jun 10 at 14:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .