JP-Ellis / tikz-feynman

Feynman Diagrams with TikZ
http://www.jpellis.me/projects/tikz-feynman
Other
148 stars 20 forks source link

momentum arrow not colored #22

Open mreininghaus opened 8 years ago

mreininghaus commented 8 years ago

When drawing a propagator with color and momentum options, the propagator line and the momentum text are drawn/written in that color, but the momentum arrow is not.

Example code (v.1.1.0): \feynmandiagram[horizontal=i1 to o1] { i1 -- [gluon, momentum=$p$, red] o1; };

JP-Ellis commented 8 years ago

This is a known deficiency in Ti_k_Z-Feynman which I mention in the documentation (see §3.2.5). This is because I couldn't initially find a way of having the momentum arrow inherit the colour without everything else (such as the gluon style).

You can actually provide additional style argument in the momentum specification in brackets:

\documentclass[tikz,convert]{standalone}

\usepackage[compat=1.1.0]{tikz-feynman}

\begin{document}
\feynmandiagram [horizontal=a to b] {
  a -- [gluon, red, momentum={[arrow style=red]\(k\)}] b,
};
\end{document}

23

mreininghaus commented 8 years ago

Thanks, I have overlooked that.