# Modify page number on header with scrpage2 and lastpage

I am writing a curriculum vitae using Plasmati Graduate CV Latex template. I have made some modifications in order to add both a footer and a header, using the packages scrpage2 and lastpage. I am satisfied with the resulting footer, but I have problems with the page numbering in the header.

In the header, the page numbering appears two times (see picture):

1. In the format "page/total number of pages" (which is what I want);
2. Only the page number in the upper right part.

I would like like to remove the simple page numbering (i.e. element 2. of the list above) and leave only the "page/total number of pages" format.

Is this possible?

The code I am using is:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LaTeX Template
% Version 1.0 (24/3/13)
%
% http://www.LaTeXTemplates.com
%
% Original author:
% Alessandro Plasmati (alessandro.plasmati@gmail.com)
%
%
% Important note:
% This template needs to be compiled with XeLaTeX.
% from here: http://www.exljbris.com/fontin.html
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%-----------------------------------------------------------------------

\documentclass[a4paper,12pt]{article} % Default font size and paper size

\defaultfontfeatures{Mapping=tex-text}
\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin} % Main document font

\usepackage{xunicode,xltxtra,url,parskip} % Formatting packages

\usepackage[usenames,dvipsnames]{xcolor} % Required for specifying custom   colors

\usepackage[big]{layaureo} % Margin formatting of the A4 page, an alternative to layaureo can be \usepackage{fullpage}
% To reduce the height of the top margin uncomment: \addtolength{\voffset}{-1.3cm}

\usepackage{titlesec} % Used to customize the \section command
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule] % Text formatting of sections
\titlespacing{\section}{0pt}{3pt}{3pt} % Spacing around sections
\titleformat{\subsection}{\large\itshape\raggedright}{}{0em}{} % Text formatting of subsections

\newcommand\tab[1][2.58cm]{\hspace*{#1}} % Horizontal space

\usepackage{scrpage2} % Provides headers and footers configuration
\usepackage{marvosym} % Allows the use of symbols
\usepackage{xecolor} %Package for colors
\usepackage{blindtext}

%----------------------------------------------------------------------------------------
%----------------------------------------------------------------------------------------

\usepackage{lastpage} % To show the page number as "N/TOT"

%----------------------------------------------------------------------------------------
% FOOTER SECTION
%----------------------------------------------------------------------------------------

\cfoot{
\addfontfeature{LetterSpace=20.0}\fontsize{9.0}{18}\selectfont % Letter spacing and font size

\textcolor{gray}{NNN \textsc{SSS}} \\ % Name and date
}

\begin{document}

\font\fb=''[cmr10]'' % Change the font of the \LaTeX command under the skills section

%----------------------------------------------------------------------------------------
%   CV
%----------------------------------------------------------------------------------------

\par{\centering{\Huge NNN \textsc{SSS}}\bigskip\par} % Your name

\section{Personal details}

\blinditemize

\blinditemize

\section{Education}

\blinditemize

\section{Areas of interest}

\blinditemize

\section{Teaching activity}

\blinditemize

\section{Other activities}

\blinditemize

\end{document}


This is the resulting pdf:

Thanks!

• Use \clearscrheadfoot to remove the predefined contents of the header and footer fields before you set your own contents. Alternatively you can add \ohead[]{} to your code. – esdd Dec 14 '16 at 17:40
• Thanks a lot ! \clearscrheadfootsolved my problem! – GLB Dec 14 '16 at 20:23

Use \clearscrheadfoot to remove the predefined contents of the header and footer fields before you set your own contents.

\usepackage{scrpage2}

Alternatively you can add \ohead[]{} to your code.
• I have the issue that it shows the page number only on the first page. \pagestyle{scrheadings} does not function only \thispagestyle{scrheadings}. How can I get the footer on all pages in my cv/resume? – Til Hund Mar 31 '17 at 20:35