tikz-feynman 中的顶点样式

tikz-feynman 中的顶点样式

我已经习惯了非常棒的 TikZ-Feynman 包!我正在尝试弄清楚如何在使用手动放置时向顶点添加样式。例如,我希望下面的“blob”实际上是一个 blob,而不是单词:

\documentclass[border=4mm]{standalone}
\usepackage{tikz} 
\usetikzlibrary{shapes,arrows,positioning,automata,backgrounds,calc,er,patterns}
\usepackage[compat=1.1.0]{tikz-feynman}

\begin{document}
\begin{tikzpicture}
\begin{feynman}
\vertex (pf) {$\underline{p}$};
\vertex [right=1cm of pf] (qf1) {$\underline{q}_1$};
\vertex [right=1cm of qf1] (qf2) {$\underline{q}_2$};
\vertex [right=1cm of qf2] (qf3) {$\underline{q}_3$};
\vertex [right=1cm of qf3] (qf4) {$\underline{q}_4$};

\vertex [below=5cm of pf] (pi) {$p$};
\vertex [right=1cm of pi] (qi1) ;
\vertex [right=1cm of qi1] (qi2) {$q_1$};
\vertex [right=1cm of qi2] (qi3) {$q_2$};
\vertex [right=1cm of qi3] (qi4);

\vertex [below=2.5cm of qf2] (c) {blob} ;

\diagram*{
 (pi) -- [scalar] (c) -- [scalar] (pf),
 {(qi2),(qi3)} -- (c),
 (c) -- {(qf1),(qf2),(qf3),(qf4)},
};


\draw [decoration = {brace} , decorate] (qf1.north west) -- (qf4.north east) node [pos = 0.5 , above = 0.125cm] {\underline{\alpha}};

\draw [decoration = {brace} , decorate] (qi3.south east) -- (qi2.south west) node [pos = 0.5 , below = 0.125cm] {\alpha};

\end{feynman}
\end{tikzpicture}

\end{document}

得出的结果为:

图表

我尝试了各种常用的 TikZ 节点语法,但都没有成功。我喜欢 TikZ-feynman 中的默认“blob”,但很乐意在其中手动绘制一个大阴影圆圈。谢谢!

答案1

看起来您只需将常用的键添加到\vertex宏的选项中即可,例如\vertex [below=2.5cm of qf2,blob] (c) {blob};blob样式由定义tikz-feynman

\documentclass[border=4mm]{standalone}    
\usepackage{tikz} 
\usetikzlibrary{shapes,arrows,positioning,automata,backgrounds,calc,er,patterns}
\usepackage[compat=1.1.0]{tikz-feynman}

\begin{document}
\begin{tikzpicture}
\begin{feynman}
\vertex (pf) {$\underline{p}$};
\vertex [right=1cm of pf] (qf1) {$\underline{q}_1$};
\vertex [right=1cm of qf1] (qf2) {$\underline{q}_2$};
\vertex [right=1cm of qf2] (qf3) {$\underline{q}_3$};
\vertex [right=1cm of qf3] (qf4) {$\underline{q}_4$};

\vertex [below=5cm of pf] (pi) {$p$};
\vertex [right=1cm of pi] (qi1) ;
\vertex [right=1cm of qi1] (qi2) {$q_1$};
\vertex [right=1cm of qi2] (qi3) {$q_2$};
\vertex [right=1cm of qi3] (qi4);

\vertex [below=2.5cm of qf2,blob] (c) {blob} ;

\diagram*{
 (pi) -- [scalar] (c) -- [scalar] (pf),
 {(qi2),(qi3)} -- (c),
 (c) -- {(qf1),(qf2),(qf3),(qf4)},
};


\draw [decoration = {brace} , decorate] (qf1.north west) -- (qf4.north east) node [pos = 0.5 , above = 0.125cm] {\underline{\alpha}};

\draw [decoration = {brace} , decorate] (qi3.south east) -- (qi2.south west) node [pos = 0.5 , below = 0.125cm] {\alpha};

\end{feynman}
\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容