Drawing Feynman diagrams with Feynmf

In summary: Many developers use Cygwin and gcc to compile tools all the time. MiKTeX is one of them. I'm hoping I'm not confusing things here. If you're using Cygwin to compile with Jaxodraw, you'll need to install the Java compiler from sun.com and the Cygwin setup program. You can start "setup.exe" by clicking on a link on the main page of cygwin.com. After you install the Java compiler, you can compile Jaxodraw by clicking on the "compile" button in the main window.
  • #1
nrqed
Science Advisor
Homework Helper
Gold Member
3,766
297
I have posted a question on the Tutorial subforum because there was already a thread on that subject but I figured that people here may be more likely to be able to help me out

https://www.physicsforums.com/showthread.php?p=1313121#post1313121

Thanks!

Patrick
 
Physics news on Phys.org
  • #2
nrqed said:
I have posted a question on the Tutorial subforum because there was already a thread on that subject but I figured that people here may be more likely to be able to help me out

https://www.physicsforums.com/showthread.php?p=1313121#post1313121

Thanks!

Patrick
I've got the JaxoDraw visual Feynman diagram editor working with MiKTeX and WinEdt.
http://jaxodraw.sourceforge.net/

It takes a lot of patience and about half a day. I should have taken notes during the process..
People going through the process could leave their step-by-step notes here to help others!
Some things I remember:

1) Read the readme files patiently.

2) Google for stuff you seem to be missing during the process.

3) You need to download JAVA stuff from sun.com. make sure it's the
developers environment needed compile things.

4) Use the Cygwin setup program to add a handfull of extra packets needed.

5) You can start "setup.exe" by clicking on a link on the main page of cygwin.com.

6) I needed several utilities just to compile. I had to google for them and install them.

7) You need the axodraw.sty file in the latex directory

8) With WinEdt I needed an alternative way to produce pdf files:
a) LATeX the tex file
b) do a: dvi->ps
c) finally do a: ps -> pdf
otherwise it complains it can not do "Postscript specials". It will generate
the pdf normally but the Feynman diagrams are missing.

I think a had a case of a missing file in the Java environment which
I found in another directory. I found it rather quick though.Regards, Hans.
 
Last edited:
  • #3
Hans de Vries said:
I've got the JaxoDraw visual Feynman diagram editor working with MiKTeX and WinEdt.
http://jaxodraw.sourceforge.net/

It takes a lot of patience and about half a day. I should have taken notes during the process..
People going through the process could leave their step-by-step notes here to help others!



Some things I remember:

1) Read the readme files patiently.

2) Google for stuff you seem to be missing during the process.

3) You need to download JAVA stuff from sun.com. make sure it's the
developers environment needed compile things.

4) Use the Cygwin setup program to add a handfull of extra packets needed.

5) You can start "setup.exe" by clicking on a link on the main page of cygwin.com.

6) I needed several utilities just to compile. I had to google for them and install them.

7) You need the axodraw.sty file in the latex directory

8) With WinEdt I needed an alternative way to produce pdf files:
a) LATeX the tex file
b) do a: dvi->ps
c) finally do a: ps -> pdf
otherwise it complains it can not do "Postscript specials". It will generate
the pdf normally but the Feynman diagrams are missing.

I think a had a case of a missing file in the Java environment which
I found in another directory. I found it rather quick though.


Regards, Hans.


Wow.
Thank you very much for all the information. That sounds like quite an adventure. I will try this if I can't figure out Feynmf . I am using TeXnicCenter to latex stuff, I guess things should work the same way as fo ryou.

A quick question: you used Cygwin to download packages, but are you running things within Cygwin? (If I reclal, Cygwin is a Unix emulator running under Windows, right?) Are you running MikTeX under Cygwin? (I hope my questions make some sense)

Thank you very much for taking the time to post all that information!

Patrick
 
  • #4
nrqed said:
Wow.
Thank you very much for all the information. That sounds like quite an adventure. I will try this if I can't figure out Feynmf . I am using TeXnicCenter to latex stuff, I guess things should work the same way as fo ryou.

Thank you very much for taking the time to post all that information!

Patrick

I couldn't get Feynmf working either...

I run WinEdt and JaxoDraw under windows.

JaxoDraw is a Java application and you can download the Java compiler
from sun.com for free.



nrqed said:
A quick question: you used Cygwin to download packages, but are you running things within Cygwin? (If I reclal, Cygwin is a Unix emulator running under Windows, right?)

Yes,

Many developers use Cygwin and gcc to and you need it to compile tools all
the time. MiKTeX is one of them. I'm hoping I'm not confusing things here.
it has been a while ago and I installed several other packets in the mean
time. You can start with compiling Jaxodraw with Java and see what you
need further.

I use Cygwin gcc for c programs and I use the GNU GSL library for the
complete list of mathematical functions. In results from Feynman diagrams
you'll find functions like the Rieman Zeta function and the Poly Logarithm
(Di-Logarithm) You'll find all of these and much more in the GSL library.

Cygwin is rather easy to install and you can add/remove all kinds of
packets (including the GSL library) very conveniently with "setup.exe"
at the main page of cygwin.com. This program also shows you exactly
what you have and haven't installed.

http://www.cygwin.com/
http://www.gnu.org/software/gsl/
http://functions.wolfram.com/

http://www.miktex.org/
http://www.winedt.com/
http://jaxodraw.sourceforge.net/
http://www.nikhef.nl/~t68/axodraw/


Regards, Hans
 
  • #6
Hans de Vries said:
I couldn't get Feynmf working either.
I am quite surprised. Under Linux I never had any problem.

Many experimentalists use ROOT software, which is able to produce Feynman diagrams in an interactive manner, after which you can produce the code which is very similar to LaTeX actually.

Most theoreticians use JaxoDraw to draw Feynman diagrams. It also works interactively. Although I am by no way fan of WYSIWYG, I must admit that this interactivity feature is a strength in that case. But only to learn how to write the code. When one write that kind of code often, one find its more convenient to switch back to batch mode.
 
  • #7
Hans de Vries said:
Hmm,

It seems there is a precompiled version of Jaxodraw now for Windows:

http://jaxodraw.sourceforge.net/download/index.html

Better try this first then!


Regards, Hans

Thank you for all your help! I will check this out!

I am afraid to show my deep ignorance, but what is WinEdt? WHat is it used for?

thansk for this link!
 
  • #8
nrqed said:
Thank you for all your help! I will check this out!

I am afraid to show my deep ignorance, but what is WinEdt? WHat is it used for?

thansk for this link!

WinEdt is the shareware Latex editor I use:

http://www.winedt.com/

Latex is the main target but you can edit other file types as well.

http://www.winedt.com/snap.html


Regard, Hans
 
  • #9
Hans de Vries said:
Hmm,

It seems there is a precompiled version of Jaxodraw now for Windows:

http://jaxodraw.sourceforge.net/download/index.html

Better try this first then!


Regards, Hans

Thanks again for the help.

I installed the precompiled version and it works...up to a point. I can draw things and save in postscript format (and then look at the result using ghostview). But when I ask to save as an eps file (in order to then put it inside a Latex file), it does not work. jaxodraw saves the file but as a postscript file, not an eps file.

I have tried to save as a Latex file, but then when I tried to compile it looks for a xcolor.sty file which I tried to install but I could not unzip :smile: You know how problems are with computers...one things leads to another to another ...

ANyway, I wanted to know how you include your Feynman diagrams in your TeX files: you save as eps or you use the TeX code with the axodraw.sty package?


Thanks again

Patrick
 
  • #10
nrqed said:
ANyway, I wanted to know how you include your Feynman diagrams in your TeX files: you save as eps or you use the TeX code with the axodraw.sty package?

I do an export (File menu) to Latex and copy and past the result in my Latex
files. This makes your document a single file which is easier and you can still
edit things like the TeX labels.


Regards, Hans
 
  • #11
Hans de Vries said:
I do an export (File menu) to Latex and copy and past the result in my Latex
files. This makes your document a single file which is easier and you can still
edit things like the TeX labels.


Regards, Hans

Ok. Thank you. You load the package axodraw.sty and xcolor.sty?

Thanks a lot, your help is very much appreciated.
 
  • #12
nrqed said:
Ok. Thank you. You load the package axodraw.sty and xcolor.sty?

Thanks a lot, your help is very much appreciated.

I've got these near the top of my Latex files:
Code:
\usepackage{axodraw}
%\usepackage{pstricks}
\usepackage{color}

And I paste the Latex export output from Jaxodraw in the document.

I've got only axodraw.sty in my Latex directory.
http://www.nikhef.nl/~t68/axodraw/

If I comment out "color" then it doesn't work. pstricks.sty must
be somewhere in the MiKTeX distribution. It doesn't matter if
I comment it out here. I found an explanation here about pstricks:

http://www.ursoswald.ch/LaTeXGraphics/overview/overview.html

which shows why I need to do the conversion in three steps to get the
Feynman diagrams included in the pdf. The direct conversion leaves them out.

Tex --> DVI --> PS --> PDF

The direct conversion omits the Feynman diagrams. see figure 1.
I don't care much about the three steps because they are just three
clicks on buttons close to each other in my editor. see here:
http://www.winedt.com/snap.html (LaTeX, dvi-->ps, ps-->pdf)
Mostly I use the direct conversion. When I'm editing formulas I
don't care about Feynman diagrams.I prefer to do it this way but you can also try to let Jaxodraw export JPG
or PNG pictures instead of LaTeX code and include the picture like this:

Code:
\begin{figure}[h] 
\scalebox{1.0}{\includegraphics{my_picture.jpg}}
              \caption{my_picture_text}
\label{fig:my_picure_label}              
\end{figure}
Regards, Hans
 
Last edited:
  • #13
Two comments about FeynMF :

1) When compiling your .tex file into .pdf and you've got FeynMF pictures, compile it twice. I've found on both Linux and Windows that compiliing it once results in all the diagrams becoming giant capital Greek deltas, [tex]\Delta[/tex] (oh the joys of anomalous bugs!), in a similar thing to the way the contents page is often blank when you recompile, unless you compile twice.

2) The labels on FeynMF are awful. I know how to code in elaborate diagrams, with lovely loops and wiggles etc but when I put in labels, they appear at random places all over the diagram! I can't actually label particles! If anyone knows of a way around this, could they enlighten me please? I much prefer the diagrams of FeynMF over Jaxodraw and the code for FeynMF is nicer, but for the labels!

I'd recommend the LEd tex editing program for Windows. It does predictive text.
 
  • #14
Hans de Vries said:
I prefer to do it this way but you can also try to let Jaxodraw export JPG
or PNG pictures instead of LaTeX code and include the picture like this:

Code:
\begin{figure}[h] 
\scalebox{1.0}{\includegraphics{my_picture.jpg}}
              \caption{my_picture_text}
\label{fig:my_picure_label}              
\end{figure}



Regards, Hans

That worked!:-p
Thank you

(for anybody else interested:

I had to include the line \usepackage{graphicx} at the top of my file

And to center, one may put the line \centering just after the line \begin{figure}
}

Thank you very much for all the help.

I still wnat to include the graphics latex code directly but I will have to figure out how to install the xcolor package and pstricks (I am using TeXnicCenter for which those packages are not provided )
 
  • #15
A simple question: I draw fermions lines along the shape of arc of circles. No matter what i do, the arrows is always shown pointing counterclockwise. I sthere any trick to reverse its direction? (not in the latex code itself since I am saving as a jpg but while drawing the diagram itself on the screen)

Thank you!
 
  • #16
nrqed said:
A simple question: I draw fermions lines along the shape of arc of circles. No matter what i do, the arrows is always shown pointing counterclockwise. I sthere any trick to reverse its direction? (not in the latex code itself since I am saving as a jpg but while drawing the diagram itself on the screen)

Thank you!

Not that I've seen. You can change line thickness and the arrow size but not
the direction of the arrow here:

Options ---> preferences ---> behavior ---> Objects.

For loops it doesn't matter. The arcs used most are the photon and gluon
which do not have an arrow. Maybe there's a way buy I didn't find it.


Regards, Hans.
 
  • #17
Hans de Vries said:
Not that I've seen. You can change line thickness and the arrow size but not
the direction of the arrow here:

Options ---> preferences ---> behavior ---> Objects.

For loops it doesn't matter. The arcs used most are the photon and gluon
which do not have an arrow. Maybe there's a way buy I didn't find it.


Regards, Hans.

Ok, Thank you again for your help. I needed to set the direction because I am trying to draw a diagram showing the contour used for a contour integral but I can't get the arrows in the arcs to point where I want them to point.

A related question: is it possible to add arrows to the gluon and photon lines ? That would be useful to indicate the flow of four-momentum.

Thank you again for all the help you have provided!
 

FAQ: Drawing Feynman diagrams with Feynmf

What is "Drawing Feynman diagrams with Feynmf"?

"Drawing Feynman diagrams with Feynmf" is a method of creating visual representations of particle interactions in quantum field theory. It uses the Feynmf package in LaTeX to generate Feynman diagrams, which are diagrams that show the paths of particles and their interactions in a particular physical process.

Do I need to be familiar with LaTeX to use Feynmf?

Yes, a basic understanding of LaTeX is necessary to use Feynmf. Feynmf is a package that can be used within the LaTeX document preparation system, so some knowledge of LaTeX syntax and structure is required.

Can I use Feynmf to create diagrams for any physical process?

Yes, Feynmf can be used to create diagrams for any process that can be described using quantum field theory, such as particle collisions or decays. However, it is important to have a good understanding of the physics behind the process in order to accurately construct the Feynman diagram.

Are there any limitations to using Feynmf for drawing Feynman diagrams?

One limitation of using Feynmf is that it is not suitable for creating diagrams for processes involving particles that have spin greater than 1/2. It also does not support the inclusion of diagrams with loop corrections.

Are there any resources available to help me learn how to use Feynmf?

Yes, there are several online tutorials and guides available that can help you learn how to use Feynmf to draw Feynman diagrams. Additionally, there are various books and textbooks that cover the topic in depth. It is also helpful to have a general understanding of quantum field theory before attempting to use Feynmf.

Similar threads

Replies
1
Views
2K
Replies
8
Views
2K
Replies
10
Views
3K
Replies
2
Views
3K
Replies
4
Views
2K
Replies
13
Views
2K
Replies
1
Views
1K
Back
Top