我是 LaTeX 的新手,使用 Overleaf 撰写我的新简历。
我的问题是,我想在姓名部分的右端(即文档的右上角)添加一张护照大小的照片,因此我希望能够将姓名和电子邮件地址行左对齐,以便照片占用的空间被视为此部分右边距的一部分,并且文档看起来均匀。
现在它与原始对齐,这意味着姓名和电子邮件地址行右侧的空白与左侧的空白相同。
PS:我附上了乳胶代码的开头,以便让您了解我所使用的模板和样式:
\documentclass[]{deedy-resume-openfont}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TITLE NAME
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\namesection{RAM}{SHARMA}{
\urlstyle{same}\href{https://github.com/ramXYZ}{GitHub} |href{mailto:[email protected]}{[email protected]} | (+91)8tabcdef9}
%This is the section(name and email) which want to move to the left, so that I can add my image.
答案1
您可以根据自己的喜好调整下面的代码——可以根据选择插入日期
\documentclass{article}
\usepackage[showframe]{geometry}%<------------only for check, remove for finals
\author{RAM SHARMA \\mailto:[email protected] \\[email protected]}
\title{\textbf{XXX YYYY ZZZZ}}
\usepackage{array}
\usepackage[demo]{graphicx}
\date{}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\begin{document}\noindent
\begin{tabular}{C{11cm}L{3.5cm}}
{\maketitle} & \raisebox{-3\baselineskip}{\includegraphics[width=\linewidth]
{example-image-a}}
\end{tabular}
\end{document}
答案2
为此,我使用了Overleaf 上的 Deedy 简历模板。默认情况下,名称部分布局居中:
添加
\usepackage{graphicx}
到文档前言,然后使用以下设置\namesection
代替默认设置:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TITLE NAME
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\namesection{Debarghya}{Das}{ \urlstyle{same}\href{http://debarghyadas.com}{debarghyadas.com}| \href{http://fb.co/dd}{fb.co/dd}\\
%\href{mailto:[email protected]}{[email protected]} | 607.379.5733 | \href{mailto:[email protected]}{[email protected]}
%}
% Retrieve definition of \namesection from .cls and update
% Left named section
\begin{minipage}[t]{0.5\textwidth}%
{%
\fontsize{40pt}{60pt}%
\fontspec[Path = fonts/lato/]{Lato-Hai}\selectfont Debarghya
\fontspec[Path = fonts/lato/]{Lato-Lig}\selectfont Das
}\\[5pt]
{%
\color{headings}
\fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{14pt}\selectfont
\urlstyle{same}\href{http://debarghyadas.com}{debarghyadas.com}| \href{http://fb.co/dd}{fb.co/dd}\\
\href{mailto:[email protected]}{[email protected]} | 607.379.5733 | \href{mailto:[email protected]}{[email protected]}%
}
\end{minipage}%
% Right passport section
\begin{minipage}[t]{0.5\textwidth}
\raggedleft
\raisebox{\dimexpr-\height+30pt}{\includegraphics[height=65pt]{sample-image.png}}
\end{minipage}
\vspace{5pt}
\noindent\makebox[\linewidth]{\color{headings}\rule{\paperwidth}{0.4pt}}
\vspace{-5pt}
这个想法是将两个minipage
并排设置,左边保存命名内容,右边保存图像。