10

I am using the Fancy CV tempate and I would like to put an image on the top right corner.

I managed to do that using :

\begin{picture}(50,50)
\put(335,10){\hbox{\includegraphics[scale=1]{img/photoCircle}}}
\end{picture}

Which produces :

Title with photo

But this moves the rest of the page.

It should be like this :

Without photo

So I was wondering, is there any way to force images and text to be on different layers and force the image to be "floating" (not moving the text)

JPi
  • 13,595
Alexi Coard
  • 203
  • 1
  • 2
  • 6

2 Answers2

12

The tikzpagenodes package is specifically designed for this purpose. You can put just about anything you want in the node, albeit that for more complicated structures it can take a little digging to find out how.

enter image description here

\documentclass{article}



\usepackage{tikzpagenodes}

\begin{document}


\begin{tikzpicture}[remember picture,overlay,shift={(current page.north east)}]
\node[anchor=north east,xshift=-1cm,yshift=-1cm]{\includegraphics[width=1cm]{example-image-a}};
\end{tikzpicture}



\end{document}
JPi
  • 13,595
  • 1
    As of late 2022, \usepackage{tikzpagenodes} does not seem to be required/working anymore. Instead I got the snippet working with \usepackage{tikz} \usetikzlibrary{positioning}. – Maëlan Nov 10 '22 at 11:53
3

I agree with JPi's answer, but at least currently, the tikz package contain all the functions in this code, so just using package tikz as below is OK.

\documentclass{article}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[remember picture,overlay,shift={(current page.north east)}] \node[anchor=north east,xshift=-1cm,yshift=-1cm]{\includegraphics[width=1cm]{example-image-a}}; \end{tikzpicture}

\end{document}

Pelapi Chi
  • 31
  • 1