以下は私のコードです:
\begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 0.75, transform shape]
\coordinate (a1) [] {};
\node (rect) (a) [draw,minimum width=3cm,minimum height=1cm, below of=a1,node distance=1cm] {Sender};
\node[rectangle] (b) [draw,minimum width=3cm,minimum height=1cm, below of=a,node distance=2cm] {Receiver};
\coordinate (b1) [below=2cm of b] {};
\path[->] (a) edge node { $f$ } (b);
\path[->] (a1) edge node { $f$ } (a);
\path[->] (b) edge node { $f$ } (b1);
\end{tikzpicture}
次のような出力が得られます。
レシーバーから b1 に矢印を 1 つ付けたいです。
誰か私の間違いを教えてくれませんか?
答え1
定義coordinate
の仕方が間違っています。次のようにしてください:
\coordinate [below=2cm of b] (b1) {};
こうすれば、あなたのコードは私にとっては機能します。
したがって、完全なコードは次のようになります。
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows}
\begin{document}
\begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 0.75, transform shape]
\coordinate (a1) {};
\node (rect) (a) [draw,minimum width=3cm,minimum height=1cm, below of=a1,node distance=1cm] {Sender};
\node[rectangle] (b) [draw,minimum width=3cm,minimum height=1cm, below of=a,node distance=2cm] {Receiver};
\coordinate[below=2cm of b] (b1) {};
\path[->] (a) edge node { $f$ } (b);
\path[->] (a1) edge node { $f$ } (a);
\path[->] (b) edge node { $f$ } (b1);
\end{tikzpicture}
\end{document}
そして結果は次のようになります: