Tikz-Feynman:多个图表的对齐

Tikz-Feynman:多个图表的对齐

我正在尝试重新创建这两个图表并将它们很好地对齐。

在此处输入图片描述

我能够粗略地重新创建这两个图表

\begin{tikzpicture}
\begin{feynman}
\diagram [horizontal=a to b, layered layout] {
  a [particle=\(h_0\)] -- [scalar] b --
  b -- [scalar] c [particle=\(h_0\)]
};
\path (b)--++(90:0.5) coordinate (A);
\draw [dashed] (A) circle(0.5) node[left] at (1.0,0.5) {$\tilde{f}$};
\end{feynman}
\end{tikzpicture}

\feynmandiagram [layered layout, horizontal=b to c] {
a [particle=\(h_0\)]-- [scalar] b
-- [scalar, half left, edge label=\(\tilde{f}\)] c
-- [scalar, half left, edge label=\(\tilde{f}\)] b,
c -- [scalar] d [particle=\(h_0\)],
};

但我不明白如何通过将它们放在一个图中来使标量线对齐。如果我将这些部分放在一起,我最终会得到一个有两页的文档,每页一个图表。任何帮助都将不胜感激!

答案1

基本上,你正在寻找基线密钥。然而,我应该说,我在恰恰在保持原始语法的同时对齐它们,这就是为什么现在第二张图也是这种形式\begin{feynman}...\end{feynman}。不确定问题是什么,但这似乎有效:

\documentclass{article}
\usepackage{tikz-feynman}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[baseline=(b.base)]
\begin{feynman}
\diagram [horizontal=a to b, layered layout] {
  a [particle=\(h_0\)] -- [scalar] b -- [scalar] c [particle={\(h_0\)}]
};
\path (b)--++(90:0.5) coordinate (A);
\draw [dashed] (A) circle(0.5) node[left] at (1.0,0.5) {$\tilde{f}$};
\end{feynman}
\end{tikzpicture}\quad
\begin{tikzpicture}[baseline=(b.base)]
\begin{feynman}
\diagram[layered layout, horizontal=b to c] {
a [particle=\(h_0\)]-- [scalar] b
-- [scalar, half left, edge label=\(\tilde{f}\)] c
-- [scalar, half left, edge label=\(\tilde{f}\)] b,
c -- [scalar] d [particle=\(h_0\)],
};
\end{feynman}
\end{tikzpicture}
\end{figure}
\end{document}

在此处输入图片描述

答案2

将两者放在一个 tikzpicture 中就可以了

\begin{tikzpicture}
\begin{feynman}
\diagram [horizontal=a to b, layered layout] {
  a [nudge=(180:5mm),particle=\(h_0\)] -- [scalar] b --
  b -- [scalar] c [nudge=(0:5mm),particle=\(h_0\)]
};
\path (b)--++(90:0.7) coordinate (A);
\draw [dashed] (A) circle(0.7) node[left] at (1.25,0.7) {$\tilde{f}$};
\diagram [xshift=5cm,layered layout, horizontal=b to c] {
a [particle=\(h_0\)]-- [scalar] b
-- [scalar, half left, edge label=\(\tilde{f}\)] c
-- [scalar, half left, edge label=\(\tilde{f}\)] b,
c -- [scalar] d [particle=\(h_0\)],
};
\end{feynman}
\end{tikzpicture}

相关内容