TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In presentations with the beamerpackage I use \put a lot to place graphic objects like this:

\newcommand{\putat}[3]{\begin{picture}(0,0)(0,0)\put(#1,#2){#3}\end{picture}} % just a shorthand

Now I was thinking about writing a small macro to facilitate finding the x and y coordinate by just writing a grid of positions onto the slide from which I can read off which values to use as arguments to put:


(This uses the forloop package.)

The problem is that I forgot that put uses relative positions (apparently). Can I somehow return to the same origin in every pass of the loop?

Or is there a simpler way to generate this grid?

share|improve this question
Related question: Absolute positioning in beamer and LaTeX – Seamus Mar 4 '11 at 12:02
Does textpos work together well with beamer and graphics? – fuenfundachtzig Mar 4 '11 at 13:53
up vote 4 down vote accepted

Hi the most simple way seems to be using beamer itself:


Of course you could use full power tikz:

    \foreach \x in {-5,...,5} \draw (\x ,-5) -- (\x ,5) node[anchor=north] {$\x$};
    \foreach \y in {-5,...,5} \draw (-5,\y) -- (5,\y) node[anchor=east] {$\y$};}}
\frame{hi world}


I´m aware that this solution is not a bare latex one. Nevertheless i believe this is the most comfortable way.

share|improve this answer
Cannot use tikz. We only have a way outdated version here, because we are stuck with CentOS :( Your first suggestion seems to work though (if I replace 10 by 10pt). – fuenfundachtzig Mar 4 '11 at 13:38
@fuenfundachtzig: You can use/update LaTeX package independent from the binaries. You don't need to use the version provided by our OS. Simply make your own texmf tree. – Martin Scharrer Mar 4 '11 at 13:53
Well step normally expects a lenght however an up to date tikz/beamer obviously accepts a dimension free figure too. I guess, that it is replaced with an default dimension. – bloodworks Mar 4 '11 at 13:57
Number without an unit will be taken as multiple to the specific unity vector, which can be something very simple like an unit or something more complex like a 3-D vector. But do not mix numbers with and without units in the same expression because then pt are assumed! – Martin Scharrer Mar 4 '11 at 14:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.