Plot Feynman diagram in texmacs

Hi

Is there a simple way to draw Feynman diagrams in texmacs? I can not find any recent materials on this topic (although some decades-old posts can be found on google). Hope here some friends can give me suggestions or even useful examples on how to do it.

There is a feynmf plugin. I haven’t tried it myself, but it might fulfill your needs.

It is not working neither on my ubuntu nor mac…

What happens when you try to use it? Do you get any error messages?

First of all, please make sure that your LaTeX installation works fine on your computer.

Once you can use LaTeX to create a feynman diagrams and your python session in GNU TeXmacs works fine, you should be able to create a feynman diagrams in GNU TeXmacs.

1 Like

Thanks for the reply! @jeroen @sadhen

My LaTeX works perfectly.

On ubuntu, under Insert->Session there is no feynmf

On mac, it shows the following problem:

Sorry, I thought I’ve migrate it to tmpy. And I just found that it is still implemented in perl and shell.

You can re-impl it in Python like:

You can try to use feynmf in the “Graph” plugin, it should work. “Graph” give you access to various graphical programs in a single plugin. Give a look at the help to see example (also for feynmf).

2 Likes

Thank you, @mgubi , feynmf indeed works inside Graph plugin!

I prefer the method proposed by @mgubi, because I need no further adjustment :grinning:

1 Like

There is some redundancy now in the plugin system. Actually @sadhen wrote the Graph plugin and it is a cool idea of him to have it serve multiple purpose. Using the %pdflatex backend you can actually run arbitrary latex commands, not only feynmf or tikz.

What would you do if you want export such a document to LaTeX? They should be better directly embedded as codes, instead of as images (sometimes journals don’t accept these produced images.)

Yes, I am also going to ask this question…