3

I'm trying to center an image right above my name in my resume (i.e. the red line in the screenshot should go down the middle of the image), but it seems like the image is centered between the left and right margins of the About Me section (i.e. between the blue lines), not the left and right margins of the page (i.e. between the green lines).

enter image description here

How can I center the image right above my name? Here's what I got:

% LaTeX file for resume
% This file uses the resume document class (res.cls)

\documentclass[margin]{res}
% the margin option causes section titles to appear to the left of body text
%\usepackage{helvetica} % uses helvetica postscript font (download helvetica.sty)
%\usepackage{newcent} % uses new century schoolbook postscript font
\usepackage{url}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{pifont}
\usepackage{textcomp}
\usepackage{paralist}
\usepackage{etaremune}

\usepackage{xcolor}
\renewcommand\thefootnote{\textcolor{black}{\arabic{footnote}}}

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

\setlength{\skip\footins}{0.5cm}

\hypersetup{colorlinks=true,urlcolor=blue}

\newcommand\blfootnote[1]{%
  \begingroup
  \renewcommand\thefootnote{}\footnote{#1}%
  \addtocounter{footnote}{-1}%
  \endgroup
}

\addtolength{\textheight}{26pt}

\begin{document}

\begin{center}
\includegraphics[scale=0.05]{me}
\end{center}

% \name{BJ PETER DELACRUZ\\[12pt]}
\name{BJ PETER DELACRUZ}

\address{\href{mailto:[email protected]}{[email protected]}\hspace{0.25cm}\textborn\hspace{0.25cm}\href{http:/    /www.bjpeter.com}{www.bjpeter.com} \\ \today}

\begin{resume}

\section{About Me}
Certified Java developer with three years of work experience.
Upgraded and added new features to an open source learning management system.

\end{resume}
\end{document}
2
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Commented Dec 31, 2015 at 7:04
  • did you try to add the picture as part of the name ?
    – Elad Den
    Commented Dec 31, 2015 at 7:10

1 Answer 1

3

Under the margin document class option for res, a margin of 1.3in is set for "sectional titles" to the left of the actual resume body. So, just add \hspace*{1.3in} (note the * as we don't want glue to be lost at the end of the line) on the right of your image to offset this offset...

enter image description here

\documentclass[margin]{res}
\usepackage{graphicx}

\begin{document}

\begin{center}
  \includegraphics[width=100pt]{example-image-golden-upright}\hspace*{1.3in}
\end{center}

\name{My Name}

\address{[email protected] \makebox[2em]{$\star$} www.whocares.com}

\begin{resume}

abc

\end{resume}

\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .