According to the tikzmark documentation, when using \subnode, it should be
possible to use ordinary node syntax (within a
tikzpicture) to access this information. Thus after\node {a \subnode{a}{sub} node};it is possible to useaas a node.
After reading the documentation, using \subnode works as I would expect when drawing trees with tikz-qtree but not when drawing trees with forest.
This code produces the following tree, as desired.
\documentclass[varwidth=\maxdimen, border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\usepackage{tikz-qtree}
\tikzset{every tree node/.style={align=center, anchor=north}}
\begin{document}
\begin{tikzpicture}[remember picture]
\Tree
[.TP
[.NP \edge[roof]; {someone} ]
[.T$'$
[.\node(T){T}; ]
[.VP
[.V$'$
[.V\\\subnode{eat}{eat}\\{\ldots}\\{\ldots} ]
[.NP \edge[roof]; {the pie} ]
]
]
]
]
\draw[->] (T) to[in=-180, out=-75] (eat);
\end{tikzpicture}
\end{document}
Whereas this code produces the following tree, which is not desired.
\documentclass[varwidth=\maxdimen, border=5pt]{standalone}
\usepackage[linguistics]{forest}
\usetikzlibrary{tikzmark}
\begin{document}
\begin{forest} remember picture
[TP
[NP
[someone, roof]
]
[T$'$
[T, name=T]
[VP
[V$'$
[V\\\subnode{eat}{eat}\\\ldots\\\ldots]
[NP
[{the pie}, roof]
]
]
]
]
]
\draw[->] (T) to[in=-180, out=-75] (eat);
\end{forest}
\end{document}
It seems that forest isn't picking up the remember picture option, so should I be setting this differently? If so, how?




tikzpicture, if possible. Sorry for not making this clear. Do you know if it's possible? – Adam Liter Apr 28 '20 at 20:04forestpackage I am afraid it may also not be easy. You can use\begin{pgfinterruptpicture} \begin{tikzpicture}[overlay,remember picture] \draw[->] (T) to[in=-180, out=-75] (eat); \end{tikzpicture} \end{pgfinterruptpicture}before\end{forest}but this is shabby IMHO. – Apr 28 '20 at 20:12