123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- \documentclass{article}
- \usepackage[pdftex,active,tightpage]{preview}
- \setlength\PreviewBorder{2mm}
- \usepackage{tikz}
- \usetikzlibrary{calc,shapes.multipart,chains,arrows}
- \tikzset{
- squarecross/.style={
- draw, rectangle,minimum size=18pt, fill=orange!80,
- inner sep=0pt, text=black,
- path picture = {
- \draw[black]
- (path picture bounding box.north west) --
- (path picture bounding box.south east)
- (path picture bounding box.south west) --
- (path picture bounding box.north east);
- }
- }
- }
- \begin{document}
- \begin{preview}
- \begin{tikzpicture}[
- list/.style={
- very thick, rectangle split,
- rectangle split parts=2, draw,
- rectangle split horizontal, minimum size=18pt,
- inner sep=4pt, text=black,
- rectangle split part fill={red!20, blue!20}
- },
- ->, start chain, very thick
- ]
- \node[list,on chain] (A) {12};
- \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);
- \end{tikzpicture}
- \end{preview}
- \end{document}
|