I input $p+p'=q+q'$ as the label of the momentum, then TeX returns me the error below
Missing $ inserted.
<inserted text>
$
Missing } inserted.
<inserted text>
}
Extra }, or forgotten $.
\pgfdecoratedinputsegmentlinetocode ...tyle ] {$q}
Package tikz: Giving up on this path. Did you forget a semicolon?.
I guess that it maybe the tikz-feynman
package scan the =
symbol after the word like "momentum", and it misrecognized the =
symbol in math mode, but I don't know how to fix it.
\documentclass{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\feynmandiagram [large, vertical=b to d]
{
a [particle=$\mu^+$] -- [fermion, reversed momentum=$k'$] b -- [anti fermion, momentum=$k$] c [particle=$\mu^-$],
b -- [photon, reversed momentum=$q=p+p'=k+k'$] d,
e [particle=$e^+$] -- [anti fermion, momentum'=$p'$] d -- [anti fermion, reversed momentum'=$p$] f [particle=$e^-$];
};
\end{document}