Let's say I have 2 nodes. Node 1 is placed anywhere and node 2 is placed right of node 1. Does tikz solve a set of constraints to solve this problem? Clearly it is underdefined as any position on the y axis would satisfy the constraint.
However, if I have 5 nodes
Node 1 is placed at the top. Node 2 is places below and left of 1. Node 3 is placed below 2. Node 4 is placed below and right of 1. Node 5 is placed right of node 3 and left of node 4.
Where on the y axis is node 5 placed? And could I get both node 4 and 5 to be placed at the same y level as node 3?
Code with ??? for unknown parameters.
\node (1) {1};
\node[below left of=1] (2) {2};
\node[below of=2] (3) {3};
\node[below right of 1, ??? and right of 3 ???] (4) {4};
\node[??? right of (3) and left of (4) ???] (5) {5};
Also, does tikz know to increase the x spacing between nodes 2 and 4 because I am placing node 5 in between them?

(0,0)by default. You can not specify two left, right, above or below options, but you can useat (1 |- 2)for example. (Assuming the parser doesn't balk at using numbers for names.) – John Kormylo Jul 25 '23 at 02:34… of = …keys are deprecated (for over 10 years) and thepositioninglibrary's… = of …should be used. TikZ uses the value ofnode distanceor whatever'S written before theof, i.e.below=2cm of 2. There's no “inbetween” for TikZ. If you need smarter placement, you will need to use theforestpackage or one of thegraphdrawinglibraries. – Qrrbrbirlbel Jul 25 '23 at 09:14