LaTeX formatting Feynman Diagrams incorrectly

3 replies · 5K views · last reply
PhysicsRock
Messages
121
Reaction score
19
I've been trying to get Feynman Diagrams to work in my LaTeX code, however, the output is not what it is supposed to be. I'm using TeXMaker and TikZ-Feynman to draw the diagrams. My code looks like this:

\feynmandiagram [horizontal=a to b] {
i1 -- [fermion] a -- [fermion] i2,
a -- [photon] b,
f1 -- [fermion] b -- [fermion] f2,
};

which I have copied from the internet for testing purposes. However, instead of displaying a horizontally aligned Feynman Diagram, this gives me a weird vertical one, as seen in the attached picture.
Can anybody explain why this is happening? I am clueless and I haven't really found any solutions on the internet yet.

Thank you in advance and have a great day everybody.
 
Attachments
  • Feynman diagram: a fermion line with arrows enters from below and meets a vertex, with a wavy photon line running up and to the right to a second vertex on a horizontal fermion line with an outgoing arrow.
    Screenshot (11).png
    702 bytes · Views: 263
It is a compiler bug. If you change the compiler to LuaLaTex (IDE options) then you might not be able to see the pdf previewer, but the pdf document results in (see attachment)The disadvantage is, that you have to comment out
%\usepackage[latin1]{inputenc}

Corr.: my previewer works meanwhile:

Feynman diagram drawn with tikz-feynman: two incoming fermion arrows meet a wavy photon line, which connects to two outgoing fermion arrows.
 
Attachments
Last edited:
  • Informative
  • Like
Likes   Reactions: Ridmann, topsquark, Wrichik Basu and 2 others
fresh_42 said:
It is a compiler bug. If you change the compiler to LuaLaTex (IDE options) then you might not be able to see the pdf previewer, but the pdf document results in (see attachment)The disadvantage is, that you have to comment out
%\usepackage[latin1]{inputenc}

Corr.: my previewer works meanwhile:

View attachment 315126
That helped. Thank you so much!