4

I'm making a resume based on a latex template (link: https://www.sharelatex.com/templates/cv-or-resume/cies-breijs-resume ) and I'd like to insert a figure.

There is some free space in the template in the upper right corner (if you take away the date) where I would like to insert the figure. I however can't manage to get a small picture there in the correct spot. Have tried with wrapfigure and regular figure in multiple places and with multiple settings. Purpose is to have a small profile picture in the upper right corner. Can anybody help?

The relevant code is:

% Start a document with the here given default font size and paper size.
\documentclass[10pt,a4paper]{article}

% Set the page margins.
\usepackage[a4paper,margin=0.75in]{geometry}

% Setup the language.
\usepackage[english]{babel}
\hyphenation{Some-long-word}

% Makes resume-specific commands available.
\usepackage{resume}




\begin{document}  % begin the content of the document
\sloppy  % this to relax whitespacing in favour of straight margins


% title on top of the document
\maintitle{Cies Breijs}{June 12, 1982}{Last update on \today}

\nobreakvspace{0.3em}  % add some page break averse vertical spacing

% \noindent prevents paragraph's first lines from indenting
% \mbox is used to obfuscate the email address
% \sbull is a spaced bullet
% \href well..
% \\ breaks the line into a new paragraph
\noindent\href{mailto:cies.at.kde.dot.nl}{cies\mbox{}@\mbox{}kde.nl}\sbull
\textsmaller{+}31.646469087\sbull
{\newnums cies010} \emph{(Skype)}\sbull
\href{http://www.linkedin.com/in/ciesbreijs}{www.linkedin.com/in/ciesbreijs}
\\
Mathenesserplein 84\sbull
3022\thinspace {\large \sc ld}\sbull
Rotterdam\sbull
The Netherlands

\spacedhrule{0.9em}{-0.4em}  % a horizontal line with some vertical spacing before and after

\roottitle{Summary}  % a root section title

The rest is not included but available in the link.

Edit:

Example of my second issue (see comment to accepted answers). The blue is the image that is off-page, i.e., too much in the upper right corner. It would be better if the center of the image roughly coincided with the red text. The red text is scratched out to protect privacy.

enter image description here

2 Answers 2

12

No need for extra packages; simply include your image with a standard \includegraphics and use \smash, as in

The Netherlands\hfill 
\smash{\includegraphics[width=3cm]{example-image-a}}

A complete example:

enter image description here

The code:

\documentclass[10pt,a4paper]{article}
\usepackage[a4paper,margin=0.75in]{geometry}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{resume}

\begin{document}
\sloppy

\maintitle{Cies Breijs}{June 12, 1982}{}

\nobreakvspace{0.3em}

\noindent\href{mailto:cies.at.kde.dot.nl}{cies\mbox{}@\mbox{}kde.nl}\sbull
\textsmaller{+}31.646469087\sbull
{cies010} \emph{(Skype)}\sbull
\href{http://www.linkedin.com/in/ciesbreijs}{www.linkedin.com/in/ciesbreijs}
\\
Mathenesserplein 84\sbull
3022\thinspace {\large \sc ld}\sbull
Rotterdam\sbull
The Netherlands\hfill 
\smash{\includegraphics[width=3cm]{example-image-a}}

\spacedhrule{0.9em}{-0.4em}

\roottitle{Summary}

\end{document}

Update

If the image's height is too big, one could reduce it in \includegraphics, as in

\includegraphics[height=2cm]{example-image-a}

or use instead something like

The Netherlands\hfill 
\raisebox{-.5\totalheight}[0pt][.5\totalheight]{\includegraphics[width=3cm,height=5cm]{example-image-a}}
8
  • Thanks, this works. I do have one small problem however, Smash seems to work with the down border of my picture rather than the center, causing it to go outside the page. Any way to smash the center point? Jan 27, 2015 at 15:43
  • @SvenAkkermans Sorry, I don't understand what you mean by "smash the center point". Can you please elaborate on the problem? Jan 27, 2015 at 15:45
  • Apologies. I've edited my main post with additional explanation. Jan 27, 2015 at 15:54
  • @SvenAkkermans Ah, now I understand. Give me some seconds to give you a solution :) Jan 27, 2015 at 15:56
  • @SvenAkkermans Please see my updated answer, under the "Update" title and let me know if the proposed options solved the problem. Jan 27, 2015 at 16:02
6

You can place the image explicitly. There are different possibilities to do this. In my opinion the easiest one is to use TikZ

Type \usepackage{tikz} inside your preamble to load the package. To include the image write below \begin{document}

\begin{tikzpicture}[remember picture, overlay]
  \node [anchor=north east, inner sep=0pt]  at (current page.north east)
     {\includegraphics[height=3cm]{example-image}};
\end{tikzpicture}

Another possibility is to use the textpos package.

1

You must log in to answer this question.

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