res.cls
internally issues
\pagestyle{empty}
Simply change the page style by writting
\pagestyle{plain}
in the preamble.
A complete example:
\documentclass{res}
\usepackage{lipsum}% just to generate text for the example
\pagestyle{plain}
\begin{document}
\lipsum[1-12]
\end{document}
Slight changes should be done in the main file and the class file. I will show you one by one.
First, the main editing document (.tex file)------
\documentclass{resume} % Use the custom resume.cls style
\usepackage{fontawesome}
\usepackage{hyperref}
\hypersetup{colorlinks, breaklinks,urlcolor=[rgb]{0.5,0,0}}
\usepackage[left=0.75in,top=0.6in,right=0.75in,bottom=0.6in]{geometry} % Document margins
\name{John Smith} % Your name
\address{} % Your address
\address{\faMapMarker\, 123 Main Street, New York, NY 0000 \\ \faGlobe\, website.com \\ \faPhone\, 123456789 \\ \faEnvelope\, john@smith.com}
\begin{document}
\end{document}
Now, the resume.cls file to be modified only at some places. Search for bullet in the class file, and replace the same by "vert". The code should read \def \addressSep {$\vert$}
instead of \def \addressSep {$\bullet$}
. In the class file itself, search for "head of the document" and use the following code. Note that, I have added \hrule
between the two addresses.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DOCUMENT: Create the head of the document
\let\ori@document=\document
\renewcommand{\document}{
\ori@document % Begin document
\printname % Print the name specified with \name
\@ifundefined{@addressone}{}{ % Print the first address if specified
\printaddress{\@addressone}}
\hrule
\@ifundefined{@addresstwo}{}{ % Print the second address if specified
\printaddress{\@addresstwo}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The complete class file for your reference-----
% resume.cls
% \documentstyle{resume}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (C) 2010 by Trey Hunner
%
% Copying and distribution of this file, with or without modification,
% are permitted in any medium without royalty provided the copyright
% notice and this notice are preserved. This file is offered as-is,
% without any warranty.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesClass{resume}[2010/07/10 v0.9 Resume class]
\LoadClass[11pt,letterpaper]{article}
\usepackage[parfill]{parskip} % Do not indent paragraphs
\usepackage{array} % required for boldface tabular columns
\usepackage{ifthen}
\nofiles % .aux files are not needed for resumes
\pagestyle{empty} % resumes do not need page numbers
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HEADINGS: Commands for printing name and address
\def \name#1{\def\@name{#1}} % \name command can be used to set name
\def \@name {} % Set \@name to empty by default
%\def \addressSep {$\diamond$} % Set default address seperator
\def \addressSep {$\vert$}
% Three address lines can be specified (directly below name)
\let \@addressone \relax
\let \@addresstwo \relax
\let \@addressthree \relax
% \address command can be used to set first and second address (optional) % address three added by Abhinav for his use
\def \address #1{
\@ifundefined{@addresstwo}{
\def \@addresstwo {#1}
}{
\def \@addressone {#1}
}
{
\def \@addressthree {#1}
}
}
% \printaddress is used to style an address line (given as input)
\def \printaddress #1{
\begingroup
\def \\ {\addressSep\ }
\centerline{#1}
\endgroup
\par
\addressskip
}
% \printname is used to print the name as a page header
\def \printname {
\begingroup
\hfil{\MakeUppercase{\namesize\bf \@name}}\hfil
\nameskip\break
\endgroup
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DOCUMENT: Create the head of the document
\let\ori@document=\document
\renewcommand{\document}{
\ori@document % Begin document
\printname % Print the name specified with \name
\@ifundefined{@addressone}{}{ % Print the first address if specified
\printaddress{\@addressone}}
\hrule
\@ifundefined{@addresstwo}{}{ % Print the second address if specified
\printaddress{\@addresstwo}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SECTIONS: Create section headings
% Used to create large resume section
\newenvironment{rSection}[1]{
\sectionskip
\MakeUppercase{\bf #1}
\sectionlineskip
\hrule
\begin{list}{}{
\setlength{\leftmargin}{1.5em}
}
\item[]
}{
\end{list}
}
% Used to format job listing
\newenvironment{rSubsection}[4]{
%%%%%%%%%%%%%%%%%%%%%% Default Layout: %%%%%%%%%%%%%%%%%%%%%%%%
%% Employer (bold) Dates (regular) %%
%% Title (emphasis) Location (emphasis) %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\bf #1} \hfill { #2}% Stop a space
\ifthenelse{\equal{#3}{}}{}{
\\
{\em #3} \hfill {\em #4}% Stop a space
}\smallskip
% \cdot used for bullets, items non-indented
\begin{list}{$\cdot$}{\leftmargin=0em}
\itemsep -0.5em \vspace{-0.5em}
}{
\end{list}
\vspace{0.5em}
}
\def\namesize{\huge}
\def\nameskip{\medskip}
\def\addressskip{\smallskip}
\def\sectionskip{\bigskip}
\def\sectionlineskip{\medskip}
The result is this:
Hope this resolves your query.
Best Answer
If you use the package
fancyhdr
then you can put the following in your preamble:Occasionally you may want a page to have a different format.
By defining commands to handle the contents of the various positions in the headers and footers and defining a new page style, you can selectively change only parts of the page style temporarily.
Here's some code to selectively change, for only one page, the header and footer of a page. The key here is the new command
\myname
and the new page stylenoname
.Then define a new page style as follows
Then on the page in question put the following line
\thispagestyle{noname}
The effect of redefining
\myname
only applies to the particular page for which you're changing the header and footer.