10

I would like to draw feynman diagrams with Tikz Feynman but I have some rendring problem :

Here the file with the first exemple of the documentation

\documentclass[11pt,french,letterpaper]{article}
\usepackage{amssymb,amsmath,amsfonts,babel,lmodern}
\usepackage[compat=1.0.0]{tikz-feynman}


\begin{document}

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

\end{document}

And the rendering :

enter image description here

Which is not what I expect !

The expected result from the doc : https://www.overleaf.com/learn/File:S-channel.png

Any idea ? Thank You

Edit: Ok problem solve, TikZ Feynman need to be compile with LuaLatex (and I was compiling with pdflatex)

Dalnor
  • 131
  • 2
    Does this help? –  Jan 14 '19 at 15:37
  • Not exactly but it make my try to compile with lulatex and it is now working.

    I should have read few more sentences in the documentation : "As a final remark, the calculation of where vertices should be placed is usually done through an algorithm written in Lua. As a result, LuaTeX is required in order to make use of these algorithms. If LuaTeX is not used, TikZ-Feynman will default to a more rudimentary algorithm and will warn the user instead. "

    – Dalnor Jan 14 '19 at 15:45
  • 1
    OK, I see. Yes, if you want to use the graph drawing routines, you need to compile with lualatex, which (as of now) prevents you from uploading the TeX file to the arXiv. –  Jan 14 '19 at 15:47
  • 1
    I think you should self-answer your question, pasting there your comment and the manual citation. – sztruks Jan 14 '19 at 16:48
  • I will but I have to "wait 2 day for accepting my own answer" (maybe with more reputation I might be able to do it now but right now i can't ;) ) – Dalnor Jan 14 '19 at 21:50

1 Answers1

3

Problem solve.

Tikz need Lualatex for a proper rendering as explain in the documentation :

"As a final remark, the calculation of where vertices should be placed is usually done through an algorithm written in Lua. As a result, LuaTeX is required in order to make use of these algorithms. If LuaTeX is not used, TikZ-Feynman will default to a more rudimentary algorithm and will warn the user instead. "

Dalnor
  • 131