\usepackage{tikz}

\usetikzlibrary{arrows}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{calc}

\tikzset{
  >=stealth',
  midarrow/.style={
    postaction={
      decorate,
      decoration={markings, mark=at position .55 with {\arrow{>}}}
    }
  },
  fermion/.style=midarrow,
  photon/.style={
    decorate,
    decoration={snake, amplitude=2pt, segment length=8pt}
  },
  boson/.style={
    decorate,
    decoration={snake, amplitude=2pt, segment length=8pt}
  },
  gluon/.style={
    decorate,
    decoration={coil, amplitude=4pt, segment length=5pt}
  },
  scalar/.style=densely dashed,
  arrowsnake/.style={
    preaction={photon, draw},
    postaction=midarrow
  }
}
