본문 바로가기

Computer/linux

How to make a stand alone eps file by using Feynmp

Feynmp(Feynmf) is found on http://www.ctan.org/tex-archive/macros/latex/contrib/feynmf/

# emacs test.tex &
\documentclass{article}
\usepackage{feynmp}
\pagestyle{empty}
\begin{document}
\unitlength = 1mm
\begin{fmffile}{example1}
\begin{fmfchar*}(40,25)
  \fmfleft{em,ep} \fmflabel{$e^+$}{ep} \fmflabel{$e^-$}{em}
  \fmf{fermion}{em,Zee,ep}
  \fmf{photon,label=$\gamma,,Z$}{Zee,Zff}
  \fmf{fermion}{fb,Zff,f}
  \fmfright{fb,f} \fmflabel{$\bar f'$}{fb} \fmflabel{$f$}{f}
  \fmfdot{Zee,Zff}
\end{fmfchar*}
\end{fmffile}
\end{document}
# latex test.tex
# mpost example1.mp
# latex test.tex

# dvips -E test.dvi -o test.eps 

OR

# bash_script.sh



The test.tex file is the exact same code that can be found in the simple examples of feynmp or feynmf except \pagestyle{empty} and the output file name such as example1.  Without the empty style,  dvips command cannot produce an eps file with the correct bounding box owing to the page number.

사용자 삽입 이미지

one more example is


사용자 삽입 이미지

The modified source is

사용자 삽입 이미지