
所以我已經使用 feynmp 和 feynmp-auto 數百次了,但現在看來兩者都無法在 Mac OS Yosemite 上運行。我已經安裝了兩者,運行時我收到如下訊息:
我運行這個:
\documentclass{article}
\usepackage{feynmp-auto}
\usepackage{graphicx}
\begin{document}
\unitlength = 1mm
\begin{fmffile}{Test}
\begin{fmfgraph}(40,15)
\fmfleft{i1,i2}
\fmfright{o1,o2}
\fmf{fermion}{i1,v1,v2,o1}
\fmf{fermion}{o2,v4,v3,i2}
\fmf{photon,tension=0}{v1,v3}
\fmf{photon,tension=0}{v2,v4}
\end{fmfgraph}
\end{fmffile}
\end{document}
並得到這個錯誤
feynmp: File Test.1 not found:
feynmp: Process Test.mp with MetaPost and then reprocess this file.
更新:由於某種原因,當我包含以下程式碼(以及相關套件(如果有))時,一切正常:
\ifpdf
\DeclareGraphicsRule{*}{mps}{*}{}
\fi
\makeatletter
\def\endfmffile{%
\fmfcmd{\p@rcent\space the end.^^J%
end.^^J%
endinput;}%
\if@fmfio
\immediate\closeout\@outfmf
\fi
\IfFileExists{\thefmffile.mp}{\immediate\write18{mpost \thefmffile}}{}
\let\thefmffile\relax
}
\makeatother
我認為 feynmp-auto 解決了最後一個問題。
我使用 TexShop 最新版本,但我認為我的 TexLive 是 2013 年的。