[Tex/LaTex] Aligned equations inside of TikZ node.

equationstikz-pgfvertical alignment

How can I create a tree node with an aligned math equations inside?


doesn't work


Gives a lot of margin and I don't want to manually tune 100.

\nodepart from shapes tikz library seems to be overkill and doesnt do
the alignment.

Any ideas?

Best Answer

You could use an aligned environment with inline math inside nodes, their size is automatically calculated. Here's a small example with such a node in a tree:

\begin{tikzpicture}[every node/.style={rectangle,draw}]
\node {Example:}
  child {node {%
     a &= bx + c\\
     a+b &= d +1


alt text