我试图将图像放在简历中我的名字正上方的中央(即屏幕截图中的红线应该位于图像的中间),但图像似乎位于“关于我”部分左右边距的中心(即蓝线之间),而不是页面的左右边距的中心(即绿线之间)。
我怎样才能将图片置于我的名字正上方?以下是我得到的结果:
% 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}
答案1
在margin
文档类别选项下res
1.3in
,实际简历正文左侧的“部分标题”的边距为。因此,只需在图像右侧添加\hspace*{1.3in}
(请注意,*
因为我们不希望在行尾丢失胶水)即可抵消此偏移量...
\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}