3

I am following this template to build a resume. When there are multiple pages, I was wondering how to put my name on every page? Thanks!

The code is (you may need to download the res.cls file from the link above)

\documentclass[margin, 10pt]{res} % Use the res.cls style, the font size can be changed to 11pt or 12pt here

\usepackage{helvet} % Default font is the helvetica postscript font

\setlength{\textwidth}{5.1in} % Text width of the document

\begin{document}

\moveleft.5\hoffset\centerline{\large\bf John Smith} % Your name at the top

\moveleft\hoffset\vbox{\hrule width\resumewidth height 1pt}\smallskip % Horizontal line after name; adjust line thickness by changing the '1pt'

\moveleft.5\hoffset\centerline{123 Broadway} % Your address
\moveleft.5\hoffset\centerline{City, State 12345}
\moveleft.5\hoffset\centerline{(000) 111-1111 or (111) 111-1112}

\begin{resume}
...
\end{resume}

\end{document}
Tim
  • 5,763

1 Answers1

4

If you use the package fancyhdr then you can put the following in your preamble:

\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Tim}

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 style noname.

\def\myname{John Smith}
\def\myleftfoot{LEFT FOOT}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{LEFT}
\chead{\myname}
\rhead{RIGHT}
\lfoot{\myleftfoot}
\cfoot{CENTER}
\rfoot{RIGHT}

Then define a new page style as follows

\makeatletter
\def\ps@noname{%%'
  \def\myname{}%%'
  \def\myleftfoot{I've been changed temporarily}%%'
}
\makeatother

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.

A.Ellett
  • 50,533
  • Thanks! I added the code, but it doesn't look good. Especially on the first page, there was already my name on top, and you code added another name there. The template code can be downloaded from the link I gave, if you are willing to try. – Tim Aug 08 '13 at 05:45
  • 1
    I'd suggest you post a MWE, including premable, then I would be in a better position to suggest modifications that would help achieve what you're trying to do. But a quick answer would be to put \thispagestyle{empty} on the problem page: though that is likely to kill more than you most like want. – A.Ellett Aug 08 '13 at 05:47
  • @Tim I've updated my answer. Hopefully this better meets your needs. – A.Ellett Aug 08 '13 at 16:10