JP-Ellis / tikz-feynman

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

out of the box first example of simple scattering diagram doesnt look right #29

Closed rkunnawa closed 8 years ago

rkunnawa commented 8 years ago

Hi, I just downloaded the classes and tried to draw the first example you have on the website and it came out looking quite weird? im writing it with ejpc 2column format. test_feynman_diagram

Cheers Raghav

rkunnawa commented 8 years ago

It looks like the problem is with the autoplacement. writing it like so

\begin{tikzpicture}
\begin{feynman}
\vertex (b);
\vertex [above left=of b] (a) {\(\mu^{-}\)};
\vertex [below left=of b] (f1) {\(\nu_{\mu}\)};
\vertex [right=of b] (c);
\vertex [above right=of c] (f2) {\(\overline \nu_{e}\)};
\vertex [below right=of c] (f3) {\(e^{-}\)};
\diagram* {
(a) -- [fermion] (b) -- [fermion] (f1),
(b) -- [boson, edge label'=\(W^{-}\)] (c),
(c) -- [anti fermion] (f2),
(c) -- [fermion] (f3),
};

works and produces something nice: test_feynman_diagram2

rkunnawa commented 8 years ago

i cant for the life of me, get this code to display like code. sorry about that.

JP-Ellis commented 8 years ago

This issue is most likely because you are not compiling your document with LuaLaTeX. Hopefully, there should be some warning messages in the log telling you about this though if you don't, please let me know.

rkunnawa commented 8 years ago

Hey, Yeah you are correct. Once i compiled it with LuaLaTex it worked fine! I think this is quite the useful package 👍 Cheers Raghav

esel7353 commented 7 years ago

So tigz-feynman can only be used with LuaLaTex?

JP-Ellis commented 7 years ago

@esel7353 the basic features of Ti_k_Z-Feynman work with any compiler (pdfLaTeX, XeLaTeX, LuaLaTeX); however, the algorithms to automatically determine the placement of vertices is written in Lua and thus requires LuaLaTeX to work. If you are not using LuaLaTeX, you'll have to use manually specify the position of the vertices (check the manual to see how that can be done).