JP-Ellis / tikz-feynman

Feynman Diagrams with TikZ
http://www.jpellis.me/projects/tikz-feynman
Other
146 stars 20 forks source link

Getting funky-looking diagrams using electron-positron scattering example #76

Closed kevinhikaruevans closed 2 years ago

kevinhikaruevans commented 2 years ago

I'd like to start using tikz-feynman for my assignments but I'm having difficulty getting it working. I'm also new to TikZ and particle physics. I'm running pgf verison 3.1.9a with tikz-feynman 1.1.0. I'm running on Windows 11 using pdflatex but it also looks weird on other compilers.

Here's the TeX that I'm using:

\documentclass{article}

\usepackage{tikz}
\usepackage[compat=1.1.0]{tikz-feynman}

\begin{document}
    \begin{tikzpicture}[baseline=(current  bounding  box.north west)]
        \begin{feynman}
            \feynmandiagram [horizontal=a to b] {
                i1 -- [fermion] a -- [fermion] i2,
                a -- [photon] b,
                f1 -- [fermion] b -- [fermion] f2,
            };
        \end{feynman}
    \end{tikzpicture}
\end{document}

and here's the output:

image

How do I get the expected output?

kevinhikaruevans commented 2 years ago

Nevermind! I tried lualatex again and it looks as-expected.

Edit: actually, it still fails when I compile my full homework assignment with lualatex, but it looks correct on the minimum working example. 🤔