3

I want to have slide numbers in the table of contents in beamer. I found this useful post and it works for me, but I also need the page numbers for subsubsections. Unfortunately, I have no idea, what to change in this verbose code.

Table of contents with page numbers

Any help would be greatly appreciated. Thank you.

Daniel

2

Those information are stored in the .toc file. You just need to tell how to use them. See beamerbasetoc.sty for more information.

\documentclass{beamer}

\begin{document}

\makeatletter
\def\beamer@endinputifotherversion#1{}
\def\beamer@sectionintoc#1#2#3#4#5{{\huge #2 \hfill page #3 \par}}
\def\beamer@subsectionintoc#1#2#3#4#5#6{{\normalsize #3 \hfill page #4 \par}}
\def\beamer@subsubsectionintoc#1#2#3#4#5#6#7{{\tiny #4 \hfill page #5 \par}}

\frame{
    \tableofcontents
}

\section{Section 1}\frame{}\frame{}
    \subsection{Subsection 1-1}\frame{}\frame{}
        \subsubsection{Subsubsection 1-1-2}\frame{}\frame{}
        \subsubsection{Subsubsection 1-1-2}\frame{}\frame{}
    \subsection{Subsection 1-2}\frame{}\frame{}
        \subsubsection{Subsubsection 1-2-2}\frame{}\frame{}
        \subsubsection{Subsubsection 1-2-2}\frame{}\frame{}
\section{Section 2}\frame{}\frame{}
    \subsection{Subsection 2-1}\frame{}\frame{}
        \subsubsection{Subsubsection 2-1-2}\frame{}\frame{}
        \subsubsection{Subsubsection 2-1-2}\frame{}\frame{}
    \subsection{Subsection 2-2}\frame{}\frame{}
        \subsubsection{Subsubsection 2-2-2}\frame{}\frame{}
        \subsubsection{Subsubsection 2-2-2}\frame{}\frame{}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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