1

This question already has an answer here:

I'm trying to draw some Feynman diagrams with LaTeX. So I'm using the TikZ-Feynman package. But my code below:

\documentclass[tikz]{standalone}
\usepackage{tikz-feynman}
\begin{document}
\feynmandiagram [large, vertical=e to f] {
  a -- [fermion] b -- [photon, momentum=\(k\)] c -- [fermion] d,
  b -- [fermion, momentum'=\(p_{1}\)] e -- [fermion, momentum'=\(p_{2}\)] c,
  e -- [gluon]  f,
  h -- [fermion] f -- [fermion] i;
};
\end{document}

produces the following disfigured diagram!

enter image description here

What should I do?

marked as duplicate by JP-Ellis, Torbjørn T. tikz-pgf Feb 3 '17 at 8:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Welcome to TeX.SE. Thank you for adding your work as MWE. Actually, I don't understand the exact problem. (Maybe due to the fact, that I am not a physician and hence are not able to see the problem at once.) Could you please be so kind, to add a sketch of the diagram, what you want to achieve? Just a quick pencil sketch shot with your handy cam and inserted as image would be sufficient. – Jan Feb 3 '17 at 7:51
  • Well, the TikZ-Feynman package is supposed to give upright diagrams like the ones in the following page:tex.stackexchange.com/questions/86588/… – Credo Feb 3 '17 at 7:53
  • 2
    And physician means a doctor in medicine, we're called physicists, ;). – Credo Feb 3 '17 at 7:54
  • 1
    Are you compiling with pdflatex/xelatex, or lualatex? You need to use lualatex for the more advanced placement algorithms. – Torbjørn T. Feb 3 '17 at 8:01
  • 1
    Cool to see more people using Tikz-Feynman! This is actually a duplicate of this issue :). I'll vote to close it. – JP-Ellis Feb 3 '17 at 8:06