Horizontal oriented Feynman diagram with loop is not produced horizontal

I tried to make a simple first order loop diagram of a photon with a virtual fermion loop. This works, except from the last horizontal photon (wavy) line. This is the syntax I used with the tikz-feynman package (with option [compat=1.1.0]):

\documentclass{report}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage[compat=1.1.0]{tikz-feynman}

\begin{document}
\begin{equation} \label{eq:fermionloop}
i\pi_{\mu\nu}^{ab}(q) =
\begin{gathered}
\feynmandiagram [scale=2][layered layout, horizontal=a to b]{
a [particle={$$\gamma$$}, scale=1]  -- [photon,  momentum=$$q$$] c
-- [fermion, half left, looseness=1.5, momentum=$$k+q$$] d
-- [fermion, half left, looseness=1.5, momentum=$$k$$] c,
d -- [photon, momentum=$$q$$] b
}; \end{gathered}
%= i\pi_{\mu \nu}^{ab} (q)
\end{equation}

\end{document}


And the result is: How could I get a horizontal photon line at the end?

• Welcome to TeX.SE. It would be helpful if you composed a fully compilable minimal working example (MWE) including \documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. – user36296 Mar 12 at 16:22
• If you use horizontal=a to b it works, as expected. – marmot Mar 12 at 17:15
• No sorry, I changed the second point many times and it doesn't work with any of them – Mees van Kampen Mar 12 at 19:19
• Your minimal example works for me, I suspect the reason it isn't working for you is because you aren't compiling with LuaLaTeX. Try that and see if that fixes it. – JP-Ellis Mar 13 at 22:52
• Yes, with LuaLaTeX the single diagram works! But in my thesis it produces errors that I cannot solve by looking at current discussions. Is there a good description of using LuaLaTeX with texmaker on mac? – Mees van Kampen Mar 18 at 12:06