I am creating a diagram with tikz-feynman (code below) and two labels overlap each other. I would like to displace the two labels starting $p - q ... and $p + q ... so that they don't overlap. (I appreciate that I could just make the diagram bigger, but I want to locate it in a place where I have limited space.)
This code is compiled by LuaTex in lextlive 2018 https://www.overleaf.com/learn/latex/Feynman_diagrams#Update_(9_November_2022)
\documentclass{article}
\usepackage{tikz}
\usepackage[compat=1.1.0]{tikz-feynman}
\usepackage{bm}
\begin{document}
\feynmandiagram [horizontal=a to b] {
s0 [particle={$\omega_{\rm in}, \bm{k}{\rm in}$}] -- [photon] i1 [label=above right:{$\bm{p}-\bm{q}, \omega-\Omega$}],
s1 [particle={$\omega{\rm out}, \bm{k}{\rm out}$}] -- [photon] i2,
i2 -- [charged scalar] i1,
i1 -- [fermion] a -- [fermion, edge label={$\bm{p}, \omega$}] i2,
a -- [gluon, edge label'={$\bm{q}, \Omega$}] b,
f1 -- [fermion, edge label={$\bm{p}^\prime, \omega^\prime$}] b -- [fermion] f2,
f1 -- [charged scalar] f2 [label=above left:{$\bm{p}^\prime+\bm{q}, \omega^\prime+\Omega$}],
f1 -- [photon] l1 [particle={$\omega{\rm out}, \bm{k}{\rm out}$}],
f2 -- [photon] l2 [particle={$\omega{\rm in}, \bm{k}_{\rm in}$}],
};
\end{document}

I will update this on the question.
– Mark Dean Oct 02 '23 at 13:36label={[<options>]<angle>:<text>}. For example withlabel={[red,above right=10pt and -5pt]{$\bm{p}-\bm{q}, \omega-\Omega$}}andlabel={[blue,above left]{$\bm{p}^\prime+\bm{q}, \omega^\prime+\Omega$}}the two labels are colored and don't overlap anymore. I don't have enough physics knowledge to decide which position is better. The different output between TeX Live 2018 and 2023 on Overleaf is probably caused by the different Lua version used by LuaTeX, see https://tex.stackexchange.com/q/468466. – muzimuzhi Z Oct 02 '23 at 16:18