From 6f60d2a260e94a8331eb5024a6cb785371cbf209 Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Sun, 13 Jan 2019 02:23:14 +0800 Subject: [PATCH] Get center af values without calc --- tikz/singly-linked-list/singly-linked-list.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tikz/singly-linked-list/singly-linked-list.tex b/tikz/singly-linked-list/singly-linked-list.tex index 7820106..2577b13 100644 --- a/tikz/singly-linked-list/singly-linked-list.tex +++ b/tikz/singly-linked-list/singly-linked-list.tex @@ -3,7 +3,7 @@ \setlength\PreviewBorder{2mm} \usepackage{tikz} -\usetikzlibrary{calc,shapes.multipart,chains,arrows} +\usetikzlibrary{shapes.multipart,chains,arrows} \tikzset{ squarecross/.style={ @@ -36,9 +36,9 @@ \node[list,on chain] (B) {99}; \node[list,on chain] (C) {37}; \node[squarecross] (D) [right=of C] {}; - \draw[*->] let \p1 = (A.two), \p2 = (A.center) in (\x1,\y2) -- (B); - \draw[*->] let \p1 = (B.two), \p2 = (B.center) in (\x1,\y2) -- (C); - \draw[*->] let \p1 = (C.two), \p2 = (C.center) in (\x1,\y2) -- (D); + \draw[*->] (A.two |- A.center) -- (B); + \draw[*->] (B.two |- B.center) -- (C); + \draw[*->] (C.two |- C.center) -- (D); \end{tikzpicture} \end{preview} \end{document}