I'm trying to create the diagram below using the feynmf package, but I'm extremely inexpert and I don't know where to start to create the two protons that enter the blob. Im happy for the two blue lines to come out as dashed lines if coloured lines are impossible in feynmf, but I would really appreciate some help with this.

Equally if there are other easy to learn packages that could make this, I'm open to learning something else!


Desired diagram

4 Answers 4


I wonder if you have heard of Mathcha. You can draw things from their website and get compilable TiKz codes. In fact, the Feynman diagram is one of the examples they have provided.


This is based on details from Parallel lines in Feynman Diagram but I am unable to mark this as a duplicate (sorry no idea how to) so decided I should put it as an answer.

Sadly this isn't the easiest in feynmf but it is possible.

The way to draw it is to produce the diagram with just the central lines for each of the proton legs and then use \fmfi (feynmf immediate mode) to draw shifted copies of the legs.

If the original line is drawn with


then the two extra lines could be drawn with

\fmfi{plain}{vpath (__i1,__b) shifted (thick*(-0.5,2))}
\fmfi{plain}{vpath (__i1,__b) shifted (thick*(0.5,-2))}

You may need to play with the shifts but make sure that the two shifts are exactly the opposite of each other for it to look good.

Also it is useful to know that the first argument for \fmfi can be any line type that can be used with \fmf so dashed lines, arrows, gluon squiggles or anything that can normally be produced can also be produced for the copies.

Also you also asked for how to do colour. This is possible if you use feynmp and metapost rather than feynmf and metafont. This is the only difference between the two packages. feynmp supports colour as metapost supports colour where as metafont only supports black and white. Once you are using feynmp adding colour is as simple as specifying the forground=blue or some other option in first argument to the fmf command.


If you need a colour other than a built in one the syntax is a little awkward as the commas need doubling but is listed in the color section of the manual which is available at https://ctan.math.illinois.edu/macros/latex/contrib/feynmf/fmfman.pdf

  • I really like this solution but I'm having trouble getting it to work. This works: \fmfleft{i1,i2} \fmfright{b} \fmf{plain}{i1,b} \fmfi{plain}{vpath (__i1,__b) shifted (thick*(-0.5,2))} \fmfi{plain}{vpath (__i1,__b) shifted (thick*(0.5,-2))} \fmf{plain}{i2,b} \fmfi{plain}{vpath (__i2,__b) shifted (thick*(-0.5,2))} \fmfi{plain}{vpath (__i2,__b) shifted (thick*(0.5,-2))} But as soon as I change \fmfright{b} to \fmfright{c} and add \fmf{dashed}{b,c} I get no output
    – Beth Long
    Oct 22, 2020 at 8:28
  • To update: I still can't get this to work. Obviously fmf{dashed} was meant to be \fmf{dashes} but even \fmf{plain} doesn't work. I really want to use this solution because I can implement it in LaTeXiT and automatically get the diagram with a transparent background as I want. I'd love any help you could give me
    – Beth Long
    Oct 23, 2020 at 9:51

A pstricks solution with pst-node:

\documentclass[12pt, border=6pt, svgnames]{standalone}


\psnode(-1,1.2){up}{$p$} \psnode(-1,-1.2){dp}{$p$}
\ncline[linestyle=dashed, dash = 5.5pt 4pt, nodesepA=5pt]{O}{I}\naput[labelsep=2pt]{\sansmath $h$}
\pcline[linewidth=4pt, linecolor=blue](I)(us)\naput[labelsep=0pt]{$s$}
\pcline[linewidth=4pt, linecolor=blue](I)(ds)\nbput[labelsep=0pt]{$s$}
\psset{doubleline, doublecolor=Gainsboro, doublesep=4.5pt, nodesepA=10pt}
\psdot[dotstyle=Bo, dotscale=2.8, fillcolor=Gainsboro](O)%


enter image description here

  • How do I compile this? And how can I get rid of the white background and only keep the lines?
    – Beth Long
    Oct 22, 2020 at 8:10
  • The standard way uses latex->dvips->pstopdf. Note that pdflatex cannot make by itself the computations require by postscript. The direct way ises xelatex as compiler. I don't see which white background you mean?
    – Bernard
    Oct 22, 2020 at 8:17
  • When I produce the diagram the lines come out on a white background, which means that if I copy it onto a coloured background then it doesn't blend in. I'd like to have only the lines with a transparent background. I hope that makes sense
    – Beth Long
    Oct 22, 2020 at 8:24
  • I think I see. Actually, there's not background, but the bounding box of the image takes the place of the background. Perhaps, see whether removind the dimensions of the pspicture solves the problem (or replacing this environment with the postscript environment). If it doesn't work, could you post a minimal code illustrating this problem?
    – Bernard
    Oct 22, 2020 at 8:45
  • Commenting the (-1.5,1.5)(2.5,1.5) retains the white background but shifts the diagram so that the bottom left corner of the page is the centre of the diagram. Adding \usepackage{pst-pdf} and changing \begin/end{pspicture} to \begin/end{postscript} gives a very strange output, but I can't add pictures here...
    – Beth Long
    Oct 22, 2020 at 8:58

Following the advice from staircase above and after asking another question here the final diagram that I'm happy with can be made using this code:

    \fmfi{plain}{vpath (__i2,__b) shifted (thick*(-0.75,0.5))}
    \fmfi{plain}{vpath (__i2,__b) shifted (thick*(0.75, -0.5))}  
    \fmfi{plain}{vpath (__i3,__b) shifted (thick*(0.75,0.5))}
    \fmfi{plain}{vpath (__i3,__b) shifted (thick*(-0.75, -0.5))}

Final result with hatched blob

Or for a shaded circle instead of the hatched blob, change \fmfblob to \fmfv{decor.shape=circle,decor.filled=65,decor.size=3mm}{b}: Final result with shaded circle

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .