I am using the Friggeri CV template and was wondering how I can superimpose a passport-sized photo on the right side of the default black header.
If this has already been answered, please comment below with the link. Thanks!
I am using the Friggeri CV template and was wondering how I can superimpose a passport-sized photo on the right side of the default black header.
If this has already been answered, please comment below with the link. Thanks!
You can use the tikz package and create a tikzpicture environment with the overlay option. You'll have to reference external nodes such as current page positions so you need the remember picture option as well, which allows you to reference nodes external to the environment. I've included a simple MWE below (include the tikzpicture environment after you've created the header). Note that you'll need to compile a couple of times for the image to show up.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=north east] at (current page.north east) {\includegraphics[width=5cm]{picture.png}};
\end{tikzpicture}
\end{document}
If you want to be able to adjust the position away from the extreme top right of the page, you can load the tikz library calc which allows you to save and recall x and y node coordinates (See this question's answer). In the MWE below, you can adjust the relative x and y position away from the top right by modifying the relevant subtracted values at the end of the \path line.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[remember picture, overlay]
\path let \p1 = (current page.north east) in node[anchor=north east] at (\x1-0cm,\y1-0cm) {\includegraphics[width=5cm]{screenshot.png}};
\end{tikzpicture}
\end{document}
I tested the above in the Friggeri resume template and they appeared to work correctly.