I think I have a problem about how the box created by tikzpicture is positioned with respect the rest of the text. I have read Positioning TikZ pictures and I think I have understood how the vertical alignment works, but I can't find an equivalent for the horizontal one.
Consider the MWE:
\documentclass{report}
\usepackage{tikz}
\def\go[#1]{% does not work with current bounding box
\tikz[#1]{
\draw (0,0) node (sw) {sw} --
(1,0) node (se) {se} --
(1,1) node (ne) {ne} --
(0,1) node (nw) {nw} -- cycle;}
\hspace*{2cm}
}
\begin{document}
A\go[overlay, red, baseline=(sw)]
B\go[overlay, blue, baseline=(se)]
C\go[overlay, green, baseline=(ne)]
D\go[overlay, black, baseline=(nw)]
\vspace{2cm}
A\go[overlay, red, baseline=(current bounding box.south west)]
B\go[overlay, blue, baseline=(current bounding box.south east)]
C\go[overlay, green, baseline=(current bounding box.north east)]
D\go[overlay, black, baseline=(current bounding box.north west)]
\end{document}
Which gives:

I have two doubts here:
why the two lines are not the same?
I am trying to have the squares with the east reference (blue and green) before the letter B and C (given that the
overlayfigure has no size, I want it to extend before the insertion point). I understand that this is expected and correct for thebaselinecase (it just shifts the box vertically); but... is there an equivalent for the horizontal case?To be more specific: I can move the figure with
\llapor\rlapor similar tricks, but I was wondering: when tikz smashes the size of the picture to zero, it is like it is collapsing it to a point; is there a way to decide where this point is? I triedanchortoo, but it works for the objects in the picture, not the picture itself.

overlay. In your pictures add the line\draw (current bounding box.south west) -- (current bounding box.north east);and you will begin to see why you attempts to set the baseline as you are isn't working. – A.Ellett Apr 26 '15 at 20:50