[Tex/LaTex] How to make the contents of the address center-adjusted( change the default format of the address tag?)

addresseshorizontal alignmentresume

I am trying to write my resume with LaTeX, and if you see the following image, the contents of the address is left-adjusted.

enter image description here

What do I do to make them center-adjusted?
The code I used is as follows:

\documentclass[margin]{res} 
\begin{document} 
\name{\LARGE \bf MY NAME\\[12pt]} % the \\[12pt] adds a blank line after name
\address{ADDRESS STREET APT NUMBER\\ CITY, STATE ZIPCODE   \\ 
    PHONE-NUMBER }
\end{document} 

Best Answer

You can redefine \@tablebox used internally by res.cls to typeset the name and address; the original definition is

\def\@tablebox#1{\begin{tabular}[t]{@{}l@{\extracolsep{\fill}}}#1\end{tabular}}

and he'res the necessary redefinition:

\documentclass[margin]{res} 

\makeatletter
\def\@tablebox#1{\begin{tabular}[t]{@{}c@{}}#1\end{tabular}}
\makeatother

\name{\LARGE \bf MY NAME\\[12pt]} % the \\[12pt] adds a blank line after name
\address{ADDRESS STREET APT NUMBER\\ CITY, STATE ZIPCODE   \\ 
    PHONE-NUMBER }

\begin{document} 

\begin{resume}
test
\end{resume}

\end{document}

enter image description here

Perhaps you should consider using a more modern class to typeset your CV? The moderncv class is one of the classes available (you can get templates and examples here); other possibilitiescan be explored in CTAN: Writing Applications for a JOB/CV.