I am struggeling with one particular problem for years now. I try to draw arrows from a part of a node in a forest tree. Due to a bug in xelatex this does not work with the tikzmark package and the subnode command.
The topic was discussed here:
fixing or replacing tikzmark/pgfmark/subnode within forest
I am too dumb for understanding the solutions. Some solutions seem to be outdated. The underlying bug in xelatex seems to be not fixed and pdflatex seems to have stopped working as well.
What I want to do is to connect all the Vs after the // with double arrows. This should work in a copy and paste-safe way. I can shift the arrows left or right, but when I change the font size, this breaks. Is there any solution to this? Of course the subnode solution would be the preferred one.
\documentclass{article}
\usepackage{forest}
\useforestlibrary{linguistics}
\forestapplylibrarydefaults{linguistics}
\usetikzlibrary{arrows}
\tikzset{
%Define standard arrow tip
>=stealth'}
\newcommand{\sliste}[1]{%
\mbox{%
$\left\langle\mbox{\upshape\scshape #1}\right\rangle$}%
}
\begin{document}
\begin{forest}
where n children=0{tier=word}{}
[S
[{V \sliste{ S$/!/$V }},name=vini
[V,name=vlast [liest$_j$] ] ]
[{S$/!/$V}, name=sv
[NP [Conny] ]
[{V$'$$!/!/$V}, name=v1v
[NP [das Buch, roof] ]
[{V$!/!/$V}, name=vv [_$_j$] ] ] ] ] ]
\path[semithick,<->,color=green] (v1v.east) edge [bend left=44] (vv.east);
\path[semithick,<->,color=green] (v1v.north east) edge [bend right=44] (sv.east);
\path[semithick,<->,color=green] (sv.north) edge [bend right=24] (vini.north);
\draw[semithick,<->,color=green] (vini.south) -- (vlast.north);
\end{forest}
\end{document}
With a working subnode command, it should look like this:
\documentclass{article}
\usepackage{tikz} \usetikzlibrary{tikzmark}
\usepackage{forest}
\useforestlibrary{linguistics}
\forestapplylibrarydefaults{linguistics}
\usetikzlibrary{arrows}
\tikzset{
%Define standard arrow tip
>=stealth'}
\newcommand{\sliste}[1]{%
\mbox{%
$\left\langle\mbox{\upshape\scshape #1}\right\rangle$}%
}
\begin{document}
\begin{forest}
where n children=0{tier=word}{}
[S
[{V \sliste{ S$/!/$\subnode{vini}{V} }},name=vinix
[V,name=vlast [liest$_j$] ] ]
[{S$/!/$\subnode{sv}{V}}, name=svx
[NP [Conny] ]
[{V$'$$!/!/$\subnode{v1v}{V}}, name=v1vx
[NP [das Buch, roof] ]
[{V$!/!/$\subnode{vv}{V}}, name=vvx [_$_j$] ] ] ] ] ]
\path[semithick,<->,color=green] (v1v.east) edge [bend left=44] (vv.east);
\path[semithick,<->,color=green] (v1v.north east) edge [bend right=44] (sv.east);
\path[semithick,<->,color=green] (sv.north) edge [bend right=24] (vini.north);
\draw[semithick,<->,color=green] (vini.south) -- (vlast.north);
\end{forest}
\end{document}

forestcomplication because the problem is the use of\tikzmarkor\subnodein anytikzpicturewith XeTeX - it isn't specific to forest. Unless you're specifically asking for some kind offorestwork around? – cfr Jun 29 '23 at 19:26//Vis always the last thing in the node, you could just use ananchoron a named node, for example, but a more general solution probably needs a generic solution i.e. non-forest-specific. – cfr Jun 29 '23 at 19:37.east? – cfr Jul 01 '23 at 02:46tikzpicture. As I understand it, you wouldn't use\subnodein normal text. For example, try\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{tikzmark} \begin{document} \begin{tikzpicture}[remember picture] \node {A node with a \subnode{sn}{subnode}}; \end{tikzpicture} \begin{tikzpicture}[remember picture, overlay] \draw [red,<-] (pic cs:sn) -- ++(0pt,25pt); \end{tikzpicture} \end{document}In contrast,\tikzmarkseems to work in normal text and in atikzpicture(provided the appropriate form is used). – cfr Jul 02 '23 at 20:00