TikZ-Feynman is a LaTeX package allowing Feynman diagrams to be easily generated within LaTeX with minimal user instructions and without the need of external programs. It builds upon the TikZ package and leverages the graph placement algorithms from TikZ in order to automate the placement of many vertices. TikZ-Feynman still allows fine-tuned placement of vertices so that even complex diagrams can still be generated with ease.

TikZ-Feynman is made available through the Comprehensive TeX Archive Network (CTAN) and comes with some thorough documentation containing a tutorial and many examples. I have also submitted the documentation for v1.0.0 on the arXiv. If you use TikZ-Feynman, please cite:

Ellis, Joshua P. ”TikZ-Feynman: Feynman diagrams with TikZ.” Computer Physics Communications 210 (2017): 103-123. doi:10.1016/j.cpc.2016.08.019 arXiv:1601.05437

TikZ-Feynman is open source and contribution are welcome. If you have any suggestions, feature requests, or have found any bugs, feel free to create a new issue or pull request on Github.

Below are a few example to demonstrate how easy diagram can be, and how extensible it can be. Many more are given in the documentation:

1 2 3 4 5 \feynmandiagram [horizontal=a to b] { i1 -- [fermion] a -- [fermion] i2, a -- [photon] b, f1 -- [fermion] b -- [fermion] f2, } ;

1 2 3 4 5 6 \feynmandiagram [large, vertical=e to f] { a -- [fermion] b -- [photon, momentum= \( k \) ] c -- [fermion] d, b -- [fermion, momentum'= \( p_{ 1 } \) ] e -- [fermion, momentum'= \( p_{ 2 } \) ] c, e -- [gluon] f, h -- [fermion] f -- [fermion] i; } ;