I have a chain of nodes connected by arrows. I positioned the arrows exactly as I'd like using angles. However, the arrows at either end of the chain point to a node which holds some text. I can't seem to get the text of these nodes to align with the arrows. See the image below:
The text "NULL" should be aligned with the arrows at the end. How can I accomplish this? I tried to use yshift
where the node is defined but that is ignored. Here is an MWE:
\documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, bending,calc,shapes.multipart,chains,arrows,decorations.markings}
\begin{document}
\begin{tikzpicture}[
every edge/.style = {draw, -{Stealth[angle=32:10pt, bend]}},
start chain = going right,
list/.style = {rectangle split, rectangle split parts=3,
rectangle split horizontal,
draw, thick, minimum height=1cm,
on chain},
]
\node [on chain] (X) {NULL};
\begin{scope}[nodes={list}]
\node (A) {\nodepart{second}$A_1$};
\node (B) {\nodepart{second}$A_2$};
\node (C) {\nodepart{second}$A_3$};
\node (D) {\nodepart{second}$A_4$};
\node (E) {\nodepart{second}$A_5$};
\end{scope}
\node [on chain] (Y) {NULL};
%
\draw
(A.170) edge (X.12)
(A.10) edge (B.170)
(B.195) edge (A.-15)
(B.10) edge (C.170)
(C.195) edge (B.-15)
(C.10) edge (D.170)
(D.195) edge (C.-15)
(D.10) edge (E.170)
(E.195) edge (D.-15)
(E.10) edge (Y.168);
\end{tikzpicture}
\end{document}