I want to make a Feynman diagram using the Tikz-Feynman package, that is aligned horizontally. The command I use looks like:

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

According to the documentation, this should look like this: enter image description here

but instead it looks like this:

enter image description here

How do I fix this?

PS: I am using a Sharelatex installation on my own server to compile the document.

  • 1
    Do you compile with lualatex? (If I compile with lualatex, I get the desired result, if I compile with xelatex I reproduce your result.) – user121799 Jan 26 '18 at 14:21

The problem was, that my compiler was set to pdfLatex by default. Changing it to LuaLatex makes it work the intended way.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.