Outer sep and inner sep

This is a bit of TikZ esoterica that took me a while to learn, but is super useful, so I thought I’d record it for others.

When you draw a node with \node[draw, inner sep=X, outer sep=Y] (a) {blah};, and it draws some sort of box around your text, then inner sep=X makes a spacing of X between your text and the box. outer sep=Y means that any edge that is drawn to the boundary of the box ends up moving Y units away from the actual boundary.

Having these is so infinitely more high-level than manually sizing boxes and positioning wires, and it’s poisoned my ability to use inkscape, because I just want the “correct” behavior of inner sep and outer sep around any text box, and don’t want to hack something that just “looks alright”.