title: insert label in between a arrow (not below/above) with edge node, tikz
body: <p>I am trying to draw a graph with an arrow and I would like the label of the arrow to be in between the line (not above or below) like this:
  how the output should look like :
  <img src="https://i.stack.imgur.com/fUPCt.png" alt="enter image description here"></p>
  
  <p>I'm using the tikz library and edge node to draw the arrow between two nodes.
  Here it is a minimal example with the label above the arrow:</p>
  
  <pre><code>\documentclass[12pt]{article}
  \usepackage[letterpaper, margin=1in, top=2.5cm, bottom=2.5cm]{geometry}
  \usepackage{xcolor}
  \definecolor{corn}{rgb}{0.98, 0.93, 0.36}
  \definecolor{emerald}{rgb}{0.31, 0.78, 0.47}
  
  \usepackage{array}
  \usepackage{tikz}
  \usepackage{siunitx}
  \usepackage{float}
  \usepackage{subcaption,caption}
  \captionsetup{labelsep=period}
  \usetikzlibrary{positioning,patterns,arrows,decorations.markings,decorations.pathreplacing,shapes,shapes.misc}
  \tikzset{
      %Define standard arrow tip
      &gt;=stealth',
          % Define arrow style
      pil/.style={
             -&gt;,
             thick,
             shorten &lt;=3pt,
             shorten &gt;=3pt,}
  }
  
  \title{ }
  \begin{document}
  \maketitle
  
  \begin{figure}[h!] 
  \centering
  \caption{}
  \label{paths}
  \begin{subfigure}{0.9\textwidth}
  \resizebox{.9\textwidth}{!}{
  \begin{tikzpicture}[shorten &gt;=2pt,on grid,auto]
  \node (A) [draw=black,fill=emerald,double=white,double distance=2pt,shape=rounded rectangle,minimum width=4cm ]{A}; 
  \node[right=9cm of A] (B) [draw,fill=corn,shape=rounded rectangle,minimum width=4cm ]{B};
  \path[-&gt;]
      (A) edge[line width=0.742mm] node[ anchor=center, above, pos=0.5,font=\bfseries] {\Huge +} (B);
      \end{tikzpicture}
  }
  \caption{}
  \label{M1w}
  \end{subfigure}
  \end{figure}
  
  \end{document}%\grid
  </code></pre>
  
  <p>I've searched online and could not find any example with edge node. I would really appreciate it any help!</p>