[Tex/LaTex] Res documentclass horizontal alignment issue

horizontal alignmentresume

I'm using the res document class to create a simple resume. I'm going for something that looks like this Creating a Resume Using LaTeX however I have to have my name and contact information centered at the top of the document instead of at the right and left.

I used the center environment, however it is only centering over the main content and ignoring the section headings. I understand that it is some sort of margin issue, however I am unsure of how to get it to center over the entire document. My source code is almost exactly like that in the link.

Best Answer

If you know the longest name of section, the following (not elegant) solution centers name over text of sections:

 %   \documentclass[line, margin]{res}
\documentclass[margin, centered]{res}

    \begin{document}
\newlength{\maxmarg}
\settowidth{\maxmarg}{\textbf{EXPERIENCE}}
    \name{\hspace{0.5\maxmarg} Max Burstein}
    \address{\hspace{0.5\maxmarg}1234 Herp Derp Lane \\ 
\hspace{0.5\maxmarg}Rabble, FL 34343 \\
\hspace{0.5\maxmarg} (516) 516-5165}

    \begin{resume}
    \section{EDUCATION}
    Bachelor of Science in Blog Writing \\
    University of Y Combinator, Palo Alto, CA \\
    Minor: Fantasy Football \\
    Expected to graduate May 2013 \\
    GPA: 4.0

    \section{SKILLS}
    \begin{itemize}
    \item Ruby
    \item C++
    \item Python
    \item System Administration
    \end{itemize}

    \section{EXPERIENCE}
    \textit{Detroit Red Wings Starting Center} \hfill 2011-2012 \\
    Was the starting center for the Detroit Red Wings until the strike :( Looking to play across the pond for a little bit. \\ [10pt]
    \textit{Green Bay Packers Starting Wide Receiver} \hfill 2010-2011 \\
    Was the starting WR for the Green Bay Packers during our super bowl run. I caught the game winning touchdown and decided to retire on top.

    \section{HONORS}
    \begin{tabular}{l l}
    May 2012 & \textbf{\textit{World's best double clicker}} \\ [5pt]
    July 2012 & \textbf{\textit{USA Candy Eating Champion}} \\ [5pt]
    December 2012 & \textbf{\textit{Inducted into the NFL Hall Of Fame}} \\
    \end{tabular}

    \end{resume}
    \end{document}

enter image description here

If you want more precise alingment, the initial value of \maxmarg should be enlarged by \sectionskip, which in res has the value 3.5ex plus 1ex minus -.2ex.

Related Question