User Tools

Site Tools


The file contains a handy macro that allows you to compile Feynman graphs in LaTeX documents, without the need for extra scripts (source). Simply include the macro in the preamble. (Tested only in TeXShop on a Mac.) For Mac users however, feynmp in LaTeXiT is a better option to quickly build of Feynman diagrams as standalone images.

\usepackage[margin=2.4cm]{geometry} % margins
% macro to compile Feynman graphs without extra scripts
  \fmfcmd{\p@rcent\space the end.^^J end.^^J endinput;}
    \immediate\write18{mpost \thefmffile}
This is a test file for Feynman diagrams. You need to compile twice: once to compile and save the Feynman diagrams, twice to include them in the typeset PDF file.
  \caption{Feynman diagram for Compton scattering} %\label{compton}
latex/feynman_file.txt · Last modified: 2017/09/05 17:12 by iwn