Document ClassesInserting pages number

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
gozzi84
Posts: 15
Joined: Tue Nov 25, 2008 3:25 pm

Inserting pages number

Post by gozzi84 »

Hi all,

I'm using the Beamer class for writing my dissertation slides...


how can I do if I want to add the numbers of pages in my presentation?

Thanks in advance!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Inserting pages number

Post by localghost »

See Section 8.2 (Components of a Frame, p. 59ff) of the beamer documentation and/or search its index for "page number".


Best regards
Thorsten¹
gozzi84
Posts: 15
Joined: Tue Nov 25, 2008 3:25 pm

Re: Inserting pages number

Post by gozzi84 »

The theme I have chosen has already a footer where it automatically puts my name and the title of my project...

If the theme doesn't support itself the page number (as for example the Boadilla theme does) can I add this feature fro example like this:

\setbeamertemplate{footline}
{
\insertframenumber
}



But this seems not to properly work. I wanted the page number at the right of the footline.

Thanks...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Inserting pages number

Post by Stefan Kottwitz »

Hi,

see Beamer: frame number in split theme footline for an example how to put the frame number into the footline even if it's not supported by the chosen beamer theme.

Stefan
LaTeX.org admin
gozzi84
Posts: 15
Joined: Tue Nov 25, 2008 3:25 pm

Re: Inserting pages number

Post by gozzi84 »

The first method

\setbeamertemplate{footline}[frame number]

is not so good because it cancels the footline of the original theme

The second approach instead

\expandafter\def\expandafter\insertshorttitle\expandafter{%
\insertshorttitle\hfill%
\insertframenumber\,/\,\inserttotalframenumber}

is better but it give me a lot of errors, one at the end of each frame.



The error is the following:

Illegal unit of measure (pt inserted)

Is that possible?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Inserting pages number

Post by Stefan Kottwitz »

Hi,

both approaches didn't raise errors in my documents. Other code of your document could be interferring. Perhaps show a minimal example of your code that produces this error.

Stefan
LaTeX.org admin
Post Reply