Page Layoutset page number 1/1 with moderncv

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Chris1234
Posts: 2
Joined: Wed Jan 26, 2011 3:56 pm

set page number 1/1 with moderncv

Post by Chris1234 »

Hi,
I'm writing a one-page cv with moderncv. To convey to the reader that it is really only a one page cv I want to put a 1/1 at the end of the page. However this is suppressed. With cvs more than one page, page numbering is 1/2 and 2/2 by default.
If I place \setcounter{page}{2} for a single page cv it really shows 2/2, but no success with 1/1, for example \setcounter{page}{1}.

Thanks in advance, Chris


One-page cvs might look like this cut off example:(edit: uncommented photo)

Code: Select all

%% start of file `template_en.tex'.
%% Copyright 2006-1008 Xavier Danaux (xdanaux@gmail.com).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.


\documentclass[11pt,a4paper]{moderncv}

% moderncv themes
\moderncvtheme[blue]{casual}                 % optional argument are 'blue' (default), 'orange', 'red', 'green', 'grey' and 'roman' (for roman fonts, instead of sans serif fonts)
%\moderncvtheme[green]{classic}                % idem

% character encoding
\usepackage[utf8]{inputenc}                   % replace by the encoding you are using

% adjust the page margins
\usepackage[scale=0.8]{geometry}
%\setlength{\hintscolumnwidth}{3cm}						% if you want to change the width of the column with the dates
%\AtBeginDocument{\setlength{\maketitlenamewidth}{6cm}}  % only for the classic theme, if you want to change the width of your name placeholder (to leave more space for your address details
\AtBeginDocument{\recomputelengths}                     % required when changes are made to page layout lengths

% personal data
\firstname{John}
\familyname{Doe}
\title{Resumé title (optional)}               % optional, remove the line if not wanted
\address{street and number}{postcode city}    % optional, remove the line if not wanted
\mobile{mobile (optional)}                    % optional, remove the line if not wanted
\phone{phone (optional)}                      % optional, remove the line if not wanted
\fax{fax (optional)}                          % optional, remove the line if not wanted
\email{email (optional)}                      % optional, remove the line if not wanted
\extrainfo{additional information (optional)} % optional, remove the line if not wanted
%\photo[64pt]{picture}                         % '64pt' is the height the picture must be resized to and 'picture' is the name of the picture file; optional, remove the line if not wanted
\quote{Some quote (optional)}                 % optional, remove the line if not wanted

%\nopagenumbers{}                             % uncomment to suppress automatic page numbering for CVs longer than one page


%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}
\maketitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}  % arguments 3 to 6 are optional
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}  % arguments 3 to 6 are optional

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

\end{document}


%% end of file `template_en.tex'.
Last edited by Chris1234 on Sun Feb 06, 2011 3:10 pm, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

set page number 1/1 with moderncv

Post by Frits »

I'm not familiar with moderncv, but how about using the packages fancyhr and lastpage?

By using the following code it might work:

Code: Select all

\pagestyle{fancy}
\rfoot{\thepage\ of \pageref{LastPage}}
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
Chris1234
Posts: 2
Joined: Wed Jan 26, 2011 3:56 pm

Re: set page number 1/1 with moderncv

Post by Chris1234 »

Thanks, that was what I was looking for :)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

set page number 1/1 with moderncv

Post by localghost »

Chris1234 wrote:[…] that was what I was looking for […]
Then please mark the topic (not the last post) accordingly as written in the Board Rules (to be read before posting).


Best regards and welcome to the board
Thorsten
Post Reply