38

It's easy to absolute position something using remember picture with TikZ, but it only works with pdfLaTeX.

I can get something working by using negative vskip and hskips (trial and error), but that is pretty annoying.

How can i position something on the top corner on the first slide without remember picture?

3
  • 2
    Why can't you use pdflatex?
    – Caramdir
    Commented Nov 29, 2010 at 22:00
  • I do, but my supervisor has to keep using lots of old postscript figures with psfrag. Commented Jan 18, 2011 at 18:20
  • You can use postscript code with pdflatex using package like pst2pdf, pst-pdf or pdftricks. The latter explicitly mentions support for psfrag. Commented Mar 4, 2011 at 12:19

2 Answers 2

22

The textpos package has been designed for absolute positioning of text and graphics on the page.

2
36

Here it is a simple solution taken from Section 17.13.2 of Tikz & PGF manual (section subtitle: "Referencing the Current Page Node – Absolute Positioning").

For example, to put a figure in the top right corner, you can use:

\begin{tikzpicture}[remember picture,overlay]
    \node[xshift=-2cm,yshift=-2cm] at (current page.north east){%
    \includegraphics[width=2cm]{photo.png}};
\end{tikzpicture}

The key in the code above is the combination of current page.north east (which fixes the reference point), and the xshift and yshift variables (which shift the image from that reference point).

Naturally, you can use any other reference point like current page.center, current page.south west, etc. Then, just achieve desire absolute placement using xshift and yshift.

The list of reference points for current page.blah include eight major cardinal directions (north, west, south, east and the four in between), plus center. It is also possible to use any degrees (0-360), where 0 is east and 90 is north (for example, current page.45 for the top right corner).

4
  • Why 2cm in the shift? Commented May 31, 2019 at 18:34
  • @LucasSoares Just an example. Notice where I say " just achieve desire absolute placement using xshift and yshift"
    – luchonacho
    Commented May 31, 2019 at 20:16
  • I would add that the use of anchor=south east can also be useful.
    – tdehaeze
    Commented Oct 10, 2019 at 15:32
  • I found it more convenient to use \begin{textblock}{<width>}(<x>,<y>) <text> \end{textblock}. Aha, and \usepackage[absolute,overlay]{textpos}.
    – tillmo
    Commented Nov 20, 2023 at 12:54

You must log in to answer this question.

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