# Frame numbers “truncated” in beamer presentation after first two-digit frame number

I'm trying to test out the Wuerzburg theme for a beamer-presentation, but running into some difficulties with the frame numbers in the header (or footer).

In my preamble I have the following

\RequirePackage{atbegshi}
\documentclass{beamer}

\usepackage[english]{babel}

\mode<presentation>{\AtBeginSection{%
\begin{frame}
\frametitle{Contents}
\tableofcontents[currentsection]
\end{frame}}
\useoutertheme[nofootline]{wuerzburg}
\usecolortheme{shark}
\setbeamercovered{transparent}
}
\setbeamertemplate{frametitle continuation}[from second][(cont'd)]


The frame numbers show up in the header as desired, but they only look as they should for the first 9 frames. From frame 10/xx and on, something weird happens and the frame numbers end up being like as in the image I've attached. Same thing happens in the footer if i remove the nofootline option from the outer theme.

I've tried to take a look in the .sty file, and other examples I've found online, but since I'm not too familiar with beamer yet I haven't managed to figure out how to fix this.

The beamer theme is available at http://www.cgogolin.de/Computer.html .

-
It works as expected in the simple example I have created. Do you have the latest versions of the involved packages and do you get any warnings/errors in your compilation? – percusse Mar 14 '12 at 14:01
That was strange. When I compile your example it works as it should, but when I recompile my other document it goes back to the strange behavior. I updated all the LaTeX packages with tlmgr earlier today, so everything should be up to date. As for warnings, I only get an warning about a font shape that's not available (´Font shape T1/cmss/m/n' in size <4> not available´), otherwise nothing. – ritualmagick Mar 14 '12 at 14:07
Can you fill in your content one by one to my frames and see when it starts to fail? That would isolate the problem and then maybe your question can be answered. – percusse Mar 14 '12 at 14:13
Did some more testing now; seems like the problem occurs if I include \usepackage[T1]{fontenc} in my preamble. Should I avoid using this package with beamer, or? – ritualmagick Mar 14 '12 at 14:14

The problem occurs when fontenc slightly fattens the fonts used in the header/footer. This causes a line break in the frame counter box when there is an extra digit. A quick fix is to find the lines in the headline template (two of them) and increase the width of the box that is holding the frame counters i.e. from 12ex to 13ex
\begin{beamercolorbox}[wd=13ex,ht=2.25ex,dp=1ex,right,ignorebg]{headfoot}%
`