編譯時如下:
% !TeX program = xelatex
\documentclass{standalone}
\usepackage[force]{feynmp-auto}
\DeclareGraphicsRule{*}{mps}{*}{} % for being able to read the produced file
\begin{document}
\begin{equation*}
\begin{fmffile}{phi-phi}
\begin{fmfgraph*}(4,3)% units are now in cm
% \fmfpen{thick}
\fmfleft{i}
\fmfright{o}
\fmflabel{$x$}{i}
\fmflabel{$y$}{v}
\fmflabel{$z$}{o}
\fmf{plain}{i,v,v,o}
\fmfdot{v}
\end{fmfgraph*}
\end{fmffile}
\end{equation*}
\begin{equation*}
\begin{fmffile}{psi-psi}
\begin{fmfgraph*}(4,3)% units are now in cm
% \fmfpen{thick}
\fmfleft{i}
\fmfright{o}
\fmflabel{$x$}{i}
\fmflabel{$y$}{v}
\fmflabel{$z$}{o}
\fmf{dashes}{i,v,v,o}
\fmfdot{v}
\end{fmfgraph*}
\end{fmffile}
\end{equation*}
\end{document}
我得到輸出:
出了什麼問題?
我正在使用 XelateX 進行編譯。另外,我對基於 的解決方案不感興趣tikz-feynman
。
答案1
我不確定你真正在做什麼,因為你的 MWE 不會產生你顯示的輸出。也許問題出在您的程式碼中以某種方式\unitlength
被重置或覆蓋。當兩張圖片具有相同大小時,以下編譯效果很好:
% !TeX program = xelatex
\documentclass{article}
\usepackage{amsmath}
\usepackage[force]{feynmp-auto}
\DeclareGraphicsRule{*}{mps}{*}{} % for being able to read the produced file
\begin{document}
\setlength{\unitlength}{1cm}
\begin{equation*}
\begin{fmffile}{phi-phi}
\begin{fmfgraph*}(4,3)% units are now in cm
% \fmfpen{thick}
\fmfleft{i}
\fmfright{o}
\fmflabel{$x$}{i}
\fmflabel{$y$}{v}
\fmflabel{$z$}{o}
\fmf{plain}{i,v,v,o}
\fmfdot{v}
\end{fmfgraph*}
\end{fmffile}
\end{equation*}
\begin{equation*}
\begin{fmffile}{psi-psi}
\begin{fmfgraph*}(4,3)% units are now in cm
% \fmfpen{thick}
\fmfleft{i}
\fmfright{o}
\fmflabel{$x$}{i}
\fmflabel{$y$}{v}
\fmflabel{$z$}{o}
\fmf{dashes}{i,v,v,o}
\fmfdot{v}
\end{fmfgraph*}
\end{fmffile}
\end{equation*}
\end{document}