I want to draw something like this. How to get that rectangle edge label?
This is the MWE.
\documentclass{article}
\usepackage{tikz}
\usepackage[margin=15mm]{geometry}
\usepackage{calc}
\usetikzlibrary{matrix,arrows}
\usetikzlibrary{positioning,arrows}
\usetikzlibrary{shapes,arrows,fit,calc,positioning,automata}
\begin{document}
\begin{tikzpicture}[>=stealth',shorten >=1pt,auto,node distance=5 cm,thick]
\node[initial,state] (A) [] {};
\node[state] (B) [right of=A] {};
\path[->] (A) edge [] node [] {} (B);
\end{tikzpicture}
\end{document}
How to get the Label?
Best Answer
On way would be to just add it to the
\path
:Code: