3

I just discovered the feynMF package, a really neat tool for drawing Feynman diagrams.

I went ahead and drew a few diagrams which I'll include here just to set the right spirit for this question. I produced this

enter image description here

with this

\documentclass{article}
\usepackage{feynmf}

\begin{document}
$\begin{fmffile}{Diagram}
\begin{fmffile}{Diagram}
\begin{fmfgraph*}(40,15)
   \fmfpen{thin}
   \fmfleft{i}
   \fmfright{o}
   \fmf{plain}{i,o}
   \fmfdot{i,o}
   \fmfv{l.a=-90,l=$x$}{i}
   \fmfv{l.a=-90,l=$y$}{o}
\end{fmfgraph*}
\quad + \quad
\begin{fmfgraph*}(40,15)
   \fmfpen{thin}
   \fmfleft{i}
   \fmfright{o}
   \fmf{plain}{i,v,v,o}
   \fmfdot{i,o,v}
   \fmfv{l.a=-90,l=$x$}{i}
   \fmfv{l.a=-90,l=$y$}{o}
   \fmfv{l.a=-90,l=$z$}{v}
\end{fmfgraph*}
\quad + \quad
\begin{fmfgraph*}(40,15)
   \fmfpen{thin}
   \fmfleft{i}
   \fmfright{o}
   \fmf{plain}{i,v1,v2,o}
   \fmf{plain,left,tension=0.05}{v1,v2,v1}
   \fmfdot{i,o,v1,v2}
   \fmfv{l.a=-90,l=$x$}{i}
   \fmfv{l.a=-90,l=$y$}{o}
   \fmfv{l.a=-90}{v1,v2}
   \fmflabel{$z_{1}$}{v1}
   \fmflabel{$z_{2}$}{v2}
\end{fmfgraph*}
\quad + \enskip \dots
\end{fmffile}
\end{fmffile}$

\end{document}

Then I wanted to draw a few disconnected diagrams. This is where I got stuck. I'm trying to get this

enter image description here

Not very pretty I admit, but you get the idea, I hope. However, everything I tried so far did not compile. Is anybody sufficiently familiar with feynMF that could help me out here?

Janosh
  • 4,042
  • not on topic. But do you know feynmp-auto? It issues the metapost run automatically so you do not have to do it yourself. No intermediate runs of metafont oder metapost anymore. – MaxNoe Dec 01 '14 at 22:23
  • I'm not sure if the point is to draw the shapes you mention, or to have the ability to draw the images inline with text and such. If it is the latter, I had done this a while back: http://tex.stackexchange.com/questions/174654/labeling-several-out-incoming-lines-collectively-in-feynmp/174667#174667, which uses feynmp-auto. – Steven B. Segletes Dec 02 '14 at 00:28
  • @MaxNoe Maybe you're right. However, I am trying to achieve a well-defined purpose with a specific package. So any answer should still be useful to others who run into similar problems. If no answers appear in the next two days, I'll delete this question. – Janosh Dec 02 '14 at 08:40
  • @StevenB.Segletes The point is the former. How to draw the shapes in the second image? – Janosh Dec 02 '14 at 08:41
  • I did not mean your question. I meant my comment. – MaxNoe Dec 02 '14 at 08:42
  • @MaxNoe I see. I learned about the package feynmp-auto yesterday. While writing this question Stackexchange suggested similar questions some of which I looked at. In this thread, egreg recommended the use of feynmp-auto over feynmf. However, since I am using ShareLaTeX most of the time, this ordeal of compiling several times does not affect me. I'll still use feynmp-auto from now on since it's supposed to be easier. – Janosh Dec 02 '14 at 09:05

1 Answers1

6

I contacted Thorsten Ohl, the creator of feynMF, and asked him if disconnected diagrams are possible with his package. His honest reply read

... it needs more tricks than I like, but it's possible.

In my opinion, his solution looks really good:

enter image description here

To reproduce or modify this output, use the following code

\documentclass{article}
\usepackage{graphicx}
\usepackage{feynmp}
\setlength{\unitlength}{1mm}
\DeclareGraphicsRule{*}{mps}{*}{}
\begin{document}
\begin{fmffile}{\jobname-pics}
\begin{center}
  \begin{fmfgraph*}(30,30)
     \fmfpen{thin}
     \fmftop{t}
     \fmfbottom{b}
     \fmf{phantom}{t,v1,b}
     \fmffreeze
     \fmfi{plain}{vloc(__v1){(1,1)}..vloc(__t)..{(1,-1)}vloc(__v1)}
     \fmfi{plain}{vloc(__v1){(-1,-1)}..vloc(__b)..{(-1,1)}vloc(__v1)}
     \fmfdot{v1}
     \fmfv{l=$z_1$,l.angle=180,l.dist=3thick}{v1}
  \end{fmfgraph*}\qquad
  \begin{fmfgraph*}(30,45)
     \fmfpen{thin}
     \fmftop{t}
     \fmfbottom{b}
     \fmf{phantom}{t,v1,v2,b}
     \fmffreeze
     \fmfi{plain}{vloc(__v1){(1,1)}..vloc(__t)..{(1,-1)}vloc(__v1)}
     \fmfi{plain}{vloc(__v2){(-1,-1)}..vloc(__b)..{(-1,1)}vloc(__v2)}
     \fmfi{plain}{vloc(__v1){(1.5,-1)}..{(-1.5,-1)}vloc(__v2)}
     \fmfi{plain}{vloc(__v2){(-1.5,1)}..{(1.5,1)}vloc(__v1)}
     \fmfdot{v1,v2}
     \fmfv{l=$z_1$,l.angle=180,l.dist=3thick}{v1}
     \fmfv{l=$z_2$,l.angle=180,l.dist=3thick}{v2}
  \end{fmfgraph*}\qquad
  \begin{fmfgraph*}(30,60)
     \fmfpen{thin}
     \fmftop{t}
     \fmfbottom{b}
     \fmf{phantom}{t,v1,v2,v3,b}
     \fmffreeze
     \fmfi{plain}{vloc(__v1){(1,1)}..vloc(__t)..{(1,-1)}vloc(__v1)}
     \fmfi{plain}{vloc(__v3){(-1,-1)}..vloc(__b)..{(-1,1)}vloc(__v3)}
     \fmfi{plain}{vloc(__v1){(1.5,-1)}..{(-1.5,-1)}vloc(__v2)}
     \fmfi{plain}{vloc(__v2){(1.5,-1)}..{(-1.5,-1)}vloc(__v3)}
     \fmfi{plain}{vloc(__v3){(-1.5,1)}..{(1.5,1)}vloc(__v2)}
     \fmfi{plain}{vloc(__v2){(-1.5,1)}..{(1.5,1)}vloc(__v1)}
     \fmfdot{v1,v2,v3}
     \fmfv{l=$z_1$,l.angle=180,l.dist=3thick}{v1}
     \fmfv{l=$z_2$,l.angle=180,l.dist=3thick}{v2}
     \fmfv{l=$z_3$,l.angle=180,l.dist=3thick}{v3}
  \end{fmfgraph*}
\end{center}
\begin{center}
  \begin{fmfgraph*}(30,50)
     \fmfpen{thin}
     \fmftop{t}
     \fmfbottom{b}
     \fmf{phantom}{t,v1,dummy1,dummy2,v2,b}
     \fmffreeze
     \fmfi{plain}{vloc(__v1){(1,-1)}..{(-1,-1)}vloc(__v2)}
     \fmfi{plain}{vloc(__v2){(-1,1)}..{(1,1)}vloc(__v1)}
     \fmfi{plain}{vloc(__v1){(1,-3)}..{(-1,-3)}vloc(__v2)}
     \fmfi{plain}{vloc(__v2){(-1,3)}..{(1,3)}vloc(__v1)}
     \fmfdot{v1,v2}
     \fmfv{l=$z_1$,l.angle=90,l.dist=3thick}{v1}
     \fmfv{l=$z_2$,l.angle=-90,l.dist=3thick}{v2}
  \end{fmfgraph*}
\end{center}
\end{fmffile}
\end{document}
Janosh
  • 4,042