TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to draw oval shape with FeynMP? Here is a mwe for a blob [which is a a circle]:



  \fmfcmd{\p@rcent\space the end.^^J%
  \IfFileExists{\thefmffile.mp}{\immediate\write18{mpost \thefmffile}}{}

share|improve this question
up vote 7 down vote accepted

I don't think it's possible without modifying the FeynMP sources, or at least I don't know how.

But you can modify the sources of feynmp.sty and feynmp.mp to do what you want. Make sure you put feynmp.sty and feynmp.mp in the same directory where you compile your latex file and do the following. (Edit: see below for an even simpler patch to feynmp.mp)

On the file feynmp.mp:1325 (line 1325) there is the definition of vblob(). Based on it I created another procedure called vblobOval() right below it:

vardef vblobOval (expr bd) (text vl)=
  forsuffixes $=vl:
    if not vexists $: venter $; fi
    vlist[vlookup $]decor.shape := fullcircle xscaled 1.4;
    vlist[vlookup $]decor.size := bd;
    vlist[vlookup $]decor.sty := "shaded";

where the only difference is the xscaled 1.4 part, which makes the circle oval (you can play with the number; 1.4 seemed nice to me).

On the file feynmp.sty:289 there is the definition of \fmfblob. Based on it I wrote \fmfblobOval

\def\fmfblobOval#1#2{\fmfcmd{vblobOval ((#1), \fmfpfx{#2});}}

below the original \fmfblob, so you still have both.

And now on your latex file instead of using \fmfblob you can use \fmfblobOval,


and you'll have an oval-shaped vertex:

oval-shaped vertex with xscale 1.4

Edit: One can write a one-line patch to feynmp.mp to include an oval style for blobs. If you write

elseif match_prefix (n, "oval"): p := fullcircle xscaled 1.4;

below line 1282 in feynmp.mp you can use the following line to draw an oval-shaped blob in your latex file:

\fmfv{decor.shape=oval, decor.filled=shaded, decor.size=(.5w)}{v1}

The command \fmfv is an equivalent way of drawing a blob (see pag. 17 of the FeynMF manual) which allows one to specify the options explicitly. So you can use the new "oval" shape from the one-line patch above.

share|improve this answer
+1. You may be able to avoid editing the source with the \fmfcmd command (section 2.8 of the manual). – egreg Dec 1 '12 at 10:56
@egreg: Thanks a lot for pointing that out. It looks like it's indeed possible from a first look. – Mafra Dec 1 '12 at 11:49
@egreg: On a second look, it doesn't look possible to extend the drawing of blobs using \fmfcmd. From my understanding of section 2.8 you can only add more styles for arcs. – Mafra Dec 1 '12 at 13:03
You can use \fmfcmd. Just create a vbloboval.mp file containing the vardef text; then add the definition of \fmfblobOval in the document preamble and in the code for the picture just add \fmfcmd{input vbloboval;} and use \fmfblobOval instead of \fmfblob – egreg Dec 1 '12 at 14:30
Instead of xscale 1.4 I used yscale 0.5 which vertically squeezed the circle instead of horizontal stretch. Thank you very much Mafra for your beautiful answer and egreg for your helpful comment! – Laura Dec 2 '12 at 7:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.