Open mreininghaus opened 8 years ago
Hi,
You can draw tadpoles by using the loop
option from Ti_k_Z, or alternatively by using the arc
path construction from Ti_k_Z. The loop
version will result in a tear-drop shape, whilst the arc option can draw a perfect circle, so it is up to you which one you prefer.
\documentclass[tikz]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\feynmandiagram [horizontal=a to b] {
a -- [fermion] b -- [out=45, in=-45, loop, min distance=2cm] b,
};
\begin{tikzpicture}
\begin{feynman}
\diagram [horizontal=a to b] {
a -- [fermion] b,
};
\draw (b) arc [start angle=180, end angle=-180, radius=0.7cm];
\end{feynman}
\end{tikzpicture}
\end{document}
and if you add the gluon
style to both:
Hi, that's much better, thank you. You should list these examples in the documentation. Is it possible to set the angles relative to the incoming line? This would be great when the tadpole is only a part of a more extensive diagram with an initially unknown orientation.
Sorry for the late reply. I suspect it won't be possible to create a tadpole in an initially unknown orientation, but I'll have a look and come back to you if it is possible.
The first method seems not working in \diagram*
.
MWE:
\documentclass[tikz]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\begin{tikzpicture}[transform shape,scale=1,baseline=($(a)!0.5!(exa)$.base)]
\begin{feynman}
\node[dot] (a);
\node[right=2in of a,dot] (b);
\vertex[below=2in of a] (exa);
\vertex at ($(a)!0.5!(b)$) (o12);
\vertex at ($(exa)!0.5!(a)$) (a12);
\vertex at ($(o12)!0.5!(a12)$) (g12);
\diagram*{
(a12) --[gluon] (g12);
(g12) --[gluon] (o12);
(g12) --[gluon, out=45,in=-45,loop, min distance=2cm] (g12);
};
\end{feynman}
\end{tikzpicture}
\end{document}
On the low chance that @Turgon-Aran-Gondolin is still having this problem or for others with this issue, this appears to be fixed by removing the brackets around the vertices. i.e.
(g12) --[gluon, out=45,in=-45,loop, min distance=2cm] (g12);
becoming
g12 --[gluon, out=45,in=-45,loop, min distance=2cm] g12;
On the low chance that @Turgon-Aran-Gondolin is still having this problem or for others with this issue, this appears to be fixed by removing the brackets around the vertices. i.e.
(g12) --[gluon, out=45,in=-45,loop, min distance=2cm] (g12);
becoming
g12 --[gluon, out=45,in=-45,loop, min distance=2cm] g12;
Thanks for the reply so many years later :)
Although I completely forgot what my original question was about, upon some quick testing, your solution indeed works. Why does removing the bracket make the magic happen?
I intend to draw a tadpole diagram, i.e. a propagator from one vertex to itself. I'd find it straight forward to do this with
\feynmandiagram{ i1 -- [gluon] v1, v1 -- [gluon] v1;};
but the loop is not drawn. Of course a workaround is to add a second vertex\feynmandiagram{ i1 -- [gluon] v1, v1 -- [gluon, half left] v2, v2 -- [gluon, half left] v1; };
but that looks rather unpleasant in the case of gluons. If there is another way, I'd be happy to hear about it.