I would like my momenta labels to be smaller and to be placed along the momentum arrows (e.g. $k_1+k_2$). Also, is it possible to make vertex labels bold and larger (z…)? (\mathbf does the job,but I didn't manage to combine it with the resizing). Here is my code:
\documentclass[tikz, border=10pt]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\begin{tikzpicture}
\begin{feynman}
\vertex (a1)[blob,label=180:\(J\)] {};
\vertex(a2)[right=1.8cm of a1,dot, label=90:\(z_1\)]{} ;
\vertex(a3)[right=1.5cm of a2, dot,label=90:\(z_2\)]{} ;
\vertex(a4)[right=1cm of a3, dot,label=90:\(z\)]{} ;
\vertex[right=2cm of a4](a5){};
\vertex(a6)[below=1.5cm of a2, crossed dot]{};
\vertex(a7)[below=1.5cm of a3, crossed dot]{};
\vertex(a8)[above right=3cm of a4]{};
\node[text width=3cm] at (1.8,0.25) {$z_0$} ;
\diagram* {
(a1) -- [gluon, momentum={[arrow shorten=0.3] \( p+k_1+k_2-q_1-q_2\)}] (a2) -- [gluon, momentum={[arrow shorten=0.3] \(p+k_1+k_2-q_2\)}] (a3) -- [gluon, momentum={[arrow shorten=0.3] \(p+k_1+k_2\)}] (a4)--[gluon, momentum= {[arrow shorten=0.3]\(p\)}](a5) ,
(a4)--[gluon, momentum= {[arrow shorten=0.3]\(k_1+k_2\)}](a8),
(a6) -- [gluon, momentum={[arrow shorten=0.3] \(\vec{\bf{q_1}}\)}](a2) ,
(a7) -- [gluon, momentum={[arrow shorten=0.3] \(\vec{\bf{q_2}}\)}](a3) ,
};
\end{feynman}
\end{tikzpicture}
\end{document}
Best Answer
Nice use of TikZ-Feynman (CTAN)!
Indeed with all the momentum arrows and all the labels, you definitely want everything to be small. The simplest is to just add one of the font size commands within the momentum label:
In your case though, even that doesn't work as the resulting label is still too wide. As a result, the only option seems to be stacking the momentum labels. This can be achieved with the
{subarray}
environment which will both stack and use a smaller font (it is designed to stack options under\sum
for example).Here's what I've done:
As you can see, I've defined a
\stack
command which creates a{subarray}
environment. You could just write the{subarray}
environment every time, but that's quite cumbersome hence why I defined the function.I also removed a lot of the explicit distances since TikZ-Feynman tries to have quite sane defaults to begin with. In the case of the blob, the distance is left as the larger size of the blob makes the edge look a lot smaller.
Lastly, since the top part of the diagram is quite text-heavy with all the momentum labels, I have placed the 'z' labels of the vertices on the bottom.