Drawing a simple diagram using the tikz-feynman library



\vertex (a) {\(e^{\pm}\)} ;
\vertex[below right=of a] (b);
\vertex[below left=of b] (c) {\(\gamma\)};
\vertex[right =of b] (d);
\vertex[above right=of d] (e) {\(e^{\mp}\)};
\vertex[below right=of d] (f) {\(\gamma\)};
\vertex[below right=1 of c] (l);
\vertex[right =3 of l] (r);

(a) --  (b) -- [photon] (c);
(b) -- (d);
(e) -- (d) --[photon] (f);
(l) --[<->] (r);




I end up with the the following uneven output

enter image description here

For example, the top right node is higher than the top left, and the lower left node at the gamma is more to the left than the top right node. Is there a fix without having to specify explicit positions?


1 Answer 1


It seems that changing the first two vertices to

\vertex (b);
\vertex[above left=of b] (a) {\(e^{\pm}\)} ;

Does the trick. I don't know why though. Here's how it looks with those switched.

enter image description here

  • Yes, that's the correct way to do this. The reason for the unevenness is that the nodes are extended objects. So one can either do the placement symmetrically, or define coordinates, or use the center anchors for positioning.
    – user241266
    May 7, 2021 at 1:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .