[Tex/LaTex] res.cls hfill addresses

cvresume

I'm trying to have my phone number float to the right margin, but hfill doesn't seem to work within an address in res.cls.

\address{email@email.com (555) 555-5555}

So I try to change that to:

\address{email@email.com \hfill (555) 555-5555}

but it doesn't work. hfill has no effect here, any ideas on how to get this to work? I've poked around res.cls but don't see any obvious fixes… well at least for me, I'm a latex noob. Thanks for your help.

Best Answer

The class res.cls is somewhat old and it is not flexible; I would suggest you to consider using a more modern class to typeset your CV (See Writing Applications for a Job / CV). To solve your particular problem, you can use \parboxes:

\documentclass{res}
\usepackage{lipsum}

\begin{document}

\begin{resume}
\name{ABC}
\address{\parbox[t]{.3333\textwidth}{\hfill}\parbox[t]{.3333\textwidth}{\centering email@email.com}\parbox[t]{.3333\textwidth}{\raggedleft (555) 555-5555}}
\opening
\lipsum[4]
\end{resume}

\end{document}

enter image description here