[Tex/LaTex] Draw arrow with text inside

arrows

Is there a way to draw an arrow which has text inside, like the one in this image? I saw many examples with the TikZ but most of them had the text over the arrow not inside it.

Best Answer

\documentclass{scrartcl}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
  \coordinate (A) at (-5,0);
  \coordinate (B) at ( 5,0);
  \draw[->] (A) -- (B) node[midway,fill=white] {\emph{success}};
\end{tikzpicture}

\end{document}

This, which does the same, may be more understandable to other users

\draw[->] (A) -- node[midway,fill=white] {\emph{success}} (B);