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?
2 Answers
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:
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}
-
1
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}
Ti*k*K ist *kein* Koala
. ;-)eso-pic
or something like this.