我制作了费曼图 这个图
\documentclass[10pt,a4paper]{article}
\usepackage{pgfplots,wrapfig}
\usepackage{tikZ-feynman,contour}
\usepackage{amsmath}
\begin{document}
\begin{wrapfigure}[14]{R}{0.577\textwidth}
\begin{tikzpicture}[baseline=(current bounding box.north)]
\begin{feynman}[small]
\vertex (i1) [particle=\(e^{-}\)];
\vertex (start) at (-0.3,-0.2) {\(e^{-}\)};
\vertex [above right=20pt of i1] (ii1);
\vertex [above right=20pt of ii1] (v1);
\vertex [above left=20pt of v1] (ii2);
\vertex [above left=20pt of ii2] (i2) {\(e^{-}\)};
\vertex [right=40pt of v1] (v2);
\vertex [above right= 10pt and 17pt of v1] {\(q\)};
\vertex [below right= 5pt and 17pt of v1] {\(\gamma\)};
\vertex [above left = 8pt and -1pt of v1] {\(k'\)};
\vertex [below left = 8pt and -1pt of v1] {\(k\)};
\vertex [above left= 23pt and 13pt of v1] {\(p'\)};
\vertex [below left= 23pt and 13pt of v1] {\(p\)};
\vertex [below right=20pt of v2] (ff1);
\vertex [below right=20pt of ff1] (f1);
\vertex [above right=20pt of v2] (ff2);
\vertex [above right=20pt of ff2] (f2);
\diagram {
(i1) -- [fermion] (ii1)-- [fermion] (v1),
(ii1)-- [boson, momentum, half left, blue] (ii2),
(v1) -- [fermion] (ii2)-- [fermion] (i2),
(v2) -- [boson, momentum',blue] (v1),
(f1) -- [fermion,very thick] (v2)-- [fermion, very thick] (f2),
};
\end{feynman}
\end{tikzpicture}
\end{wrapfigure}
\end{document}
但左侧的动量箭头太大。我该如何改变它的长度?
答案1
默认情况下,动量箭头应为初始路径长度的 70%。如果路径非常弯曲(如本例),则这可能会发生很大变化,但您始终可以使用键进行纠正arrow shorten
。
具体来说,该momentum
样式允许可选参数如下:
momentum={[<optional momentum styles>]<momentum label>}
我还注意到,您正在手动放置标签,使其看起来像是位于某些传播器的边缘。实际上,您可以使用 自动执行此操作edge label
。
这是缩短了动量箭头的图表,并且使用了edge label
而不是手动沿边放置节点:
\documentclass{article}
\usepackage{tikz-feynman}
\begin{document}
\begin{tikzpicture}[baseline=(current bounding box.north)]
\begin{feynman}[small]
\vertex (i1) [particle=\(e^{-}\)];
\vertex (start) at (-0.3,-0.2) {\(e^{-}\)};
\vertex [above right=20pt of i1] (ii1);
\vertex [above right=20pt of ii1] (v1);
\vertex [above left=20pt of v1] (ii2);
\vertex [above left=20pt of ii2] (i2) {\(e^{-}\)};
\vertex [right=40pt of v1] (v2);
\vertex [below right=20pt of v2] (ff1);
\vertex [below right=20pt of ff1] (f1);
\vertex [above right=20pt of v2] (ff2);
\vertex [above right=20pt of ff2] (f2);
\diagram* {
(i1) -- [fermion, edge label'=\(p\)] (ii1)
-- [fermion, edge label'=\(k\)] (v1),
(ii1)-- [
boson,
momentum={[arrow shorten=0.25, arrow style=blue]},
half left,
blue] (ii2),
(v1) -- [fermion, edge label'=\(k'\)] (ii2)
-- [fermion, edge label'=\(p'\)] (i2),
(v2) -- [boson, blue, momentum'={[arrow style=blue]\(q\)}, edge label=\(\gamma\)] (v1),
(f1) -- [fermion,very thick] (v2)
-- [fermion, very thick] (f2),
};
\end{feynman}
\end{tikzpicture}
\end{document}