1

How do I shorten the external legs and make the blob bigger in the following code using the tikz-feynman package?

\begin{center}
\begin{tikzpicture}
    \begin{feynman}
        \vertex[blob] (m) at ( 0, 0) {\contour{white}{}};
        \vertex (a) at (-2,-2);
        \vertex (b) at ( 2,-2);
        \vertex (c) at (-2, 2);
        \vertex (d) at ( 2, 2);
        \diagram* {
            (a) -- [photon] (m) -- [photon] (c),
            (b) -- [photon] (m) -- [photon] (d),
        };
    \end{feynman}
\end{tikzpicture}
\end{center}

1

You are specifying the location of vertices manually, so you just need to adjust the coordinates of the vertices to shrink the lines. Alternatively, you can use node distance to change the default separation between nodes if you are using the automatic placement:

\documentclass[tikz]{standalone}

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

\begin{document}
\begin{tikzpicture}
  \def\leglength{1}
  \begin{feynman}
    \vertex[blob] (m) at (0, 0) {};
    \vertex (a) at (-\leglength,-\leglength);
    \vertex (b) at ( \leglength,-\leglength);
    \vertex (c) at (-\leglength, \leglength);
    \vertex (d) at ( \leglength, \leglength);
    \diagram* {
      (a) -- [photon] (m) -- [photon] (c),
      (b) -- [photon] (m) -- [photon] (d),
    };
  \end{feynman}
\end{tikzpicture}

\feynmandiagram [horizontal=a to b, node distance=1.5cm] {
  a -- [photon] o [blob] -- [photon] b,
  c -- [photon] o        -- [photon] d,
};
\end{document}

output 1

output 2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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