# Putting a title on a Feynman diagram with feynmp

I would like to put an overall title for a FeynMP diagram, as it is going to be put in a figure side by side with many other Feynman diagrams. I would like it to look something like this:

The option to put it either top or bottom would be also welcome. The source without the title is as follows:

\documentclass{article}
\usepackage{feynmp}
\DeclareGraphicsRule{*}{mps}{*}{}

\begin{document}
\thispagestyle{empty}
\unitlength = 1mm
%lb - left bottom
%rt - right top
\begin{fmffile}{gluon}
\begin{fmfgraph*}(30,30)
\fmfleft{lb,lt}
\fmflabel{Left bottom}{lb}
\fmflabel{Right bottom}{rb}
\fmfright{rb,rt}
\fmflabel{Right top}{rt}
\fmflabel{Left top}{lt}
\fmf{fermion}{lb,v1}
\fmf{fermion}{v1,rt}
\fmf{dashes_arrow}{rb,v1}
\fmf{fermion}{v1,lt}
\fmfdot{v1}
\end{fmfgraph*}
\end{fmffile}
\write18{mpost gluon}
\end{document}


Any information will be appreciated!

-
This answer tex.stackexchange.com/questions/174654/… shows how to put a feynmf result into a box, thereby allowing you to place text adjacent (or above) it in a manner of your choosing. –  Steven B. Segletes Jun 12 at 13:24
Welcome to TeX.SX! There's no need of doing \write18{mpost gluon}, for feynmp already takes care of it. –  egreg Jun 12 at 13:27
Thanks for the comments, guys! egreg: I thought so too, but if I remove it, does not work for me any more. gluon.mp is generated, but not mposted. Steven B. Segletes: I cannot use this. Two reasons: the labels ("Left bottom", etc.) are outside the box, and otherwise how do I center my title relative to the diagram? As a general remark, possibly related to egreg's comment, I prefer compiling the figures to PDFs and them embeddings the PDF into my paper. Is that not how you guys do it? Thanks again in any case! –  user1577683 Jun 12 at 13:59

I've come up with two ways to solve the problem:

1) Add the title to the tex file which generates the diagram. The advantage is that the title is the same size as the labels on the diagram. Code:

\documentclass{article}
\usepackage{feynmp}
\DeclareGraphicsRule{*}{mps}{*}{}

\begin{document}
\thispagestyle{empty}
\unitlength = 1mm
%lb - left bottom
%rt - right top
%
\begin{center}
TITLE
\vspace{3ex} %space that is 3 'x' letters high
\end{center}
%
\begin{fmffile}{gluon}
\begin{fmfgraph*}(30,30)
\fmfleft{lb,lt}
\fmflabel{Left bottom}{lb}
\fmflabel{Right bottom}{rb}
\fmfright{rb,rt}
\fmflabel{Right top}{rt}
\fmflabel{Left top}{lt}
\fmf{fermion}{lb,v1}
\fmf{fermion}{v1,rt}
\fmf{dashes_arrow}{rb,v1}
\fmf{fermion}{v1,lt}
\fmfdot{v1}
\end{fmfgraph*}
\end{fmffile}
\write18{mpost gluon}
\end{document}


2) After generating the PDFs, put them into subfigures, as described in the wikibooks latex tutorial.

Thanks again to egreg and Steven B. Segletes!

-