I want to make a Feynman diagram using the Tikz-Feynman package, that is aligned horizontally. The command I use looks like:
\documentclass{book}
\usepackage{tikz-feynman}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning,automata,backgrounds,calc,er,patterns}
\tikzfeynmanset{compat=1.0.0}
\begin{document}
\begin{center}
\feynmandiagram[horizontal=a to b]{
i1 -- [fermion] a -- [fermion] i2,
a -- [photon] b,
f1 -- [fermion] b -- [fermion] f2,
};
\end{center}
\end{document}
According to the documentation, this should look like this:

but instead it looks like this:
How do I fix this?
PS: I am using a Sharelatex installation on my own server to compile the document.

lualatex? (If I compile withlualatex, I get the desired result, if I compile withxelatexI reproduce your result.) – Jan 26 '18 at 14:21