# Arrows in Feynman diagram

I made Feynman diagram this diagram

\documentclass[10pt,a4paper]{article}

\usepackage{pgfplots,wrapfig}
\usepackage{tikZ-feynman,contour}
\usepackage{amsmath}

\begin{document}
\begin{wrapfigure}[14]{R}{0.577\textwidth}
\begin{tikzpicture}[baseline=(current bounding box.north)]
\begin{feynman}[small]
\vertex (i1)  [particle=$$e^{-}$$];
\vertex (start) at (-0.3,-0.2) {$$e^{-}$$};
\vertex [above right=20pt of i1] (ii1);
\vertex [above right=20pt of ii1] (v1);

\vertex [above left=20pt of v1] (ii2);
\vertex [above left=20pt of ii2] (i2) {$$e^{-}$$};

\vertex [right=40pt of v1] (v2);

\vertex [above right= 10pt and 17pt of v1]  {$$q$$};
\vertex [below right= 5pt and 17pt of v1]  {$$\gamma$$};

\vertex [above left = 8pt and -1pt of v1] {$$k'$$};
\vertex [below left = 8pt and -1pt of v1]  {$$k$$};

\vertex [above left= 23pt and 13pt of v1]  {$$p'$$};
\vertex [below left= 23pt and 13pt of v1]  {$$p$$};

\vertex [below right=20pt of v2] (ff1);
\vertex [below right=20pt of ff1] (f1);
\vertex [above right=20pt of v2] (ff2);
\vertex [above right=20pt of ff2] (f2);

\diagram {
(i1) -- [fermion] (ii1)-- [fermion] (v1),
(ii1)-- [boson, momentum, half left, blue] (ii2),
(v1) -- [fermion] (ii2)-- [fermion] (i2),
(v2) -- [boson, momentum',blue] (v1),
(f1) -- [fermion,very thick] (v2)-- [fermion, very thick] (f2),
};
\end{feynman}
\end{tikzpicture}
\end{wrapfigure}
\end{document}


but the momentum arrow in the left is too big. How can I change its length?

• Welcome to TeX.SX! Can you please expand the code snippets that you have posted to a full minimal working example. It is much easier to help you you if we can start with some compilable code that illustrates your problem. A MWE should compile and be as small as possible to demonstrate your problem. – Andrew Nov 13 '16 at 21:58

The momentum arrow should be, by default, 70% of the length of the initial path. This can change quite significantly if the path is quite curved, as it is here, but you can always rectify it with the arrow shorten key.

In particular, the momentum style allows for optional arguments as follows:

momentum={[<optional momentum styles>]<momentum label>}


I also noticed that you are manually placing labels to look like they are on the edge of certain propagators. You can actually automatically do this with edge label.

Here's the diagram with the momentum arrow shortened, and using edge label instead of manually placing nodes along edges:

\documentclass{article}

\usepackage{tikz-feynman}

\begin{document}
\begin{tikzpicture}[baseline=(current bounding box.north)]
\begin{feynman}[small]
\vertex (i1)  [particle=$$e^{-}$$];
\vertex (start) at (-0.3,-0.2) {$$e^{-}$$};
\vertex [above right=20pt of i1] (ii1);
\vertex [above right=20pt of ii1] (v1);

\vertex [above left=20pt of v1] (ii2);
\vertex [above left=20pt of ii2] (i2) {$$e^{-}$$};

\vertex [right=40pt of v1] (v2);

\vertex [below right=20pt of v2] (ff1);
\vertex [below right=20pt of ff1] (f1);
\vertex [above right=20pt of v2] (ff2);
\vertex [above right=20pt of ff2] (f2);

\diagram* {
(i1) -- [fermion, edge label'=$$p$$] (ii1)
-- [fermion, edge label'=$$k$$] (v1),
(ii1)-- [
boson,
momentum={[arrow shorten=0.25, arrow style=blue]},
half left,
blue] (ii2),
(v1) -- [fermion, edge label'=$$k'$$] (ii2)
-- [fermion, edge label'=$$p'$$] (i2),
(v2) -- [boson, blue, momentum'={[arrow style=blue]$$q$$}, edge label=$$\gamma$$] (v1),
(f1) -- [fermion,very thick] (v2)
-- [fermion, very thick] (f2),
};
\end{feynman}
\end{tikzpicture}
\end{document}


• And if i want the edge label to be black instead of blue? – Jon Snow Nov 16 '16 at 23:28
• @JonSnow I see you've asked many questions here, but have not accepted any answer to any of your question. People volunteer their own time and effort answering other people's question; none of us are paid. The least you can do is use the tickmark ✓ to accept an answer as a sign of thanks, otherwise some people might be very reluctant to answer you in the future. Regarding your particular question, I'll just refer you to the pgf manual, and have a look at edge node. – JP-Ellis Nov 17 '16 at 11:08
• I am so sorry, I didn't know about the tickmark. And thanks for the manual reference. – Jon Snow Nov 17 '16 at 11:35
• No worries, though don't forget all the other questions you asked before too :) To give you a more definite answer, you can make the γ edge label black with: edge node={node[auto, black]{$$\gamma$$}}. – JP-Ellis Nov 17 '16 at 11:39