Absolute node positioning acts weirdly

Issue #14 resolved
fkjogu created an issue

I try to position nodes on an overlay by using this code

\begin{scope}[overlay]
\node at(10,20) {a};
\node at(20,20) {b};
\end{scope}


I'd expect, that those nodes are on the same heights. However, they are not.
Drawing pathes works just fine. But as soon are present, this weird behavior can be seen.

1. reporter

This behavior happens only inside a box.

2. reporter
\documentclass{tikzposter}

\begin{document}
\block{Something}{%
\begin{scope}[overlay]
\node at(10,10) {a};
\node at(20,10) {b};
\end{scope}
}
\end{document}


The block body sits inside of a parbox. So the node positioning follows whatever rules are inherited by parbox. I'm having trouble figuring out if it's an issue of rewriting [x]spaceskip or something more subtle from the parbox spacing/positioning rules. If you replace the coordinates with (0,0) for each node you see that the positioning is off. I suspect it's something deep with the parbox positioning rules.

In any case, tikz code should be used inside tikzpicture environment or tikz command. I would say that your code is not "syntactically correct".

Elena is right, you need to use \begin{tikzpicture} ... \end{tikzpicture}:

\documentclass{tikzposter}

\begin{document}
\block{Something}{%
\begin{tikzpicture}
\node at(10,10) {a};
\node at(20,10) {b};
\end{tikzpicture}
}
\end{document}

3. reporter

Yes sure, this works. But that is not what I want to achieve. I specifically don't want to draw inside a block, but want to draw anywhere on the document without causing a reflow of the content. Thus I specified an overlay scope.

Just move it out of a block seems not to be working, as you you can check yourself:

\documentclass{tikzposter}

\begin{document}
\block{Something}{%
Some content
}

\begin{tikzpicture}[overlay]
\node at(0, 0) {a};
\node at(2, 0) {b};
\end{tikzpicture}
\end{document}


Having it inside a block makes the coordinates relative to that block.

How would I achieve that?

Also, I'm not sure about needing a tikzpicture environment, since the \block command itself just uses TIKZ commands.