LaTeX formatting Feynman Diagrams incorrectly

Click For Summary

Discussion Overview

The discussion revolves around issues with LaTeX formatting of Feynman Diagrams using TikZ-Feynman in TeXMaker. Participants explore potential reasons for incorrect diagram output and share experiences with different tools for drawing Feynman Diagrams.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes their attempt to create a horizontally aligned Feynman Diagram but encounters a vertical output instead, expressing confusion and seeking assistance.
  • Another participant mentions their preference for jaxodraw over TikZ-Feynman, citing it as a WYSIWYG tool compared to the programming nature of feynmf.
  • Some participants suggest that the issue may be related to a compiler bug and recommend switching to LuaLaTeX, noting potential drawbacks such as issues with the PDF previewer and the need to comment out certain package lines.
  • A later reply confirms that changing the compiler helped resolve the issue for them.

Areas of Agreement / Disagreement

Participants express differing experiences with various tools for creating Feynman Diagrams, and while some agree on the potential compiler bug, there is no consensus on the best approach or tool to use.

Contextual Notes

Participants mention specific configurations and settings that may affect the output, such as the choice of compiler and the inclusion of certain packages, but these details remain unresolved in terms of their broader implications.

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

  • Screenshot (11).png
    Screenshot (11).png
    702 bytes · Views: 228
Physics news on Phys.org
I've never used this tool. For my PhD thesis I used feynmf, but that's a bit tedious with "programming" the diagrams only. Now I use jaxodraw, which is WYSIWIG:

https://jaxodraw.sourceforge.io/
 
  • Like
Likes   Reactions: Ridmann
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

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!
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 7 ·
Replies
7
Views
9K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
5K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 6 ·
Replies
6
Views
35K
Replies
3
Views
4K