0

Newbie TEX user, having trouble adding a profile picture to my CV (based on Deedy-Resume template)

\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
}

But, this results in half the picture showing up at the top left corner. enter image description here Could anybody help me make it look something like, enter image description here

Will be even more thankful if you could also tell me how to split the name field into two lines. My name is rather long and I would like it to rather be in two lines instead of one. So that it looks like below :

PICTURE              ARAVINDH
                     SAMPATHKUMAR
                    other details

Here is the code for /namesection in the .cls file,

\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
}
6
  • Welcome to TeX SX! Where can we find this template?
    – Bernard
    Commented Mar 13, 2017 at 18:33
  • Here is the original template : latextemplates.com/template/deedy-resume-cv Commented Mar 13, 2017 at 18:40
  • I'm sorry, but it produces no file on my system (some problem with fonts).
    – Bernard
    Commented Mar 13, 2017 at 19:41
  • The template does not support a profile picture by default, sorry.
    – Johannes_B
    Commented Mar 13, 2017 at 20:23
  • @Bernard I added my working copy of the TeX and files into a GitHub repo available here: github.com/aravindhsampath/resume_deedy It should also contain the necessary fonts that came with the template. Commented Mar 13, 2017 at 20:28

2 Answers 2

0

Here is a code to obtain what you want, partly with trial and errors:

Add this to your preamble. The \namesection command is redefined with one optional argument (the options for `includegraphics) and 4 mandatory argyments (the first argument being the name of the graphic file):

\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
}

Usage:

\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
}

Result: enter image description here

2
  • Strangely, just reusing the code snippet you posted yields an overlapping image and text to me. as in here Imgur Do you have any idea how I set an absolute location for the image, and then center the text amongst the rest of the space? Commented Mar 13, 2017 at 23:02
  • Probably your image is larger than mine. To solve your problem one would have to patch the \namesection command. I'll try post a code in a moment. What's more strange to me is I am unable to compile your file from within my editor, and it works fine from the command line!
    – Bernard
    Commented Mar 13, 2017 at 23:10
0

For me following the code solved my problem.

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

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

Be sure to include line space between \includegraphics and \vspace.

You must log in to answer this question.

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