Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Page X of Y in LaTeX Footer

Tags:

latex

Is there a way to dynamically get Page X of Y in LaTeX using the fancy pagestyle or is some other package needed?

like image 630
fny Avatar asked Nov 21 '10 04:11

fny


1 Answers

Use the lastpage package:

\usepackage{lastpage}
\usepackage{fancyhdr}
...
\cfoot{\thepage\ of \pageref{LastPage}}

will put the current page counter \thepage, in front of the total number of pages.

Edit Thanks! I added fancyhdr.

like image 111
Chris Avatar answered Sep 28 '22 07:09

Chris