4

I have a page of text formatted in LaTeX and I want to place an image in some position of the page, so that it doest not change the text layout by any means - I mean as if I printed the page and glued an image in the place I wish. Is it possible to do it with LaTeX?

8
  • 2
    Welcome to TeX-SE! Yes, this is possible with TikK (for instance) using overlay,remember picture. Try \documentclass{article} \usepackage{lipsum} \usepackage{tikz} \begin{document} \begin{tikzpicture}[overlay,remember picture] \node at (current page.center){\includegraphics{example-image-duck}}; \end{tikzpicture} \lipsum[1-3] \end{document}
    – user121799
    May 18, 2019 at 13:56
  • @marmot It is TikZ not TikK :)
    – user156344
    May 18, 2019 at 14:00
  • 3
    We could rename it: Ti*k*K ist *kein* Koala. ;-)
    – user121799
    May 18, 2019 at 14:04
  • @marmot Would you like to add an answer?
    – CarLaTeX
    May 19, 2019 at 6:49
  • @CarLaTeX Let's wait till we know what the OP really wants. They could be looking for eso-pic or something like this.
    – user121799
    May 19, 2019 at 13:27

2 Answers 2

3

You can also do this with TikZ alone:

\documentclass{article}

\usepackage{lipsum}
\usepackage{tikz}

\begin{document}

\lipsum[1-3]

\begin{tikzpicture}[remember picture, overlay]
    \node [shift={(-6cm, -3.5cm)}, rotate=35] at (current page.north east)
        { \includegraphics[scale=0.6]{stamp.png} };
\end{tikzpicture}

\end{document}

Given the stamp.png, this produces:

under investigation stamp superimposed on lorem ipsum text

2

When it comes to absolute positioning of an image at a specific spot of the page, the tikzpagenodes package, which loads tikz, is often useful. It knows the text area and other things. One can use xshift and yshift to place the image away from some standard anchor by a specified distance.

\documentclass{article} 
\usepackage{lipsum} 
\usepackage{tikzpagenodes} 
\begin{document} 
\begin{tikzpicture}[overlay,remember picture] 
\node[anchor=north] at ([yshift=-1cm]current page text area.north){\includegraphics{example-image-duck}}; 
\end{tikzpicture} 
\lipsum[1-3] 
\end{document}

enter image description here

1
  • 1
    +1 to your crystal ball!
    – CarLaTeX
    May 19, 2019 at 14:51

You must log in to answer this question.

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