0

I am using tikz-feynman to draw a Feynman diagram in a document I compile with pdflatex, so I need to use manual placement of the vertices as shown here:

\documentclass{minimal}
\usepackage{tikz-feynman}

\begin{document}

  \begin{tikzpicture}
    \begin{feynman}
      \vertex (i1) {$a$};
      \vertex [below right=of i1] (w1) ;
      \vertex [below left =of w1] (i2) {$b$};
      \vertex [right      =of w1] (w2) ;

      \diagram* {
        (i1) -- [fermion] (w1) -- [fermion] (i2),
        (w1) -- [boson] (w2)
      };
      
    \end{feynman}
  \end{tikzpicture}

\end{document}

Unfortunately, the upper line for a is a bit shorter than the one for b. How can I fix this?

line for a too short

(It's the same without the labels.)

1 Answer 1

3

Reordering the vertices like so helps:

\begin{tikzpicture}
  \begin{feynman}
    \vertex (w1) ;
    \vertex [above left=of w1] (i1) {$a$};
    \vertex [below left=of w1] (i2) {$b$};
    \vertex [right     =of w1] (w2) ;

    \diagram* {
      (i1) -- [fermion] (w1) -- [fermion] (i2),
      (w1) -- [boson] (w2)
    };
    
  \end{feynman}
\end{tikzpicture}

edge lengths match

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .