I want to have arrows between my marginnotes and I achieved this with \tikzmarknode
(figure 1). But it does not work if one mark is on another page (figure 2).
What I would like to have is a continous line going down to the end of the page and then reappear on top of the next page (figure 3).
MWE:
\documentclass[10pt,oneside]{scrbook}
\usepackage{lipsum}
\usepackage[left=32.5mm, right=22.5mm, top=25mm, bottom=20mm, marginparsep=3mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\usepackage{marginnote}
\renewcommand*{\marginfont}{\footnotesize\itshape}
\begin{document}
\marginnote{\tikzmarknode{a}{Thermoplast}}
\lipsum[1]
\marginnote{\tikzmarknode{b}{teilkristallin}}
\lipsum[1]
\marginnote{\tikzmarknode{c}{aliphatisch}}
\begin{tikzpicture}[remember picture, overlay, shorten >=1.5mm, shorten <=1.5mm,->]
\draw ([xshift=10pt]a.south west) to ([xshift=10pt]b.north west);
\draw ([xshift=10pt]b.south west) to ([xshift=10pt]c.north west);
\end{tikzpicture}
% \lipsum[1-6] % Works fine
\lipsum[1-7] % Doesn't work
\marginnote{\tikzmarknode{d}{aliphatisch}}
\begin{tikzpicture}[remember picture, overlay, shorten >=1.5mm, shorten <=1.5mm,->]
\draw ([xshift=10pt]c.south west) to ([xshift=10pt]d.north west);
\end{tikzpicture}
\end{document}
\iftikzmarkoncurrentpage
, and some additional checks, see tex.stackexchange.com/a/483565.