4

Suppose I have two outgoing lines in Feynmp, o1 and o2. I know how to label each and one of them. But suppose I want to draw a huge curly bracket going from o1 to o2 and then label that bracket. Is it possible doing this with only Feynmp, or do I need to go Tikz on this?

Example (taken from page 28):

\begin{fmfgraph}(40,25)
\fmfpen{thick}
\fmfleft{ip,il}
\fmfright{oq1,oq2,d1,oq3,d2,d3,ol}
\fmf{fermion,tension=2}{ip,vp}
\fmf{fermion}{vp,vq,oq3}
\fmf{fermion}{vp,oq1}
\fmf{fermion}{vp,oq2}
\fmf{photon}{vl,vq}
\fmf{fermion,tension=2}{il,vl}
\fmf{fermion}{vl,ol}
\fmfblob{.15w}{vp}
\fmfdot{vq,vl}
\fmffreeze
\fmfi{plain}{vpath (__ip,__vp) shifted (thick*(0,2))}
\fmfi{plain}{vpath (__ip,__vp) shifted (thick*(1,-2))}
\end{fmfgraph}

Suppose I want to label the outgoing/incoming lines collectively, how would one go about in feynmp? Or do I have to use tikz?

  • 2
    Could you provide an MWE that gives us something to work with? – Steven B. Segletes May 1 '14 at 12:21
  • For those of us who don't use Feynmann diagrams, could you make your MWE complete, starting with \documentclass and ending with \end{document}? – Steven B. Segletes May 1 '14 at 12:48
  • I'm not sure if I'm the right person to do that since I had troubles getting the thing working on my machine in the first place. I included tons of packages (not sure I need them all) until it worked. Now the problem is just some fancy stuff like the one discussed in the question. – Your Majesty May 1 '14 at 13:13
3

EDITED to allow the label brace's vertical offset and extent to be tailored. Again EDITED to add pre- and post- labels.

First note that the bounding box on the diagram only seems to enclose the "nodes", but not the arrows. The first two parameters supplied to the new macros \prefeynlabel and \postfeynlabel are given as fractions of the height of that box. The syntax of these macros are

\prefeynlabel{v-offset fraction}{v-extent fraction}{boxname}{label}

\postfeynlabel{v-offset fraction}{v-extent fraction}{boxname}{label}

NOTE: Since this package uses metapost, one must first compile with pdflatex, then run, in the present case, mpost x.mp, and finally re-run pdflatex.

REVISED to improve the relative positions of brace and label.

\documentclass{article}
\usepackage{scalerel}
\usepackage{feynmp-auto}
\newsavebox\feynbox
\newlength\tmplength
\parskip 2em
\newcommand\prefeynlabel[4]{%
  \setlength{\tmplength}{#2\ht#3}%
  \raisebox{#1\tmplength}{%
  \raisebox{\dimexpr.5\tmplength-.35\ht\strutbox}{#4}%
  \scaleto[1.7ex]{\raisebox{2.33pt}{\{}}{\tmplength}}%
}
\newcommand\postfeynlabel[4]{%
  \setlength{\tmplength}{#2\ht#3}%
  \raisebox{#1\tmplength}{%
  \scaleto[1.7ex]{\raisebox{2.33pt}{\}}}{\tmplength}%
  \raisebox{\dimexpr.5\tmplength-.35\ht\strutbox}{#4}}%
}
\begin{document}
\savebox\feynbox{%
\begin{fmffile}{x}
\begin{fmfgraph}(40,25)
\fmfpen{thick}
\fmfleft{ip,il}
\fmfright{oq1,oq2,d1,oq3,d2,d3,ol}
\fmf{fermion,tension=2}{ip,vp}
\fmf{fermion}{vp,vq,oq3}
\fmf{fermion}{vp,oq1}
\fmf{fermion}{vp,oq2}
\fmf{photon}{vl,vq}
\fmf{fermion,tension=2}{il,vl}
\fmf{fermion}{vl,ol}
\fmfblob{.15w}{vp}
\fmfdot{vq,vl}
\fmffreeze
\fmfi{plain}{vpath (__ip,__vp) shifted (thick*(0,2))}
\fmfi{plain}{vpath (__ip,__vp) shifted (thick*(1,-2))}
\end{fmfgraph}
\end{fmffile}%
}
Note diagram extends past bounding box:

\fboxsep=0pt
\fbox{\usebox{\feynbox}}

Label a portion of the diagram

\usebox{\feynbox}\postfeynlabel{0}{1}{\feynbox}{\{See, the brace centers match}

\usebox{\feynbox}\postfeynlabel{-.15}{.7}{\feynbox}{\{for big and small braces.}

\prefeynlabel{-.45}{.6}{\feynbox}{\textbackslash prefeynlabel}%
\usebox{\feynbox}%
\postfeynlabel{.42}{.8}{\feynbox}{\textbackslash postfeynlabel}
\end{document}

enter image description here

| improve this answer | |
  • Yes exactly like this. Is it possible to label (say) only the lower outgoing lines collectively? I.e. such that the bracket only encloses the lower lines and not the one on top (which is slightly tilted upwards)? – Your Majesty May 1 '14 at 13:37
  • 1
    @LoveLearning Please see revision for requested feature. – Steven B. Segletes May 1 '14 at 14:49
  • Simply beautiful...+1 for /feynmp-auto (y) – Your Majesty May 2 '14 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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