I have googled extensively and found no answer to my specific question. My problem is: I am creating lecture slides using the beamer class. My style file is University-specific. I have, in my first \section, more than 9 \subsections. When I create the \tableofcontents, this looks like here:


Notice that the subsections with number >9 have a missing (or, at least, not visible) space between the number and the name of the subsection (e.g.: 1.10Vibromyogramm (VMG)).

How can I prevent this and make my TOC more legible?


After following some initial answers, \usepackage{tocloft} is not the solution since it does not work with the beamer class (others have noticed that, too - see List of Figures + Beamer?). Using tocloft causes pdflatex to fail with !LaTeX Error: \l@section undefined (it fails in the file tocloft.sty - and, as a previous poster said, lying to tocloft by defining the command as empty beforehand doesn't do any good either).


In reply to some comments by my fellow Latexers: If I only have, say, 3 \subsections, the spacing is exactly the same. Also, I do not think the reason is not only the style file; however, here is one line from the beamer font theme that is needed to understand the answer:

% Schriftart Helvetica
\renewcommand*{\familydefault}{\sfdefault} % Standard ist serifenlos


Thanks to Heiko's answer (see below), I have now found the solution to my problem. Thanks a bunch!

  • 1
    Welcome to TeX.sx! A tip: You can use backticks ` to mark your inline code as I did in my edit. – Mensch Oct 19 '12 at 20:18
  • 1
    It's quite hard to tell without knowing some details about the theme. – egreg Oct 19 '12 at 21:37
  • With only 9 sections is the spacing between the subsection number and the subsection name the same or different than it is currently? – Scott H. Oct 19 '12 at 21:47
  • I replied to your specific comments in the second edit above... I do not think it is the theme. In my google hunt, I have seen this problem quite some times, but w/o a satisfying solution. In a normal presentation, you would not have so many subsections, but in the specific case of a lecture... So maybe it is really the way that beamer creates the toc that is the problem. I just hate it. It does not look good. – Bjoern Oct 19 '12 at 23:17
  • The solution by Heiko below works perfectly fine. Thanks for the help! Most of the comments can be removed, if the admins would like that. – Bjoern Oct 20 '12 at 9:49

This solution creates a new option subsections numbered with max number of template subsection in toc that takes a section number as argument that is used for the maximal width of the number.


% from beamerfontthemefau-4-3.sty

% Define a new option `subsections numbered with max number'
% for template `subsection in toc'. The original code for
% `subsections numbered' can be found in beamerbaseauxtemplates.sty:
% \defbeamertemplate{subsection in toc}{subsections numbered}{%
%   \leavevmode
%   \leftskip=2em%
%   \rlap{%
%     \hskip-2em%
%     \inserttocsectionnumber.\inserttocsubsectionnumber
%   }%
%   \inserttocsubsection
%   \par
% }

\defbeamertemplate{subsection in toc}{subsections numbered with max number}[1]{%

\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered with max number]{1.10}



  • Heiko, your solution works perfectly. Thank you for your effort. I can not upvote, but I hope others will do. – Bjoern Oct 20 '12 at 9:42

In beamerbasetoc.sty there is \def\subsectionintoc{} which appears to be responsible for setting subsections in the toc. I haven't used beamer, so I don't know if there is a good reason not to do the following, or whether it will work for you, but try including the following in your preamble:


      \advance\beamer@tempcount by\beamer@sectionadjust%
      % the following line originally read
      % \def\inserttocsubsection{\hyperlink{Navigation#4}{#3}}%
      % you can add a skip before printing the subsection name
      \def\inserttocsubsection{\hyperlink{Navigation#4}{\hskip 5pt #3}}% 
        {subsection in toc}%


Alternatively, you might try to add the skip manually via.

\subsection{\unexpanded{\hskip 5pt}title}


\subsection{\hskip 5pt title}

Both of which seem to work with what I have as a 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.