[Tex/LaTex] Page numbers with moderncv package on MacTeX 2014 don’t show

moderncvpage-numbering

I am running OS X Yosemite Beta 6 with MacTeX 2014. In general everything seems to be working, however, when I create a resume with moderncv with more that one page the page numbers are not displayed on the right hand side of the footer. Here is a minimal example:

\documentclass[sans, letterpaper,10pt]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}

\name{John}{Doe}
%\title{}
\address{street}{postcode city}
\mobile{+4~(11)~311~111}
\phone{+2~(345)~678~901}
\fax{+3~(456)~789~012}
\email{mail@yahoo.com}
\homepage{www.johndoe.com}
\extrainfo{additional info}
% \photo[64pt][0.4pt]{picture.png}
%\quote{}

\begin{document}
\makecvtitle

\section{Experience}

\subsection{My work}
\cvcomputer{One}{Bla, Bla, Bla}{Two}{Bla,Bla,Bla}

\newpage

\section{Foreign Languages}
\cvitemwithcomment{English}{Fluent}{Some description here}

\newpage

\section{Other Skills}
\cvitemwithcomment{Computers}{Very good}{Some description here}

\end{document}

I have also tried to compile the code with pdflatex, xelatex, and lualatex and they don't seem to have any effect on the behaviour of the moderncv.

I know similar questions have come here, but I didn't see a resolution being offered. People have suggested using \rfoot, but since the page numbers are defined in moderncv, I would like to find what goes wrong in my file.

Thanks,

Hooman

Best Answer

I don't know why this is needed (seems as it should be the default behavior), but to obtain the page numbering you can add

\usepackage{lastpage}
\rfoot{\addressfont\itshape\textcolor{gray}{Page \thepage\ of \pageref{LastPage}}}

which yields:

enter image description here

Related Question