[Tex/LaTex] How to add a photo using the res class

graphicsresume

I'm using the res class for my resume, but none of the examples show how to add a photo.
How do I add a 2×2 photo somewhere in the upper corners without breaking the layout? (I'm using example #2 in the link)

Best Answer

Add the following code to the preamble; instead of logo write the name of your photo:

\usepackage{graphicx}
\newcommand{\addphoto}[2]{%
  \smash{%
    \makebox[0pt][l]{%
      \raisebox{#1mm}{%
        \hspace{#2mm}\includegraphics[width=2.5cm]{logo}%
      }%
     }%
  }%
}

Then in the first address write

\address{\addphoto{5}{150}%
  {\bf Present Address} \\
   204 Pawling Avenue \\ Troy, NY 12180  \\
   (518) 273-4617 }

The two arguments to \addphoto are the vertical and horizontal displacements in millimeters. Just play with them until you're satisfied.