我正在尝试制作以下图表:
到目前为止我的代码如下所示:
\documentclass{article}
\usepackage{caption}
\usepackage{feynmp-auto}
\unitlength=1mm
\begin{document}
\begin{figure}[h]
\centering
\captionsetup{format = hang} % align the text in the caption to the left of figure
\begin{fmffile}{diagram}
\begin{fmfgraph*}(60,45)
% External vertices on the left
\fmfleft{i1}
% External vertices on the right
\fmfright{o1,o2}
% Labels on external vertices
\fmflabel{$C(p-k)$}{o1}
\fmflabel{$A(P)$}{i1}
\fmflabel{$A(k)$}{o2}
\fmf{plain}{i1,b1}
\fmf{plain}{b3,o2}
\fmf{plain}{b2,o1}
\fmf{plain_arrow,tension=.10}{b1,b3}
\fmf{plain_arrow,tension=.10}{b1,b2}
\fmf{plain_arrow,tension=.10}{b3,b2}
%\fmfv{decor.shape=triangle,decor.filled=empty,decor.size=.30w}{b}
% \fmfblob{.19w}{b}
% \fmffreeze
\end{fmfgraph*}
\end{fmffile}
\vspace*{3mm}
\caption{ Decay of a particle with mass $P^2 = m_i^2$ into two with masses $p_1^2 = p_2^2 = m_{\pi}^2$ and one with mass $p_3^2 = m_f^2$}
\label{fig1}
\end{figure}
\end{document}
这让我
我怎样才能在右侧有水平外线?
答案1
对于很多更高级的图表或需要更多控制的地方,该\ffmffreeze
命令非常有用。此命令允许 feynmf 使用目前提供的信息计算位置,然后将所有顶点锁定在原位,但允许稍后添加更多线条。
当与幻影类型的线条一起使用时,此功能尤其强大,幻影类型的线条有助于布局规则,但根本不会渲染。
使用这些技术,我们可以使用以下代码生成请求的图表
\documentclass{article}
\usepackage{feynmp-auto}
\usepackage{caption}
\unitlength=1mm
\begin{document}
\begin{figure}[h]
\centering
\captionsetup{format = hang} % align the text in the caption to the left of figure
\begin{fmffile}{diagram}
\begin{fmfgraph*}(60,45)
% External vertices on the left
\fmfleft{i1,i2,i3}
% External vertices on the right
\fmfright{o1,o2,o3}
% Labels on external vertices
\fmflabel{$A(P)$}{i2}
\fmflabel{$C(p-k)$}{o1}
\fmflabel{$A(k)$}{o3}
\fmf{plain}{b1,o1}
\fmf{plain}{i2,b2}
\fmf{plain}{b3,o3}
\fmf{phantom,tension=0.35}{b1,i1}
\fmf{phantom,tension=0.35}{b2,o2}
\fmf{phantom,tension=0.35}{b3,i3}
\fmffreeze
\fmf{plain_arrow}{b1,b3}
\fmf{plain_arrow}{b1,b2}
\fmf{plain_arrow}{b3,b2}
%\fmfv{decor.shape=triangle,decor.filled=empty,decor.size=.30w}{b}
% \fmfblob{.19w}{b}
% \fmffreeze
\end{fmfgraph*}
\end{fmffile}
\vspace*{3mm}
\caption{ Decay of a particle with mass $P^2 = m_i^2$ into two with masses $p_1^2 = p_2^2 = m_{\pi}^2$ and one with mass $p_3^2 = m_f^2$}
\label{fig1}
\end{figure}
\end{document}
进一步使用幻影线和张力,我们可以生成一个非常接近上面给出的样本的图(三角形旋转,但腿仍然水平),使用代码
\documentclass{article}
\usepackage{feynmp-auto}
\usepackage{caption}
\unitlength=1mm
\begin{document}
\begin{figure}[h]
\centering
\captionsetup{format = hang} % align the text in the caption to the left of figure
\begin{fmffile}{diagram}
\begin{fmfgraph*}(100,45)
% External vertices on the left
\fmfstraight
\fmfleft{_,i1,_,i2,_,i3,_}
% External vertices on the right
\fmfright{_,o1,_,o2,_,o3a,_}
\fmftop{_,_,t1,_,t2,_,_}
\fmfbottom{_,_,b1,_,b2,_,_}
% Labels on external vertices
\fmflabel{$A(P)$}{i2}
\fmflabel{$C(p-k)$}{o1}
\fmflabel{$A(k)$}{o3}
\fmf{plain}{x1,o1}
\fmf{plain}{i2,x2}
\fmf{plain}{x3,o3}
\fmf{phantom,tension=2}{o3,o3a}
\fmf{phantom,tension=0.3}{x1,i1}
\fmf{phantom,tension=0.3}{x2,o2}
\fmf{phantom,tension=0.4}{x3,i3}
\fmffreeze
\fmf{plain_arrow}{x1,x3}
\fmf{plain_arrow}{x1,x2}
\fmf{plain_arrow}{x3,x2}
\fmf{dashes}{t1,b1}
\fmf{dashes}{t2,b2}
%\fmfv{decor.shape=triangle,decor.filled=empty,decor.size=.30w}{b}
% \fmfblob{.19w}{b}
% \fmffreeze
\end{fmfgraph*}
\end{fmffile}
\vspace*{3mm}
\caption{ Decay of a particle with mass $P^2 = m_i^2$ into two with masses $p_1^2 = p_2^2 = m_{\pi}^2$ and one with mass $p_3^2 = m_f^2$}
\label{fig1}
\end{figure}
\end{document}
请注意,已选择好张力,使得上腿的长度与下腿的长度相同,但宽度比下腿的长度大一半。