我正在尝试使用该包绘制下图tikz-feynman
。
\documentclass{standalone}
\usepackage{tikz-feynman}
\begin{document}
\begin{tikzpicture}
\begin{feynman}
\vertex [dot, label=180:$x$] (x) at (0,0) {};
\vertex [dot, label=0:$x'$] (y) at (2,0) {};
\vertex [dot, label=180:$x_1$] (x1) at (0,2) {};
\vertex [dot, label=0:$x_2$] (x2) at (2,2) {};
\diagram*{
(x1) -- [fermion, half left, out=45, in=135] (x2)
-- [fermion] (x)
-- [fermion] (y)
-- [fermion] (x1),
(x1) -- [photon] (x2),
};
\end{feynman}
\end{tikzpicture}
\end{document}
如您所见,该图有两条费米子线,它们在中间相交,箭头就画在那里。我想沿着费米子线移动箭头,这样两条费米子线就不会重叠。我该怎么做?
答案1
我可能会引入一个虚拟顶点,也以表明线不相交。
\documentclass{standalone}
\usepackage{tikz-feynman}
\begin{document}
\begin{tikzpicture}
\begin{feynman}
\vertex [dot, label=180:$x$] (x) at (0,0) {};
\vertex [dot, label=0:$x'$] (y) at (2,0) {};
\vertex [dot, label=180:$x_1$] (x1) at (0,2) {};
\vertex [dot, label=0:$x_2$] (x2) at (2,2) {};
\vertex [empty dot, minimum size=0mm] (dummy) at (1,1) {};
\diagram*{
(x1) -- [fermion, half left, out=45, in=135] (x2)
-- [fermion] (dummy)
-- [fermion] (x)
-- [fermion] (y)
-- [fermion] (dummy)
-- [fermion] (x1),
(x1) -- [photon] (x2),
};
\draw[-,line width=2mm,white] (dummy)++(-0.2cm,-0.2cm) -- ++(0.4cm,0.4cm);
\draw[-,black] (dummy)++(-0.2cm,-0.2cm) -- ++(0.4cm,0.4cm);
\end{feynman}
\end{tikzpicture}
\end{document}