This page will teach you how to compile LaTeX code to produce images of Feynman diagrams with the feynmp
package.
Compile standalone
For example:
documentclass[11pt,border=2pt]{standalone} usepackage{feynmp-auto} begin{document} begin{fmffile}{feyngraph} begin{fmfgraph*}(90,60) % dimensions (WH) fmfleft{i2,i1} fmfright{o2,o1} fmf{fermion}{i2,v1,i1} fmf{boson}{v1,v2} fmf{fermion}{o2,v2,o1} fmfv{decor.shape=circle,decor.filled=full,decor.size=4,f=(0,,0,,0.6)}{v2} end{fmfgraph*} end{fmffile} end{document}
Compile on-the-fly as a figure
Please see this page.
Compile inside equations
Please see this page.
Compile standalone with LaTeXiT (macOS)
Please see this page by Taku Yamanaka.