1

How do I use the style beamer uses for the table of contents in other slides? I.e., make enumerates rather big and bold etc. Ideally, I'd like to do something like

\begin{frame}{My Outline}
  \styleframeastoc % NOT working, obviously.
  \begin{enumerate}
     ...
  \end{enumerate}
\end{frame}

Background

I want to define my own outline where below each heading there is a one-sentence explanation of what I'm gonna cover in that section. I.e.:

  1. First Approach

    A very simple and straightforward approach that however only works in an ideal world.

  2. Second Approach

    Refinement of the first approach to ...

  3. ...

I figured that it would be easiest to not use the actual TOC mechanism for that, but rather insert the respective slides "manually" (there are only 5 or so sections anyways).

2
  • maybe using the actual TOC and injecting your sentences? ` \begin{frame} \tableofcontents[sections=1] blabla1 \tableofcontents[sections=2] blabla2 \tableofcontents[sections=3] blabla3 \end{frame}` Nov 9, 2015 at 17:00
  • @samcarter: that gives me too much vertical space between the sections and the texts. Also, the texts are not indented to be on the same level as the section titles. (tested with the default theme and Warsaw) I could probably hack it to look acceptable, but then the whole purpose of using a theme is not having to hack anything.
    – srs
    Nov 9, 2015 at 17:50

2 Answers 2

1

You could do something like:

\documentclass{beamer}
\setbeamertemplate{section in toc}[sections numbered]

\newcommand{\injecttext}[1]{%
    \vskip-2\baselineskip
    \setlength{\leftskip}{1.2em}
    #1\par
    \setlength{\leftskip}{0em}
}

\begin{document}

\begin{frame}
\tableofcontents
\end{frame}


\begin{frame} 
\tableofcontents[sections=1] 
\injecttext{blabla1 blabla1 blabla1 blabla1 blabla1 blabla1 blabla1 blabla1 blabla1 blabla1 blabla1} 
\tableofcontents[sections=2] 
\injecttext{blabla2} 
\tableofcontents[sections=3] 
\injecttext{blabla3} 
\end{frame}

\section{bla}\frame{}
\section{test}\frame{}
\section{blub}\frame{}

\end{document}

enter image description here

[However the alignment will probably be wrong, if you mange to squeeze more than 9 sections on one page]

1

It is unlikely that OP still need this information. But their might be researchers looking for the layout of beamer TOC.

The TOC command is defined as follows

\def\beamer@tableofcontents[#1]{%
  \def\beamer@toc@cs{show}%
  \def\beamer@toc@os{show}%
  \def\beamer@toc@css{show}%
  \def\beamer@toc@oss{show}%
  \def\beamer@toc@ooss{show}%
  \def\beamer@toc@csss{show}%
  \def\beamer@toc@osss{show}%
  \def\beamer@toc@oosss{show}%
  \def\beamer@toc@ooosss{show}%
  \beamer@showpartnumber=\c@part%
  \beamer@pausesectionsfalse%
  \beamer@pausesubsectionsfalse%
  \def\beamer@tocsections{<*>}%
  \setkeys{beamertoc}{firstsection=1}%
  \setkeys{beamertoc}{#1}%
  \vspace*{-.5em}{\makeatletter%
    \pause[0]%
    \@input{\jobname.toc}%
    \vfill}%
  }

Where \jobname.toc stores all TOC items, which looks lije this

\beamer@endinputifotherversion {3.36pt}
\beamer@sectionintoc {1}{A}{1}{0}{1}
\beamer@subsectionintoc {1}{1}{A1}{1}{0}{1}
\beamer@subsubsectionintoc {1}{1}{1}{A1i}{1}{0}{1}
\beamer@subsubsectionintoc {1}{1}{2}{A1ii}{1}{0}{1}
\beamer@subsectionintoc {1}{2}{A2}{1}{0}{1}
\beamer@subsubsectionintoc {1}{2}{1}{A2i}{1}{0}{1}
\beamer@subsubsectionintoc {1}{2}{2}{A2ii}{1}{0}{1}
\beamer@sectionintoc {2}{B}{1}{0}{2}
\beamer@subsectionintoc {2}{1}{B1}{1}{0}{2}
\beamer@subsubsectionintoc {2}{1}{1}{B1i}{1}{0}{2}
\beamer@subsubsectionintoc {2}{1}{2}{B1ii}{1}{0}{2}
\beamer@subsectionintoc {2}{2}{B2}{1}{0}{2}
\beamer@subsubsectionintoc {2}{2}{1}{B2i}{1}{0}{2}
\beamer@subsubsectionintoc {2}{2}{2}{B2ii}{1}{0}{2}

Each lines corresponds to a TOC item. For example \beamer@subsubsectionintoc {2}{1}{2}{B1ii}{1}{0}{2} is the {2}nd section, {1}st subsection, {2}nd subsubsection, {B2ii} is the title, and {1}{0}{1} stands for something else.

Therefor to typeset list in TOC's format, one could write:

\documentclass{beamer}
\begin{document}

\makeatletter
\def\fakeTOC#1{%
  \def\beamer@toc@cs{show}%
  \def\beamer@toc@os{show}%
  \def\beamer@toc@css{show}%
  \def\beamer@toc@oss{show}%
  \def\beamer@toc@ooss{show}%
  \def\beamer@toc@csss{show}%
  \def\beamer@toc@osss{show}%
  \def\beamer@toc@oosss{show}%
  \def\beamer@toc@ooosss{show}%
  \beamer@showpartnumber=\c@part%
  \beamer@pausesectionsfalse%
  \beamer@pausesubsectionsfalse%
  \def\beamer@tocsections{<*>}%
  \setkeys{beamertoc}{firstsection=1}%
  \setkeys{beamertoc}{}%
  \vspace*{-.5em}{%
    \beamer@endinputifotherversion {3.36pt}%
    #1%
    \vfill%
  }%
}
\def\TOCsec#1{%
    \beamer@sectionintoc{0}{#1}{0}{0}{0}%
}
\def\TOCsubsec#1{%
    \beamer@subsectionintoc{0}{0}{#1}{0}{0}{0}%
}
\def\TOCsubsubsec#1{%
    \beamer@subsubsectionintoc{0}{0}{0}{#1}{0}{0}{0}%
}
\makeatother

\frame{
    \fakeTOC{%
        \TOCsec{fake sec A}
        \TOCsubsec{fake subsec A-1}
        \TOCsubsubsec{fake subsubsec A-1-i}
        \TOCsubsubsec{fake subsubsec A-1-ii}
        \TOCsubsec{fake subsec A-2}
        \TOCsubsubsec{fake subsubsec A-2-i}
        \TOCsubsubsec{fake subsubsec A-2-ii}
        \TOCsec{fake sec B}
        \TOCsubsec{fake subsec B-1}
        \TOCsubsubsec{fake subsubsec B-1-i}
        \TOCsubsubsec{fake subsubsec B-1-ii}
        \TOCsubsec{fake subsec B-2}
        \TOCsubsubsec{fake subsubsec B-2-i}
        \TOCsubsubsec{fake subsubsec B-2-ii}
    }
}

\section{true sec A}
\subsection{true subsec A-1}
\subsubsection{true subsec A-1-i}
\subsubsection{true subsec A-1-ii}
\subsection{true subsec A-2}
\subsubsection{true subsubsec A-2-i}
\subsubsection{true subsubsec A-2-ii}
\section{true sec B}
\subsection{true subsec B-1}
\subsubsection{true subsubsec B-1-i}
\subsubsection{true subsubsec B-1-ii}
\subsection{true subsec B-2}
\subsubsection{true subsubsec B-2-i}
\subsubsection{true subsubsec B-2-ii}

\frame{
    \tableofcontents
}

\end{document}

You must log in to answer this question.

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