2

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
    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 '19 at 13:56
  • @marmot It is TikZ not TikK :) – user156344 May 18 '19 at 14:00
  • 3
    We could rename it: Ti*k*K ist *kein* Koala. ;-) – user121799 May 18 '19 at 14:04
  • @marmot Would you like to add an answer? – CarLaTeX May 19 '19 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 '19 at 13:27
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

| improve this answer | |
  • 1
    +1 to your crystal ball! – CarLaTeX May 19 '19 at 14:51

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.