LaTeX formatting Feynman Diagrams incorrectly

  • #1
PhysicsRock
37
4
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

  • Screenshot (11).png
    Screenshot (11).png
    702 bytes · Views: 25

Answers and Replies

  • #3
fresh_42
Mentor
Insights Author
2022 Award
17,643
18,296
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:

1665072342453.png
 

Attachments

  • testfile.pdf
    3.4 KB · Views: 23
Last edited:
  • Informative
  • Like
Likes topsquark, Wrichik Basu, PhysicsRock and 1 other person
  • #4
PhysicsRock
37
4
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!
 

Suggested for: LaTeX formatting Feynman Diagrams incorrectly

Replies
7
Views
504
  • Last Post
Replies
1
Views
409
  • Last Post
Replies
8
Views
4K
  • Last Post
Replies
0
Views
404
  • Last Post
Replies
10
Views
519
  • Last Post
Replies
3
Views
458
  • Last Post
Replies
23
Views
615
  • Last Post
Replies
8
Views
393
  • Last Post
Replies
3
Views
196
  • Last Post
Replies
13
Views
842
Top