latextikzoverleaf

Overlaying off-margin figure over another on Latex using Tikz


I was hoping anyone could help me with this. I am working with Latex and the Tikz package (I'm a new user on both) on a document cover using 2 figures so it looks like this:

Target configuration

That is, the background image leaves a thin margin on all sides, and the logo falls off-margin to the right and bottom. So, I enter the code overlaying the the logo over the background using Tikz, and as soon as I edit the coordinates to get the logo to go off-margin either on the right or bottom, the background image starts moving to the left and top until it sticks to the opposing borders of the page, like this:

What I am getting

My question is, is there a way to have the superimposing image to fall off the margins while keeping the background image properly centered?

Here is the code I'm using:

\usepackage{mwe,tikz}

\begin{figure}
\begin{tikzpicture}[      
        every node/.style={anchor=south west,inner sep=20pt},
        x=1mm, y=1mm,
      ]   
     \node (fig1) at (0,0)
       {\includegraphics[scale=0.2]{Images/Background.jpg}};
     \node (fig2) at (124,-23)
       {\includegraphics[scale=1.5]{Images/Logo.png}};  
\end{tikzpicture}
\end{figure}

I first tried using the Overpic package instead, but I found it to be rather limited (or I couldn't figure it out well enough probably). I then tried using \centering and other horizontal and vertical centering techniques in combination with Tikz, but to no avail.


Solution


  • \documentclass{article}
    
    \usepackage{tikz}
    
    \begin{document}
    
    \begin{tikzpicture}[remember picture,overlay]
         \node at (current page.center)      {\includegraphics[width=.9\paperwidth,height=.9\paperheight]{example-image-10x16}};
         \node at ([xshift=-2cm,yshift=1cm]current page.south east)       {\includegraphics[width=15cm]{example-image-duck}};  
    \end{tikzpicture}
    
    \end{document}
    

    enter image description here