Draw Feynman Diagrams w/ Latex for Beginners

In summary, the user is looking for advice on how to draw a Feynman diagram and is having difficulty because he does not have experience with Metafont. The user has tried to follow a tutorial but has been unsuccessful. The user is using Texnicenter and has the packages already, but when trying to draw a diagram for the neutron decay, they get a single arrow all over their writing. The user has tried to reprocess the file but is still having difficulty. The user is trying to use Jaxodraw but is having difficulty. The user is trying to learn how to draw Feynman diagrams using some package and is open to other suggestions.
  • #1
Super_Leunam
14
0
Hi! I need some help with latex. I need to draw Feynman diagrams and it seems that the package feynmfm relies on Metafont, which I really don't even have the slightest idea as how to use it.

Anyway, I tried to find a good tutorial on the subject (metafont) but it looks like i will need some help since i still consider myself a newbie in latex.

I'm using the full installation of Miktex 2.6 on Texnicenter which I know has the packages already. Whenever I try to follow the commands for drawing a diagram like this:
\begin{verbatim}
\begin{fmffile}{decan}
\begin{fmfgraph*}(40,25)
\fmfleft{o3}
\fmfright{i1,o1,o2}
\fmf{fermion}{i1,v1}
\fmf{fermion}{o1,o2,o3}
\end{fmfgraph*} \end{fmffile}
\end{verbatim}
for the feynman graph of the neutron decay( Maybe I'm not doing the sintax right?) I get a single arrow all over my writing in the last paragraph and not even an error message.
It says that i have to somehow reprocess the file "decan.mf" and try again but that's my problem . i have no experience with metafont or something like that..like i said I'm almost illiterate in Tex/LAtex. I've used latex for my reports but until now, I only needed to type math formulas.

If there's another way to draw Feynman Diagrams, other than drawing it with some graphics application and pasting it, please let me know. All I need is to learn how to draw Feynman diagrams using some package since I don't want to overload my pdf with inserted graphics. Thanks in advance!
 
Physics news on Phys.org
  • #2
For relatively simple diagrams you could try using JaxoDraw which can export to LaTex code. Never used that method myself (I only use it to quickly create pngs) but it seems easier given that the FeynMF stuff can be a real pain in the lowerback, especially on windows.
 
  • #3
Thanks, I'm trying to install the application... I'll be happy if i can get a decent diagram complied with texnicenter but still I would like to learn the feynMF package.. so if theree's someone who can explain me all the details I would really appreciate it.
Thanks for your help
 
  • #4
Did you include the package in the beginning of the file. If not you have too. Now I don't have any experience with your particular file that you are working with so I'd have to investigate it more fully.
 
  • #5
yes, i did include it. I'm using jaxodraw now... i think I'll stick to it..but if you can enlighten me with this feynmf package that would be awesome maybe other people are still struggling to get it work...
thanks anyway..
 
  • #6
Out of curiosity: Did the TeX output of jaxodraw and the inclusion in your file work without any bigger complications (like I said, I only created picture files, yet)?

For your Feynmf issue:
- You do have the Feynmf manual at hand, do you?
- I'm not really experienced with Feynmf, but from the code you posted I'd assume a resulting picture similar to the one attached with v1 floating around somewhere (not sure if feynmf has a rule for placing freely-floating vertices or if it possibly ignores them totally).
- Trying to compile your code-snipped, I actually do get a warning and an error message, stemming from the floating vertex v1.
- From my experience, you can learn FeynMF by starting from working graphs and improving/altering them as needed. You can look up command in the manual and try them out, then. For a start, here's a possible diagram for your neutron decay:
Code:
\begin{fmffile}{neutron}
%\fmfframe(1,7)(1,7){
	\begin{fmfgraph*}(100,100)
	\fmfstraight % same x-coordinate for all vertices on left/right
	\fmfleftn{i}{10}  % 3 incoming quarks
	\fmflabel{$u$}{i[1]}
	\fmflabel{$d$}{i[2]}
	\fmflabel{$d$}{i[3]}
	\fmfrightn{o}{10} % 3 outgoing quarks
	\fmflabel{$u$}{o[1]}
	\fmflabel{$d$}{o[2]}
	\fmflabel{$u$}{o[3]}
	\fmftopn{u}{7}  % leptons @ 5,7
	\fmflabel{$\bar \nu_e$}{u[5]}
	\fmflabel{$e^-$}{u[7]}
	\fmf{fermion}{i[1],o[1]}
	\fmf{fermion}{i[2],o[2]}
	\fmf{fermion}{i[3],v3,o[3]}
	\fmffreeze    % freeze current position of vertices
	\fmf{boson, label=$W$}{v4,v3}
	\fmf{fermion}{u[5],v4,u[7]}
  \end{fmfgraph*}
% }
\end{fmffile}
Compile the file twice, then process the .mf file with metafont. Then compile again. Warning: On Windows, I had to delete a lot of relatively hidden (somewhere in the jungle of paths) files when doing changes to the diagram - otherwise the changes will not show and the diagram will remain the old one. Like I said, FeynMF can be a real pain (if you find a way around that, pls tell me). I usually circumvent the problem by giving the files names like "neutron1" and increasing the counter for every change (creating a new file). That works but fills your disk with crap files in the long run, so it's a good idea to have a big cleanup once the diagram is finished and looks like it should.
 

Attachments

  • feynmf.png
    feynmf.png
    551 bytes · Views: 824
  • #7
Yeah jaxodraw's code gave me no problem, just needs to be adjusted manually because when you draw it by hand sometimes the arrows are not in the exact place you want them. I guess this wouldn't be a problem if i were using FeynMF.
Well I knew my code for feynmf wasn't right :S but my problem is another: I don't know how to use metafont... I downloaded a metafont tutorial but it seems lengthy and I don't think it has what i need.

I don't want to sound lazy but would please explain to me how to use it?
Thanks for your help wiht jaxodraw btw :D

Oh, about that code you gave me, it works! i don't know how it worked but i Just compiled it! I just pasted it and compiled it without doing anything about metafont but ...there are no labels! I compiled it thre times and still no labels :S I'm confused now.
 
  • #8
You have to process the file with metafont for the labels to show up. On Windows, right-click the ".mf" file and select "open with...", then browse to and select "mf.exe" (the metafont executable). On a console (linux et.al) you'd probably just type "mf filename.mf" (or whatever the executable is called there plus possibly a path). With manual, I meant the FeynMF manual by Thorsten Ohl: http://materiales.fis.puc.cl/cgi-bin/dwww/usr/share/doc/feynmf/manual.ps.gz or http://www.pd.infn.it/TeX/doc/latex/feynmf/manual.pdf . Don't bother actually working through it, just look up the commands you need.
 
Last edited by a moderator:

FAQ: Draw Feynman Diagrams w/ Latex for Beginners

1. What are Feynman diagrams?

Feynman diagrams are a visual representation of interactions between particles in quantum field theory. They were developed by physicist Richard Feynman and are used to calculate probability amplitudes for particle interactions.

2. Why should I use LaTeX to draw Feynman diagrams?

LaTeX is a typesetting language that is commonly used in scientific fields. It has built-in packages and commands specifically designed for drawing Feynman diagrams, making it a convenient and efficient tool for creating these diagrams.

3. Do I need any prior knowledge of LaTeX to draw Feynman diagrams?

Some basic knowledge of LaTeX is helpful, but not necessary. This guide is designed for beginners and includes step-by-step instructions for drawing Feynman diagrams using LaTeX.

4. Are there any limitations to drawing Feynman diagrams with LaTeX?

While LaTeX is a powerful tool for drawing Feynman diagrams, it does have some limitations. For more complex diagrams, some additional coding may be required. Additionally, the visual output may not be as customizable as other drawing programs.

5. Can I use this guide to draw Feynman diagrams for any type of interaction?

Yes, this guide covers the basics of drawing Feynman diagrams for a variety of interactions, including particle scattering, annihilation, and decay. It also includes tips for drawing more complex diagrams, such as loop diagrams and diagrams with more than two particles.

Similar threads

Replies
3
Views
3K
Replies
4
Views
2K
Replies
1
Views
3K
Replies
8
Views
6K
Replies
2
Views
3K
Replies
2
Views
5K
Replies
5
Views
8K
Replies
2
Views
996
Replies
2
Views
2K
Back
Top