如何在 Deedy-Resume 简历中添加个人资料图片

如何在 Deedy-Resume 简历中添加个人资料图片

新手 TEX 用户,无法将个人资料图片添加到我的简历中(基于 Deedy-Resume 模板)

\begin{document}

%----------------------------------------------------------------------------------------
%TITLE SECTION
%----------------------------------------------------------------------------------------

\smash{\includegraphics[width=3cm]{snow_circle.png}}  % <<<- I added this for picture 
\namesection{Debarghya}{Das}{ % Your name
\urlstyle{same}\url{http://debarghyadas.com} \\ % Your website, LinkedIn profile or other web address
\href{mailto:[email protected]}{[email protected]} | 607.379.5733 % Your contact information
}

但是,这会导致图片的一半出现在左上角。 在此处输入图片描述 有人能帮我让它看起来像, 在此处输入图片描述

如果您能告诉我如何将姓名字段拆分为两行,我将不胜感激。我的名字很长,我希望它分成两行而不是一行。这样它看起来就像下面这样:

PICTURE              ARAVINDH
                     SAMPATHKUMAR
                    other details

这是 .cls 文件中 /namesection 的代码,

\newcommand{\namesection}[3]{ % Defines the command for the main heading
\centering{ % Center the name
\fontsize{40pt}{60pt} % Font size
\fontspec[Path = fonts/lato/]{Lato-Hai}\selectfont #1 % First name font
\fontspec[Path = fonts/lato/]{Lato-Lig}\selectfont #2 % Last name font
} \\[5pt] % Whitespace between the name and contact information
\centering{ % Center the contact information
\color{headings} % Use the headings color
\fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{11pt}    {14pt}\selectfont #3} % Contact information font
\noindent\makebox[\linewidth]{\color{headings}\rule{\paperwidth}{0.4pt}} % Horizontal rule
\vspace{-5pt} % Reduce whitespace after the rule slightly
}

答案1

下面是一个代码,可以帮助您获得所需的内容,部分是经过反复试验的:

将其添加到您的序言中。该\namesection命令使用一个可选参数(`includegraphics 的选项)和 4 个强制参数(第一个参数是图形文件的名称)重新定义:

\usepackage{graphicx} 
\usepackage{tabularx} 
\renewcommand\tabularxcolumn[1]{ >{\centering\arraybackslash}m{#1}}

\renewcommand{\namesection}[5][]{% Defines the command for the main heading
\begin{tabularx}{\linewidth}{cX} % Center the name
\raisebox{-0.7\height}[0pt][0pt]{\includegraphics[#1]{#2}} & \fontsize{40pt}{60pt} % Font size
\fontspec[Path = fonts/lato/]{Lato-Lig}\selectfont #3 % First name font
\fontspec[Path = fonts/lato/]{Lato-Hai}\selectfont #4 % Last name font
 \\[5pt] % Whitespace between the name and contact information
 &\parbox{\linewidth}{\color{headings}% Use the headings color
\fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{14pt}\selectfont\centering #5}\smallskip
\end{tabularx}\\ % Contact information font
\noindent\makebox[\linewidth]{\color{headings}\rule{\paperwidth}{0.4pt}} % Horizontal rule
\vspace{-5pt} % Reduce whitespace after the rule slightly
}

用法:

\namesection[height=2cm]{YosemiteSam}% Your graphic file + optional argument for \includegraphics
{Aravindh}{Sampathkumar}{ % Your name
\href{mailto:[email protected]}{[email protected] } \\+1 864 643 8729% Your contact information
}

结果: 在此处输入图片描述

答案2

对于我来说,遵循代码解决了我的问题。

\includegraphics[height=3cm]{aditya.jpg} 

\vspace{-24mm}
\namesection {Aditya}{Sharma}
{ % Your name
\href{mailto:[email protected]}{[email protected]} \\+91 9001788368% Your contact information
}

确保 \includegraphics 和 \vspace 之间留有行距。

相关内容