My ultimate goal is to have some portion of text in a tikz node within a tikzpicture and be able to draw arrows to it. I am struggeling with this for over ten years now. cfr suggested I ask the question in a tikz-related way.
\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}
This is the code and when using pdflatex, I get:
But for xelatex I get no arrow at all.
Ultimately I try to use subnodes in forest, but maybe the way is to solve the problem via solving the tikz problem first.
These are my earlier questions: Drawing lines between parts of nodes in forest trees

auxfile is very different to the one stored by pdflatex. Using the solution linked to by @JasperHabicht seems to fix this. – Qrrbrbirlbel Jul 06 '23 at 09:57tikzmarkpackage/library actually. – Jasper Habicht Jul 06 '23 at 11:33lualatex;-P) – Rmano Jul 06 '23 at 13:41