1

I can't input \tikzparentnode command inside \newcommand.

It returns Undefined Control Sequence error.

This is my command definition:

\newcommand{\childstyle}[4]
{
    #1/.style = {fill=#2, grow=down, xshift=#3, anchor=west, text width = #4, edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}}
}

Utilization in my document:

\begin{tikzpicture}[
.....
\childstyle{L3}{green}{1em}{3cm}
...... % ohter definitions
]

Any suggestions?

1
  • 1
    put the whole thing in tikzset{#1/.style={....}}
    – percusse
    Commented Apr 24, 2017 at 16:46

0

You must log in to answer this question.

Browse other questions tagged .