5

I am using the moderncv package with the classic style. I find that the page numbers do not appear if the text on the last page goes all the way to the bottom and is just on the verge of requiring another page.

This is the best minimal example I could develop, which I created by modifying the template that comes with the moderncv package:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}

\usepackage[scale=0.75]{geometry}

\firstname{John}
\familyname{Doe}
\title{Resume title}
\address{street and number}{postcode city}{country}\mobile{+1~(234)~567~890}
\phone{+2~(345)~678~901}
\fax{+3~(456)~789~012}
\email{john@doe.org}
\homepage{www.johndoe.com}
\extrainfo{additional information}
\quote{Some quote}

\begin{document}

\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}

\section{Master thesis}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}

\section{Experience}
\subsection{Vocational}
\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
Detailed achievements:%
\begin{itemize}%
\item Achievement 1;
\item Achievement 2, with sub-achievements:
  \begin{itemize}%
  \item Sub-achievement (a);
  \item Sub-achievement (b), with sub-sub-achievements (don't do this!);
    \begin{itemize}
    \item Sub-sub-achievement i;
    \item Sub-sub-achievement ii;
    \item Sub-sub-achievement iii;
    \end{itemize}
  \item Sub-achievement (c);
  \end{itemize}
\item Achievement 3.
\end{itemize}}
\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}
\subsection{Miscellaneous}
\cventry{year--year}{Job title}{Employer}{City}{}{Description}

\section{Languages}
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvitemwithcomment{Language 2}{Skill level}{Comment}
\cvitemwithcomment{Language 3}{Skill level}{Comment}

\section{Computer skills}
\cvdoubleitem{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
\cvdoubleitem{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}
\cvdoubleitem{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}

\section{Interests}
\cvitem{hobby 1}{Description}
\cvitem{hobby 2}{Description}
\cvitem{hobby 3}{Description}

\section{Extra 1}
%\cvlistitem{UNCOMMENT THIS LINE OUT AND THE NUMBERS WILL DISAPPEAR.}
\cvlistitem{Item 2}
\cvlistitem{Item 2}
\cvlistitem{Item 3. This item is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}
\cvlistitem{Item 3. This item is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}
\cvlistitem{Item 3. This item is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}
\cvlistitem{Item 3. This item is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}

\section{Extra 2}
\cvlistdoubleitem{Item 1}{Item 4}
\cvlistdoubleitem{Item 2}{Item 5\cite{book1}}
\cvlistdoubleitem{Item 3}{Item 6. Like item 3 in the single column list before, this item is particularly long to wrap over several lines.}

\section{References}
\begin{cvcolumns}
  \cvcolumn{Category 1}{\begin{itemize}\item Person 1\item Person 2\item Person 3\end{itemize}}
  \cvcolumn{Category 2}{Amongst others:\begin{itemize}\item Person 1, and\item Person 2\end{itemize}(more upon request)}
  \cvcolumn[0.5]{All the rest \& some more}{\textit{That} person, and \textbf{those} also (all available upon request).}
\end{cvcolumns}

\end{document}

Note the line about two-thirds of the way through:

%\cvlistitem{UNCOMMENT THIS LINE OUT AND THE NUMBERS WILL DISAPPEAR.}

I find that if I uncomment this line, then the page numbers disappear. With it commented out, the page numbers appear.

  • Welcome to TeX.sx! A tip: You can highlight the code and click the "code" button (with "{}" on it). – Peter Jansson Mar 29 '13 at 21:36
  • Use \usepackage[scale=0.8]{geometry} to get them back. Or even scale=0.76 works for me. – user11232 Mar 29 '13 at 23:30
  • 1
    I have reported the bug to the author of the package. The problem can also be solved without adjusting the overall geometry by adding the line \enlargethispage{6pt} at the bottom. – Josh Mar 30 '13 at 15:28
  • 2
    I think the problem is not so much the \cvlistitem line mentioned but the cvcolumns environment at the end; as it is, one gets an overfull box warning and my guess is that this environment hides the page numbering. – Gonzalo Medina Mar 30 '13 at 16:56
  • I do not believe this to be the case as my actual tex document (not the minimal example provided above) does not have any cvcolumns environments whatsoever and still yields the problem. Furthermore, if you adjust the order of the sections in the minimal example above so that the cvcolumns environment does not appear at the end, the problem still occurs. – Josh Mar 30 '13 at 18:42
12

I have the same problem and I can't solve it in the suggested ways. For me, the following hack solved it:

\usepackage{lastpage}

\rfoot{\textit{\small{\thepage/\pageref{LastPage}}}}
| improve this answer | |
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. In particular, it is best to post complete working examples rather than code snippets. – Andrew Swann Apr 4 '14 at 11:33
  • To make it look like exactly how it should be, you can also give gray text color. Use second line like this: \rfoot{\textcolor{gray}{\textit{\small{\thepage/\pageref{LastPage}}}}} – Utku Özdemir Sep 24 '14 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.