I don't want to change style only. I want to create node that takes 3 numbers and display them with appropriate decorations. For instance:
\mynode{5,6,7}
Should display node with "a=5", "b=6" and "c=7" inside in 3 lines.
Update:
I have this code:
\documentclass{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\newcommand{\statnode}[3]{
\node[rectangle, draw]{
$\begin{aligned}
n &= #1 \\
\text{sum} &= #2 \\
\mu &= #3
\end{aligned}$
}
}
\newcommand{\statnodex}[3]{
node[rectangle, draw]{
$\begin{aligned}
n &= #1 \\
\text{sum} &= #2 \\
\mu &= #3
\end{aligned}$
}
}
\begin{document}
\begin{tikzpicture}[
level distance=100,
]
\statnode{1}{10}{0.1}
child {
\statnodex{1}{10}{0.1}
};
\end{tikzpicture}
\end{document}
But:
- it is ugly to have 2 commands
- it renders incorrectly for some reason