I currently try to create a tikzpicture with multiple scopes. The scopes should be positioned relative to each other, so I use "local bounding box=..." for each scope to access their sizes.
My Problem: The corner positions of the bounding boxes are not known before drawing and not necessarily at (0,0), because my final content cannot be drawn by starting at a corner. (I have to start somewhere in the center of the scopes final bounding box.)
So my main question is: How to shift a scopes local bounding box so that its bottom left corner is positioned at (0,0), not knowing the bounding box corners before drawing its content?
Because then I can easily position the scopes/bounding boxes relative to each other.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\newcommand{\A}{
\begin{scope}[local bounding box=A]
\node[blue] at (0, 0) {A};
\end{scope}
}
\newcommand{\B}{
\begin{scope}[local bounding box=B]
\node[red] at (-1, 0) {B};
\end{scope}
}
\begin{document}
% Problem: Bounding box B should be positioned as if its bottom left corner starts at (0, 0). The bounding box B is not known before drawing, so the solution below does not work in general.
\begin{tikzpicture}
\A
\begin{scope}[shift={(A.east)}]
\B
\end{scope}
\end{tikzpicture}
% Desired Result: (With shift=(1, 0) just to demonstrate the desired result.)
\begin{tikzpicture}
\A
\begin{scope}[shift={(A.east)}, shift={(1, 0)}]
\B
\end{scope}
\end{tikzpicture}
\end{document}
Resulting tikzpicture:

\matrixwill put your materials side by side. Would you like to try? – Symbol 1 Mar 31 '17 at 15:30scopesbypics: http://tex.stackexchange.com/questions/185279/anchoring-tikz-pics – Ignasi Mar 31 '17 at 17:18