# How to insert page numbers on some frames produced by Beamer?

I wonder how to insert the page numbers (say) on the top left-corner of the frames of my presentation file (excluding the first frame -namely the Title Frame- and the last one, namely the Thank-You Frame) - in a (PDF)LaTeX.

I have used the \documentclass{beamer} in the TeX file as follows.

\documentclass[
%
%pdf,
%noFooter,
%draft,
%nocolorBG,
%slideBW,
%colorBG,
%slideColor,
%ntnu
%winter
%autumn
]{beamer}

\usepackage{amsmath}
\usepackage{rotating}
\usepackage{graphicx}
\usepackage{multimedia}

\usecolortheme{orchid}
\usecolortheme{whale}

\title[Title of the presentation]{Title of the presentation}
\author[Dept. of Mathematical Sciences, NTNU \hspace{1mm} Name]{Name}
\institute{\href{http://www.ntnu.no}
{Norwegian University of Science and Technology}}
\date{Month, Year}

\begin{document}

\newcommand{\dif}{\, \mathrm{d}}
\def\norml       {\mid\!\mid\!}
\def\normr       {\!\mid\!\mid}
\def\normel       {\mid\!\mid\!\mid\!}
\def\normer       {\!\mid\!\mid\!\mid}

\maketitle

\begin{frame}\frametitle{Frame Title}

\end{frame}

.....

\end{document}

-
The title and body of your question are somewhat confusing. Do you mean that you want to add frame or page numbers on the PDF file (sort of postprocessing, like when we generate handouts), or using Latex+Beamer directly? –  chl Jan 24 '11 at 22:19

1. In order to display the frame number at the top left corner, you should add this to the preamble:

\setbeamertemplate{headline}{\scriptsize{\vspace*{0.3cm}\hspace*{0.3cm}\insertframenumber}}


Changing the measurements will result in different positions.

1. If you want to hide the number in any frame, you should place the line

\thispagestyle{empty}


after the command to begin the frame.

2. The only downside of this is that you'd have the numbering starting at the titlepage, so in case you hide it, your numbering would start from "2". To fix this, and restart numbering from the first actual frame, insert this line after the command to begin the frame (i. e., the frame you chose to be page one):

\setcounter{framenumber}{1}


OR: There's also a (much) simpler way to do something similar. There's command

\useoutertheme{infolines}


which will add author, title and page count at bottom of each frame. You can also try to modify the footline to display only the information you want.

-
Thank you "arbolitoloco" for your assistance. –  user3130 Feb 1 '11 at 12:44

You can get a "page of total" output in the form x/y beside the title if you do this:

begin{frame}