1

I am having trouble adding a footer to my second page of the resume. I just need my name and page number. Someone, please help, I am new to this. This is the code I am using:

\documentclass[a4paper,12pt]{article}

%A Few Useful Packages
\usepackage{marvosym}
\usepackage{fontspec}                   %for loading fonts
\usepackage{xunicode,xltxtra,url,parskip}   %other packages for formatting
\RequirePackage{color,graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[big]{layaureo}              %better formatting of the A4 page
% an alternative to Layaureo can be ** \usepackage{fullpage} **
\usepackage{supertabular}               %for Grades
\usepackage{titlesec}                   %custom \section

\usepackage{enumitem}  %remove space between itemaized items


%Setup hyperref package, and colours for links
\usepackage{hyperref}
\definecolor{linkcolour}{rgb}{0,0.2,0.6}
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}

%FONTS
\defaultfontfeatures{Mapping=tex-text}
%\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin}
%%% modified for Karol Kozioł for ShareLaTeX use
\setmainfont[
SmallCapsFont = Fontin-SmallCaps.otf,
BoldFont = Fontin-Bold.otf,
ItalicFont = Fontin-Italic.otf
]
{Fontin.otf}
%%%

%CV Sections inspired by: 
%http://stefano.italians.nl/archives/26
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule]
\titlespacing{\section}{0pt}{3pt}{3pt}
%Tweak a bit the top margin
%\addtolength{\voffset}{-1.3cm}

%Italian hyphenation for the word: ''corporations''
\hyphenation{im-pre-se}

%-------------WATERMARK TEST [**not part of a CV**]---------------
\usepackage[absolute]{textpos}

\setlength{\TPHorizModule}{30mm}
\setlength{\TPVertModule}{\TPHorizModule}
\textblockorigin{2mm}{0.65\paperheight}
\setlength{\parindent}{0pt}

1 Answer 1

1

An answer with fancyhdr package solution. (very common way)

\documentclass[a4paper,12pt]{article}

%A Few Useful Packages
\usepackage{marvosym}
\usepackage{fontspec}                   %for loading fonts
\usepackage{xunicode,xltxtra,url,parskip}   %other packages for formatting
\usepackage{graphicx}%koleygr: removed color because you have xcolor
\usepackage[usenames,dvipsnames]{xcolor}

%koleygr:Commented out%\usepackage[big]{layaureo}             %better formatting of the A4 page
% an alternative to Layaureo can be ** \usepackage{fullpage} **
\usepackage{supertabular}               %for Grades
\usepackage{titlesec}                   %custom \section
\usepackage{fancyhdr}%koleygr: Added
\usepackage{lipsum}%Just for random text
\usepackage{enumitem}  %remove space between itemaized items


%Setup hyperref package, and colours for links
\usepackage{hyperref}
\definecolor{linkcolour}{rgb}{0,0.2,0.6}
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour, linkcolor=linkcolour}

%FONTS
\defaultfontfeatures{Mapping=tex-text}
%\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin}
%%% modified for Karol Kozioł for ShareLaTeX use
%koleygr:Commented out%\setmainfont[
%SmallCapsFont = Fontin-SmallCaps.otf,
%BoldFont = Fontin-Bold.otf,
%ItalicFont = Fontin-Italic.otf
%]
%{Fontin.otf}
%%%

%CV Sections inspired by: 
%http://stefano.italians.nl/archives/26
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule]
\titlespacing{\section}{0pt}{3pt}{3pt}
%Tweak a bit the top margin
\addtolength{\voffset}{-1.3cm}

%Italian hyphenation for the word: ''corporations''
\hyphenation{im-pre-se}

%-------------WATERMARK TEST [**not part of a CV**]---------------
\usepackage[absolute]{textpos}

\setlength{\TPHorizModule}{30mm}
\setlength{\TPVertModule}{\TPHorizModule}
\textblockorigin{2mm}{0.65\paperheight}
\setlength{\parindent}{0pt}

\author{Me}%koleygr: Temporary added
\title{Something}%koleygr: Temporary added
%koleygr:Added code here    
%koleygr:Added code
\fancyhf{}
\fancyfoot[CE,CO]{\vspace{20pt}%Remove if not needed
  Name Surname -Page \thepage-}
%\rfoot{Name Surname -\thepage-}%koleygr:Alternative
%\renewcommand{\footrulewidth}{0pt}%koleygr:May be wanted


\begin{document}
\pagestyle{plain}
\maketitle
\section{Section test 1}
\lipsum[1-3]
%Second page start
\pagestyle{fancy}

\section{Section test 2}
\lipsum[1-5]
\pagestyle{plain}%Next possible page
\lipsum[1-3]
\end{document}

Output:

enter image description here

1
  • Nice. Please consider accepting the answer. (You can use the tick symbol on its left)
    – koleygr
    Commented Mar 4, 2018 at 17:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .