tikz-feynman icon indicating copy to clipboard operation
tikz-feynman copied to clipboard

blob not centered as it should

Open zhyiyu opened this issue 6 years ago • 2 comments

Hi, I was drawing a blob at a vertex, but it is not centered

\begin{feynman}

\vertex (a1);
\vertex[right = 3 cm of a1] (a2);
\vertex[above = 4 cm of a1] (a3);
\vertex[above right = 4 cm and 3 cm of a1] (a4);
\vertex[above right = 2 cm and 1.5 cm of a1, blob] (b) {};

\diagram*{
(a1) -- [fermion, edge label = \scriptsize{$p$}] (b),
(a2) -- [fermion, edge label' = \scriptsize{$p'$}] (b),
(b) -- [fermion, edge label' = \scriptsize{$k$}] (a3),
(b) -- [fermion, edge label = \scriptsize{$k'$}] (a4),

};
\end{feynman}

The blob is apparently not centered, which makes the whole diagram looks weird.

zhyiyu avatar Oct 20 '18 21:10 zhyiyu

I don't know if you're there yet, but I found a workaround Adding anchor=center to the vertex options after blob does the trick.

jmarucha avatar Feb 22 '22 15:02 jmarucha

Thank you! I also figured out not long ago that if I set explicitly the coordinate for the very first vertex, then everything is fine:

\begin{feynman}

\vertex (a1) at (0.0, 0.0) {}; %% The first vertex has to have explicit coordinate!
\vertex[right = 3 cm of a1] (a2);
\vertex[above = 4 cm of a1] (a3);
\vertex[above right = 4 cm and 3 cm of a1] (a4);
\vertex[above right = 2 cm and 1.5 cm of a1, blob] (b) {};

\diagram*{
(a1) -- [fermion, edge label = \scriptsize{$p$}] (b),
(a2) -- [fermion, edge label' = \scriptsize{$p'$}] (b),
(b) -- [fermion, edge label' = \scriptsize{$k$}] (a3),
(b) -- [fermion, edge label = \scriptsize{$k'$}] (a4),

};
\end{feynman}

zhyiyu avatar Mar 03 '22 08:03 zhyiyu