编译以下内容时:
% !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}