I've recently used a LaTeX template to make both a resume and cover letter using res.cls and letter.sty respectively. However, I would like to have both documents display my name, a horizontal line and my address, all centered, and in the same place place on both documents. The code which does this in res.cls is:
% LaTeX resume using res.cls
\documentclass[margin]{res}
%\usepackage{helvetica} % uses helvetica postscript font (download helvetica.sty)
%\usepackage{newcent} % uses new century schoolbook postscript font
\setlength{\textwidth}{5.1in} % set width of text portion
\begin{document}
% Center the name over the entire width of resume:
\moveleft.5\hoffset\centerline{\large\bf NAME}
% Draw a horizontal line the whole width of resume:
\moveleft\hoffset\vbox{\hrule width\resumewidth height 1pt}\smallskip
% address begins here
% Again, the address lines must be centered over entire width of resume:
\moveleft.5\hoffset\centerline{1 ABC Street}
\moveleft.5\hoffset\centerline{AUSTRALIA 2000}
\moveleft.5\hoffset\centerline{5555 555 555}
...
But I'm unsure how to do this in letter.sty. Currently the code is:
% Cover letter using letter.sty
\documentclass{letter} % Uses 10pt
%Use \documentstyle[newcent]{letter} for New Century Schoolbook postscript font
% the following commands control the margins:
\topmargin=-1in % Make letterhead start about 1 inch from top of page
\textheight=8in % text height can be bigger for a longer letter
\oddsidemargin=0pt % leftmargin is 1 inch
\textwidth=6.5in % textwidth of 6.5in leaves 1 inch for right margin
\begin{document}
\thispagestyle{empty}
\pagestyle{empty}
\signature{NAME} % name for signature
\longindentation=0pt % needed to get closing flush left
\let\raggedleft\raggedright % needed to get date flush left
\begin{flushleft}
{\large\bf NAME}
\end{flushleft}
\medskip\hrule height 1pt
\begin{flushright}
\hfill 1 ABC Street \\
\hfill AUSTRALIA 2000 \\
\hfill 5555 555 555
\end{flushright}
\vfill % forces letterhead to top of page
...
Can anyone with more experience than I have, suggest a fix that will work identically for both documents?
res.cls. Isletterthe default LaTeX document class? – Werner Feb 19 '13 at 05:32