TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question
Welcome to TeX.sx! A tip: You can use backticks ` to mark your inline code as I did in my edit. – Kurt Oct 19 '12 at 20:18
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
As @egreg mentioned we need more infos about the theme. Whats the name of the theme? Whats the name of the uni? Inside the theme is the building of tocs realized. Knowings this allows to help you ... – Kurt Oct 19 '12 at 21:56
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

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}



share|improve this answer
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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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