Math & Sciencefeynmp | Include Labels

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
pascal88
Posts: 4
Joined: Sun Nov 20, 2011 12:41 am

feynmp | Include Labels

Post by pascal88 »

Hey,
i'm using the following to create .mp files of my graphs:

Code: Select all

	\documentclass{article}
	\usepackage{feynmp}
	\begin{document}
	    \unitlength = 1mm
	    \begin{fmffile}{qqtt}
\begin{fmfgraph*}(40,30) 

\fmfpen{thick}
\fmfleft{i1,i2} 
\fmfright{o1,o2}
\fmf{fermion,label=$q(p_1)$}{i1,v1} 
\fmf{fermion,label=$\bar{q}(p_2)$}{i2,v1}
\fmf{fermion,label=$\bar{t}(p_4)$}{v2,o2}
\fmf{fermion,label=$\bar{t}(p_3)$}{v2,o1}
\fmf{gluon,label=$g(k)$}{v1,v2} 
\fmfdot{v1,v2}

\end{fmfgraph*}
	    \end{fmffile}
	\end{document}
Then i use mpost to convert them to eps and i receive 2 files, one is a .1 file (eps) with the graph itself, which can be implemented with \includegraphics. However the labels are saved in the second file (.t1 extension) and i can't seem to figure out how to implement them.
The label file looks like this:

Code: Select all

% qqtt.t1 -- generated from qqtt.mp
\fmfL(9.69545,6.19753,lt){$q(p_1)$}%
\fmfL(9.69545,23.80247,lb){$\bar {q}(p_2)$}%
\fmfL(20,12.8912,t){$g(k)$}%
\fmfL(34.0259,21.81778,lt){$\bar {t}(p_4)$}%
\fmfL(34.0259,8.18219,lb){$\bar {t}(p_3)$}%


Thanks
Pascal
Last edited by pascal88 on Mon Nov 21, 2011 6:35 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: feynmp | Include Labels

Post by localghost »

I have no problems with running LaTeX, then running Metapost on the *.mp file and running LaTeX again with subsequent conversion to PS or PDF. No need to include any file as external graphics file.


Thorsten
pascal88
Posts: 4
Joined: Sun Nov 20, 2011 12:41 am

Re: feynmp | Include Labels

Post by pascal88 »

It didn't work in the beamer project, however in a seperate one so i can just export/import the graphs per eps.
Thanks
Pascal
Post Reply