tikz-feynman 包 - 图形的水平对齐

tikz-feynman 包 - 图形的水平对齐

我想并排绘制以下三张费曼图:

以下是生成上述费曼图的代码:

\begin{center}
\begin{tikzpicture}
    \begin{feynman}
        \vertex (i1) {\(p_{1}\)};
        \vertex [above right=of i1] (a) {\(\mu\)};
        \vertex [      right=of a ] (b) {\(\nu\)};
        \vertex [      above=of b ] (c) {\(\rho\)};
        \vertex [      left =of c ] (d) {\(\sigma\)};
        \vertex [      below=of d ] (a);
        \vertex [below right=of b ] (i2) {\(p_{2}\)};
        \vertex [above right=of c ] (f2) {\(k_{2}\)};
        \vertex [above  left=of d ] (f1) {\(k_{1}\)};
        \diagram* {
            (i1) -- [photon] (a) -- [fermion, edge label'=\(q-p_{2}\)] (b) -- [fermion, edge label'=\(q\)] (c) -- [fermion, edge label'=\(q-k_{2}\)] (d) -- [fermion, edge label'=\(q-p_{1}-p_{2}\)] (a),
            (b) -- [photon] (i2),
            (c) -- [photon] (f2),
            (d) -- [photon] (f1),
        };
    \end{feynman}
\end{tikzpicture}
\end{center}

我如何生成并排的三个图表?

另外,我如何将索引移到一侧以便每对三条线在顶点连接?

答案1

要并排生成图表,只需将它们一个接一个地添加即可:

\documentclass[tikz]{article}

\usepackage[compat=1.1.0]{tikz-feynman}

\begin{document}
\begin{center}
  \begin{tikzpicture}[baseline=(current bounding box.center)]
    \begin{feynman}
      \vertex (i1) {\(p_{1}\)};
      \vertex [above right=of i1] (a);
      \vertex [      right=of a ] (b);
      \vertex [      above=of b ] (c);
      \vertex [      left =of c ] (d);
      \vertex [      below=of d ] (a);
      \vertex [below right=of b ] (i2) {\(p_{2}\)};
      \vertex [above right=of c ] (f2) {\(k_{2}\)};
      \vertex [above  left=of d ] (f1) {\(k_{1}\)};
      \diagram* {
        (i1) -- [photon] (a) -- [fermion, edge label'=\(q-p_{2}\)] (b) -- [fermion, edge label'=\(q\)] (c) -- [fermion, edge label'=\(q-k_{2}\)] (d) -- [fermion, edge label'=\(q-p_{1}-p_{2}\)] (a),
        (b) -- [photon] (i2),
        (c) -- [photon] (f2),
        (d) -- [photon] (f1),
      };
    \end{feynman}
  \end{tikzpicture}
  %
  \begin{tikzpicture}[baseline=(current bounding box.center)]
    \def\leglength{1}
    \begin{feynman}
      \vertex[blob] (m) at (0, 0) {};
      \vertex (a) at (-\leglength,-\leglength);
      \vertex (b) at ( \leglength,-\leglength);
      \vertex (c) at (-\leglength, \leglength);
      \vertex (d) at ( \leglength, \leglength);
      \diagram* {
        (a) -- [photon] (m) -- [photon] (c),
        (b) -- [photon] (m) -- [photon] (d),
      };
    \end{feynman}
  \end{tikzpicture}
  %
  \feynmandiagram [baseline=(current bounding box.center), horizontal=a to b, node distance=1.5cm] {
    a -- [photon] o [blob] -- [photon] b,
    c -- [photon] o        -- [photon] d,
  };
\end{center}
\end{document}

请注意,我%在中间添加了换行符,因为我想防止 LaTeX 认为应该有一个换行符。此外,还baseline用于调整图表的垂直对齐。

输出

相关内容