JP-Ellis / tikz-feynman

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

Blob not appearing at vertex #24

Open Isanderson opened 8 years ago

Isanderson commented 8 years ago

I am trying to generate a mu \to e \gamma diagram with an effective operator at the vertex. My current code for the diagram is

\begin{feynman}
  \vertex (a1) {\(\mu\)};
  \vertex[right=1.5cm of a1, blob] (a2);
  \vertex[right=1.5cm of a2] (a3) {\(e\)};
  \vertex[above=1cm of a3] (p){\(\gamma \)};

  \diagram* {
    (a1) -- [fermion, momentum' = \( p \)] (a2) -- [fermion, momentum' = \(p-q\)] (a3),
    (a2) -- [photon, momentum = \(q\)] (p)
  };
\end{feynman}

However it does not generate the blob (it generates the rest of the diagram just fine).

I cannot figure out why not - any ideas?

JP-Ellis commented 8 years ago

This seems to be a bug in the way styles are handled when created through the \vertex command which will need to be fixed.

In the mean time, you can use:

\begin{feynman}
  \vertex (a1) {\(\mu\)};
  \node[right=1.5cm of a1, blob] (a2) {};
  \vertex[right=1.5cm of a2] (a3) {\(e\)};
  \vertex[above=1cm of a3] (p){\(\gamma \)};

  \diagram* {
    (a1) -- [fermion, momentum' = \( p \)] (a2) -- [fermion, momentum' = \(p-q\)] (a3),
    (a2) -- [photon, momentum = \(q\)] (p)
  };
\end{feynman}

which should produce what you want.

Isanderson commented 8 years ago

The temporary solution works just fine, thanks!

losmaxos commented 6 years ago

Hi, I think this is due to the way TikZ handles node drawing. Nodes are only drawn if they have a name argument. If you include an empty nsame argument after the blob vertex, it will be drawn just fine:

\vertex[right=1.5cm of a1, blob] (a2) {};

Hope this helps, greetings to the maintainer of Tikz-Feynman!