I'm plotting automatically generated and laid-out (by tikz-feynman's default spring layout) QED feynman diagrams.
I'm looking to improve the look of the "tadpoles" i.e the vertices where both fermion arcs are attached to the same vertex.
This image shows the options I'm aware of/have considered (the last one a "work in progress"):
Self-contained code to produce those is below (works with Debian 11's texlive's lualatex).
The first row shows use of loop
. Which I'm not sure is actually part of tikz-feynman as its not mentioned in the documentation and I've just seen it used in other people's examples. That can look good when oriented opposite the photon arc, but so far as I know it needs the angles to be set manually... is there any way of automatically getting the loop to be opposite the incoming photon, bearing in mind I'm not controlling the positioning of anything explicitly and leaving it up to tikz-feynman's layout?
The second row shows simply setting the tadpole vertex to an empty circle. That'd actually be pretty good if I could make the circle a bit bigger and put an arrowhead on it somewhere.
The third row is the start of an attempt to do just that, by defining a tadpole style for a vertex.
Here's the code to produce the above plot. What I'm ideally looking for is what I should be filling out the \tikzfeynmanset{tadpole/.style={...
with to get a white-filled black circle with no text label, a specified size and an arrowhead somewhere on it. However at this point I'm completely out of my depth with tikz and how this stuff interacts with tikz-feynman. Thanks for any help or pointers.
Code for above plot:
\documentclass[a4paper]{minimal}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning,decorations,backgrounds,calc,er,patterns}
\usepackage[compat=1.1.0]{tikz-feynman}
% First groping towards a custom "tadpole" style.
\tikzfeynmanset{
tadpole/.style={
/tikz/shape=circle,
/tikz/minimum size=5mm,
/tikz/draw=black,
/tikz/fill=white,
/tikz/decoration={name=none}
}
}
% Tweak table appearance
\setlength{\tabcolsep}{1cm}
\renewcommand{\arraystretch}{2.0}
\begin{document}
\begin{center}
\begin{tabular}{ccc}
\parbox{3cm}{Using \texttt{loop}:\\Looks reasonable, but needs manual orientation.}
&
\parbox{3cm}{
\resizebox{!}{3cm}{
\begin{tikzpicture}
\begin{feynman}
\diagram[small,vertical=out to in]{
in [desired at={(0,-1)}],
in -- [fermion] a [dot],
a [dot] -- [photon] b [dot],
b [dot] -- [out=315,in=45,loop] b [dot],
a [dot] -- [fermion] out,
out [desired at={(0,1)}]
};
\end{feynman}
\end{tikzpicture}
}
}
&
\parbox{3cm}{
\resizebox{!}{3cm}{
\begin{tikzpicture}
\begin{feynman}
\diagram[small,vertical'=out to in]{
in [desired at={(0,-1)}],
in -- [fermion] a [dot],
a [dot] -- [photon] b [dot],
b [dot] -- [out=315,in=45,loop] b [dot],
a [dot] -- [fermion] out,
out [desired at={(0,1)}]
};
\end{feynman}
\end{tikzpicture}
}
}
\\ & & \\
\parbox{3cm}{Using \texttt{empty dot}:\\Would be better if bigger, and with an arrow.}
&
\parbox{3cm}{
\resizebox{!}{3cm}{
\begin{tikzpicture}
\begin{feynman}
\diagram[small,vertical=out to in]{
in [desired at={(0,-1)}],
in -- [fermion] a [dot],
a [dot] -- [photon] b [empty dot],
a [dot] -- [fermion] out,
out [desired at={(0,1)}]
};
\end{feynman}
\end{tikzpicture}
}
}
&
\parbox{3cm}{
\resizebox{!}{3cm}{
\begin{tikzpicture}
\begin{feynman}
\diagram[small,vertical'=out to in]{
in [desired at={(0,-1)}],
in -- [fermion] a [dot],
a [dot] -- [photon] b [empty dot],
a [dot] -- [fermion] out,
out [desired at={(0,1)}]
};
\end{feynman}
\end{tikzpicture}
}
}
\\ & & \\
\parbox{3cm}{Attempting to use a custom \texttt{tadpole} style:\\I've idea how to control the size and suppress label.}
&
\parbox{3cm}{
\resizebox{!}{3cm}{
\begin{tikzpicture}
\begin{feynman}
\diagram[small,vertical=out to in]{
in [desired at={(0,-1)}],
in -- [fermion] a [dot],
a [dot] -- [photon] b [tadpole],
a [dot] -- [fermion] out,
out [desired at={(0,1)}]
};
\end{feynman}
\end{tikzpicture}
}
}
&
\parbox{3cm}{
\resizebox{!}{3cm}{
\begin{tikzpicture}
\begin{feynman}
\diagram[small,vertical'=out to in]{
in [desired at={(0,-1)}],
in -- [fermion] a [dot],
a [dot] -- [photon] b [tadpole],
a [dot] -- [fermion] out,
out [desired at={(0,1)}]
};
\end{feynman}
\end{tikzpicture}
}
}
\end{tabular}
\end{center}
\end{document}