我正在使用 beamer 类创建演示文稿,但在尝试创建 S 形箭头时遇到了问题。具体来说,到目前为止,我遇到了以下问题:
\documentclass[compress,xcolor=dvipsnames]{beamer}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{external,decorations,arrows,shapes,shapes.multipart}
\begin{document}
\begin{center}
\scalebox{0.9}{
\begin{tikzpicture}[node distance=5mm,>=stealth',auto]
\tikzstyle{llnode}= [rectangle split,rectangle split parts=4,draw=black!50,inner sep=0mm,
text width=5mm, minimum height=5mm,rectangle split horizontal=true,
align=center]
\node[llnode] (node2) [node distance=2.5cm]
{8\nodepart{two}11\nodepart{three}$\top$\nodepart{four}15};
\node[llnode,fill=red!75] (node3) [right of=node2,node distance=2.5cm]
{25\nodepart{two}26\nodepart{three}29\nodepart{four}28};
\node[llnode] (node4) [right of=node3,node distance=2.5cm]
{65\nodepart{two}82\nodepart{three}67\nodepart{four}78};
\draw[->,color=black] (node3) -- (node4);
\node[below of=node2,node distance=10mm] (prev) {$prev$}
edge[->] (node2);
\node[below of=node3,node distance=10mm] (curr) {$curr$}
edge[->] (node3);
\node[llnode] (node3a) [above of=node2,node distance=1.5cm]
{25\nodepart{two}26\nodepart{three}$\top$\nodepart{four}$\top$};
\draw[->,color=black] (node2.east) -- (node3a.west);
\end{tikzpicture}}
\end{center}
\end{document}
这会产生附加的输出。
。
我想要创建一个 S 形箭头,从 node2.east 出发并进入 node3a.west。我该怎么做?
答案1
你可以这样做:
\draw[->,color=black,rounded corners=2mm] (node2.east) -| ++(3mm,8mm) -|
([xshift=-3mm]node3a.west) -- (node3a.west);