enter image description here

So I was wondering if anyone could provide input as how i can do this diagram in latex with tikzfeymann package. Thanks!

this is pretty much what I got

\feynmandiagram [large, layered layout, horizontal=a to b] { % Draw the     top and bottom lines
i1 [particle=\(u\)]
-- [fermion] a -- b -- [fermion] f1 [particle=\(u\)],
i2 [particle=\(\overline s\)]
-- [fermion] c -- d -- [fermion] f2 [particle=\(\overline d\)],
% Draw the two external fermion lines
{ [same layer] a -- [charged boson, edge label'=\(W^+\)] c },
{ [same layer] b -- [anti fermion, edge label=\(\nu_e\)] d},

1 Answer 1


Even though this is not a physics site, I refuse to draw the above diagram since in your diagram charge is not conserved and you do IMHO not treat antiparticles properly. A neutral pion is not composed of u \bar d, this is a charged pion. Here is what I propose instead:

\vertex (i1) {\(u\)}; 
\vertex[right=2cm of i1] (f1) {\(u\)};
\vertex[below=2em of i1] (i2) {\(\bar s\)};
\vertex[below=2em of f1] (f2) {\(\bar u\)};
\vertex[below=2em of f2] (f3) {\(e^+\)};
\vertex[below=2em of f3] (f4) {\(\nu_e\)};
\vertex at ($(i2)!0.5!(f2)$) (v1);
\coordinate (aux1) at ($(f3)!0.5!(f4)$);
\coordinate (aux2) at (aux1-|v1);
\vertex at ($(aux1)!0.8!(aux2)$) (v2);
\diagram* {
(i1) -- [fermion] (f1),
(i2) -- [anti fermion] (v1) -- [anti fermion] (f2),
(v1) -- [charged boson, edge label'=\(W^+\)] (v2),
(f3) -- [fermion] (v2) -- [fermion] (f4)
\draw [decoration={brace}, decorate] (i2.south west) -- (i1.north west) node
[pos=0.5, left] {\(K^+\)};
\draw [decoration={brace}, decorate] (f1.north east) -- (f2.south east) node [pos=0.5, right] {\(\pi^{0}\)};

enter image description here

BTW, in case you have problems compiling this with lualatex, please do not blame me for that. Rather have a look at this question and, more importantly, this way to fix it. Note that has absolutely nothing to do with my answer, rather any diagram compiled with lualatex will have the same problem. Personally, I was never too excited by the graph drawing algorithms, so I almost always draw my diagrams such that they can be compiled with pdflatex.

  • 2
    Please keep comments (end content) to the TeX-related aspects of the question.
    – Joseph Wright
    Oct 13, 2018 at 20:06
  • 1
    @JosephWright Yes, will do, as far as I can. For me reproducing the OP's diagram would be simply wrong, like typesetting an equation 1+1=3. I have seen others correcting mathematical results, too. In fact, if I had not corrected the diagram, I am sure that there will be sooner or later a comment like : "You seem to have missed that charge is not conserved in your process." If that means that this answer needs to be deleted, so be it.
    – user121799
    Oct 13, 2018 at 20:22
  • 1
    Sure, in general some 'tidy up' is welcome, but if it becomes a distraction then keeping the site scope in mind is a good idea.
    – Joseph Wright
    Oct 13, 2018 at 20:27
  • 1
    @JosephWright Well, I provided a corrected diagram which has the shape of the diagram shown on the OP's screen shot. To be honest, I do not see what is too distracting about it. Yes, I am fine with the lower part of my answer being removed, yet it contained response to IMHO inappropriate comments that are luckily gone thanks to your removal. But I can't see how I should leave comments like "your code does not compile, do you do that on purpose?" completely unanswered because all versions of my answer did compile.
    – user121799
    Oct 13, 2018 at 20:32

You must log in to answer this question.

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