我想更改以下使用该tikz-feynman
包绘制费曼图的代码:
\begin{tikzpicture}[baseline={(current bounding box.center)}]
\begin{feynman}
\vertex (a) {\(\rho\)};
\vertex [above left=of a] (b) {\(W^{+},p_{1},\mu_{1}\)};
\vertex [below left=of a] (d) {\(W^{-},p_{2},\mu_{2}\)};
\vertex [ right=of a] (f) {\(\sigma\)};
\vertex [above right=of f] (c) {\(W^{+},k_{1},\nu_{1}\)};
\vertex [below right=of f] (e) {\(W^{-},k_{2},\nu_{2}\)};
\diagram* {
(b) -- [boson] (a) -- [boson] (d),
(a) -- [boson, edge label'=\(Z\)] (f),
(c) -- [boson] (f) -- [boson] (e),
};
\end{feynman}
\end{tikzpicture}
代码结果如下图所示:
我想将rho
和sigma
索引移动到顶点的一侧。
我怎样才能做到这一点?
答案1
可能不是最理想的解决方案,但这是我的尝试:
顶部标签
\documentclass{standalone}
\usepackage{tikz-feynman}
\begin{document}
\begin{tikzpicture}[baseline={(current bounding box.center)}]
\begin{feynman}
\vertex (a) ;
\vertex [above left=of a] (b) {\(W^{+},p_{1},\mu_{1}\)};
\vertex [below left=of a] (d) {\(W^{-},p_{2},\mu_{2}\)};
\vertex [ right=of a] (f) ;
\vertex [above right=of f] (c) {\(W^{+},k_{1},\nu_{1}\)};
\vertex [below right=of f] (e) {\(W^{-},k_{2},\nu_{2}\)};
\diagram* {
(b) -- [boson] (a) -- [boson] (d),
(a) -- [boson, edge label'=\(Z\)] (f),
(c) -- [boson] (f) -- [boson] (e),
};
\vertex [above=0.5em of a] {\(\rho\)};
\vertex [above=0.5em of f] {\(\sigma\)};
\end{feynman}
\end{tikzpicture}
\end{document}
我尝试将它们放在一边\vertex[left=0.7em of a]...
,\vertex[right=0.7em of f]...
但在我看来,结果并不像上面那么整洁。
从侧面看: