JP-Ellis / tikz-feynman

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

Shifted Lines #21

Open giordano opened 8 years ago

giordano commented 8 years ago

I've seen sometimes Feynman diagrams with parallel lines drawn between two vertices (see for example https://cnlart.web.cern.ch/cnlart/221/node63.html and http://tex.stackexchange.com/q/121802/31416). Of course, they can be drawn manually using plain Ti_k_Z code, but it'd be great if this package provided a way to draw lines shifted by a specified amount and to a specified side.

For example, the syntax could be something like:

[...]
a -- b,
a -- [shift left=0.1] b,
a -- [shift right=0.1] b,
[...]

This time, I'm sure it's not written how to do this on the manual or on the site ;-)

giordano commented 8 years ago

Thanks to this your answer on TEX.se I got to know there exists by default a double Ti_k_Z key that I wasn't aware of (and that, by the way, doesn't seem to work with photon key, for example), but still the possibility to draw triple lines is missing.

JP-Ellis commented 8 years ago

One way to achieve this is with double and I can easily implement a triple style. I'll have a look at putting that in the documentation and making it work with the other styles (such as gluon and photon).

I'll also have a look at whether I can/want to implement a shifted style. The way I see it, this would allow to have a boson and fermion line side-by-side for example. This may be complicated though, so I will see when I get around to doing that.