How can I change the edges' arrow style? For example with a fermion line:
\RequirePackage{luatex85}
\documentclass[tikz]{standalone}
\usepackage{tikz-feynman}
\begin{document}
\tikzfeynmanset{ fermion/.style = {???} }
\begin{tikzpicture}
\begin{feynman}
\vertex (a);
\vertex [right of a] (b);
\diagram*{ (a) -- [fermion](b) };
\end{feynman}
\end{tikzpicture}
\end{document}
Best Answer
Internally, TikZ-Feynman (CTAN) does not use 'arrows' in the sense of the 'arrows' library from TikZ; instead, it decorates the path using a triangle:
In particular, you can change the shape from
isosceles triangle
to whatever you want. Alternatively, it is also possible to use the\arrow
command within the decoration (refer to the TikZ manual for the exact details).I have illustrated two cases below.
Since you probably want to change the fermion style completely, then I would recommend creating a new fermion style instead of overwriting the default one. Having said that, have a look at Torbjørn T.'s answer as he is going even more general than I am in this answer! He is modifying one of the underlying styles in TikZ-Feynman (the
with arrow
style) so that the arrows are changed for all particles.