I would like to understand how can I label edges of diagrams as at this picture:
I assume that it possible to label vertices and than move each label, but I do not know how. Can anyone gives some suggestions?
What I tried: label each vertex
\begin{feynman}
\vertex (v1) {\(cl\)};
\vertex[right=0.5cm of v1] (v2) {\(cl\)};
\vertex[right=1cm of v2] (v3) {\(cl\)};
\vertex[right=0.5cm of v3] (v4) {\(cl\)};;
\diagram*{(v1)--(v2), (v2)--[half left](v3)--[half left](v2),(v3)--(v4)};
\end{feynman}
It is awful. Then, I have tried to label edges:
\begin{feynman}
\vertex (v1);
\vertex[right=0.5cm of v1] (v2);
\vertex[right=1cm of v2] (v3);
\vertex[right=0.5cm of v3] (v4);
\diagram*{(v1)--[edge label={\(cl \quad\)}](v2), (v2)--[half left,edge label={\(cl \quad cl\)}](v3)--[half left,edge label={\(cl \quad cl\)}](v2),(v3)--[edge label={\(\quad cl\)}](v4)};
\end{feynman}
It looks not so awful, but not perfect: labels are so far from edges.
Best Answer
Using hardcoded coordinates like
\node(a) at (.6,-.5) {\small cl};
in tikz is a deadly sin, this will break as soon as you change the tiniest thing.to move the labels on the horizontal lines to the start and end of the lines, use
near start
andnear end
to move the labels around the circle closer to the line, reduce the
inner sep
don't use inline math to make multi-letter things italic
Alternatively without any manual intervention, one can let
tikz-feynman
do it's job: