[TeX] Editar árboles sintácticos en LaTeX usando Tikz

Explicado en estos dos enlaces:



% Node shape adapted from http://www.texample.net/tikz/examples/data-flow-diagram/
\makeatletter \pgfdeclareshape{myunderline}{
  \foreach \from in
    {center,base,north,north east,east,south east,south,south west,west,north west}{
    \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
    \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
    % This can be improved by removing magic numbers
} \makeatother

for tree={
    fit=band, % Isolates space above this node from siblings’ descendants
    no edge,
    % Uncomment the line below for the dotted edges
    % edge={dotted, semithick, gray!50, shorten <=8pt}, parent anchor=north,
    % This can be improved by reducing space between levels where edges are drawn
    inner sep=0pt, outer sep=0pt,
    l sep=0pt, s sep=6pt, text depth=0.5em, grow'=north,
    where level=0{} % No style for dummy root node
      {where n children=0
        {font=\bfseries,tier=word} % Leaves in bold on the same tier
        {font=\small,tikz={\node[draw, thick, myunderline, fit to tree] {};}} % Non-leaves
% This can be improved by removing the need for a parent and sibling of the actual root
    [Det [La] ]
    [N/Sust [novela] ]
    [CN/SAdj/Prop Sub Adj
        [\textit{nexo} [que] ]
        [CI/SN [me] ]
        [N/V [ha regalado] ]
        [Det [mi] ]
        [N [hermana] ]
    [N/V [est\'a] ]
      [N [ambientada] ]
      [E [en] ]
        [N [Australia\rlap.] ]