JP-Ellis / tikz-feynman

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

Propagators crossing on top (gap) #50

Open losmaxos opened 6 years ago

losmaxos commented 6 years ago

Many users like to indicate that two propagator lines cross only on paper (without any physical interaction) by drawing one line as interrupted, such that one propagator appears to run ON TOP of the other.

One possibility to implement this is via a "top" style option in the keys-file:

  every top@@/.style={
     /tikz/preaction={draw=\feynhandtopsepcolor,line width=\feynhandtopsep} 
   },
   every top/.style={/tikzfeynhand/every top@@/.append style={#1}},
   top/.style={
     /tikzfeynhand/every top@@,
   },

The preaction draws the propagator with color \feynhandtopsepcolor (default: white) and width \feynhandtopsep (default: 2mm) across any earlier propagators. After this, the propagator is drawn again with the usual style attributes.

You might want to use something more Tikz-like than a LaTex length and newcommand... Anyway, the preaction should be practical both for manual and automatic drawing mode.

zhyiyu commented 5 years ago

In the meantime, you may want to check package tikz-feynhand which exactly does with option top.