# Installing feynmp / feynmf to TexMaker

What packages do I need to download and what I need to have in my preamble in order to use feynmp and feynmf in texmaker?

• Welcome to TeX.SX! texmaker is a front-end editor for LaTeX. You don't use packages and TeX related software "in texmaker". In fact its the other way around: texmaker uses (La)TeX and its associated software. – Ruben Apr 15 '16 at 14:30
• Regarding your question: If your distro is configurated such that missing packages get downloaded and installed on the fly (default case) than a simple \usepackage{feynmf} in the preamble will do the job. – Ruben Apr 15 '16 at 14:34
• Did my answer help you? If not what problems did you encounter? If yes, you might accept my answer, so the issue is closed. – Ruben Apr 16 '16 at 23:26

texmaker does not organise the (La)TeX software bundle. It only makes use of it. Hence, you don't have to change anything in this particular program to run the feynmf package. The installation of LaTeX packages normally is done outside of the editor and is quite straightforward. (If you're not sure about it have a quick read. There is plenty of resources online, especially here on TeX.SX!)

When you are done installing the package try to compile the following file through pdflatex. Note that you also need metafont. Both, pdflatex and metafont should be present in your TeX distro as they are canonical programs in the bundle.

\documentclass{article}
\usepackage{feynmf}

\begin{document}
\begin{fmffile}{diagram}
\begin{fmfgraph*}(120,80)
\fmfleft{i1,i2}
\fmfright{o1,o2}
\fmf{fermion}{i1,v1,o1}
\fmf{fermion}{i2,v2,o2}
\fmf{photon}{v1,v2}
\end{fmfgraph*}
\end{fmffile}
\end{document}


If this doesn't succeed try the following compilation cycle:

pdflatex <name of your test file>.tex
mf '\mode:=laserjet; input diagram'
pdflatex <name of your test file>.tex


feynmp (as an interface for metapost, resp.) is used analogously.