1

I am trying to create a simple fermion that has both a blob and horizontally aligned paths. However, I cannot get my diagram to work with both.

  1. With \feynmandiagram, I can create a blob, but not a horizontal outgoing fermion:

    \documentclass[12pt]{article}
    
    \usepackage{amsfonts,amsmath,amssymb,amscd,amstext,mathabx,latexsym}
    \usepackage{textcomp,multicol,enumitem}
    \usepackage{tikz,tikz-feynman,contour}
    
    \begin{document}
    
    \tikzfeynmanset{
    every fermion={black},
    every photon={blue},
    every blob={/tikz/fill=blue!30,/tikz/inner sep=2pt},
    }
    
    \begin{tikzpicture}
      \begin{feynman}[every blob={/tikz/fill=blue!30,/tikz/inner sep=2pt}]
        \feynmandiagram [horizontal=a to b] {
          a -- [fermion] b [blob] -- [fermion] c};
      \end{feynman}
    \end{tikzpicture}
    
    \end{document}
    

    Compiled with LuaLaTeX, this gives me the following:

    blob OK but out-fermion NOT horizontal

  2. When I place the vertices horizontally, the blob does not appear:

    \documentclass[12pt]{article}
    
    \usepackage{amsfonts,amsmath,amssymb,amscd,amstext,mathabx,latexsym}
    \usepackage{textcomp,multicol,enumitem}
    \usepackage{tikz,tikz-feynman,contour}
    
    \begin{document}
    
    \tikzfeynmanset{
    every fermion={black},
    every photon={blue},
    every blob={/tikz/fill=blue!30,/tikz/inner sep=2pt},
    }
    
    \begin{tikzpicture}
    \begin{feynman}
    \vertex (a1) {\(e\)}; 
    \vertex[right=1.2cm of a1,blob] (a2) ;
    \vertex[right=1.2cm of a2] (a3) {\(e\)};
    
    \diagram* {
    (a1) -- [fermion] (a2) [blob] -- [fermion] (a3), };
    \end{feynman}
    \end{tikzpicture}
    
    \end{document}
    

    Compiled with LuaLaTeX, this gives me the following:

    out-fermion horizontal OK but NO blob

I don't understand where is the problem, I checked every step of the instructions given in J. Ellis' tutorial 2016.

Any idea of what might go wrong on my PC or LaTeX file?

1 Answer 1

2

Using the option layered layout allows you to set multiple vertices on the same horizontal alignment.

A Feynman diagram with two electrons separated by a blue blob.

It may be worth noting, you don't need to load tikz because tikz-feynman already does so for you. It's also generally best not to load a \feynmandiagram inside a \begin{feynman}...\end{feynman}, because that can lead to some strange spacing behavior as noted in a previous question.

\documentclass{article}

\usepackage{tikz-feynman}

\begin{document}

\tikzfeynmanset{
  every fermion={black},
  every photon={blue},
  every blob={/tikz/fill=blue!30,/tikz/inner sep=2pt},
}

\begin{tikzpicture}
  \begin{feynman}
    \diagram [horizontal=a to b,layered layout] {
      a[particle=$e$] -- [fermion] b [blob] -- [fermion] c[particle=$e$]
    };
  \end{feynman}
\end{tikzpicture}

\end{document}
1
  • Wonderful, it works! Even adding a photon. Thank you really a lot! Sep 6 at 22:13

You must log in to answer this question.

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