3

I've got the issue, that if I put in a background image with Tikz, my text get's moved and I'm having a hard time getting the right result.

This is the way I put the image in the Awesome CV:

\begin{tikzpicture}[remember picture,overlay]
\node (letter) at (18,-9)
{\includegraphics[width=0.2\paperwidth,height=0.2\paperwidth]{./icons/skills.pdf}};

\end{tikzpicture}

If it's unclear what I'm doing, I can provide a minimal example.

Edit1: I cannot reproduce the issue in a minimal example, but the weird thing is, that it in this example the pictures aren't in a column under each other:

\documentclass[11pt, a4paper]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage{blindtext}
\usepackage{tikz}
\begin{document}
\blindtext 
\begin{tikzpicture}[remember picture,overlay]
    \node (letter) at (2,2)
    {\includegraphics[width=0.2\paperwidth,height=0.2\paperwidth]{./icons/ausbildung.pdf}};
\end{tikzpicture}
\\
\blindtext 
\begin{tikzpicture}[remember picture,overlay]
    \node (letter) at (2,1)
    {\includegraphics[width=0.2\paperwidth,height=0.2\paperwidth]{./icons/skills.pdf}};
\end{tikzpicture}
\blindtext 
\begin{tikzpicture}[remember picture,overlay]
    \node (letter) at (2,0)
    {\includegraphics[width=0.2\paperwidth,height=0.2\paperwidth]{./icons/work.pdf}};
\end{tikzpicture}

\end{document}
  • 2
    If you can provide a minimal example, then provide a minimal example. – Skillmon Mar 14 '18 at 22:13
  • 1
    That's not weird, the tikzpicture is placed where you have placed it in the text, or rather it looks like (0,0) in the tikzpicture is placed there. The first \blindtext ends about ipsum" from the right margin, the second \blindtext ends slightly closer to the margin, and the last one ends roughly in the middle of the line. – Torbjørn T. Mar 14 '18 at 22:36
  • This answer can help... . – Paul Gaborit Mar 14 '18 at 22:38
  • Is it possible to handle the pictures independently from the text, like in an independent layer? – Peter Baintner Mar 15 '18 at 7:04
2

Coordinates inside a tikzpicture are relative to this tikzpicture, they are not related with other pictures and they are not absolute coordinates relative to the current page.

If you want to place a picture in background on a certain position over the current page, use current page node as reference. And if you want to place different images on background with relative positions, use references to previous images (with different names) or place all of them inside the same tikzpicture.

Following example shows both behaviours, first three pictures are placed on relative positions. The first is where it has been declared while second and third are below the first and second respectively. They are declared in three different tikzpicture but they could be in one.

The fourth picture is placed above current page.south position and the fifth is placed relative to this one.

\documentclass[11pt, a4paper]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage{duckuments}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}
\begin{tikzpicture}[remember picture, overlay]
    \node[anchor=north west] (One) 
    {\includegraphics[width=3cm]{example-image-duck}};
\end{tikzpicture}%
\blindduck 

\begin{tikzpicture}[remember picture, overlay]
    \node[below=1cm of One] (Two)
    {\includegraphics[width=3cm]{example-image-duck}};
\end{tikzpicture}%
\blindduck

\begin{tikzpicture}[remember picture, overlay]
    \node[below=1cm of Two] (Three)
    {\includegraphics[width=3cm]{example-image-duck}};
\end{tikzpicture}%
\blindduck

\begin{tikzpicture}[remember picture, overlay]
    \node[anchor=south] (Four) at (current page.south)
    {\includegraphics[width=3cm]{example-image-duck}};
\end{tikzpicture}%

\begin{tikzpicture}[remember picture, overlay]
    \node[above right= 2cm and 3cm of Four] (Fifth) 
    {\includegraphics[width=3cm]{example-image-duck}};
\end{tikzpicture}%

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.