4

I have the following source for a tikz-feynman diagram:

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

\begin{document}

\begin{tikzpicture}
  \begin{feynman}
    \vertex [dot] (o1);
    \vertex [right=of o1,dot] (i1);
    \vertex [above right=of i1] (it);
    \vertex [above=of it,crossed dot] (ot);
    \vertex [below right=of it,dot] (i2);
    \vertex [below left=of i2] (ib);
    \vertex [below=of ib] (ob);
    \vertex [right=of i2,dot] (o2);

    \diagram* {
      (o1) -- [gluon] (i1),
      (i2) -- [gluon] (o2),
      (o1) -- [fermion, quarter left] (ot),
      (ot) -- [fermion, quarter left] (o2),
      (o2) -- [fermion, quarter left] (ob),
      (ob) -- [fermion, quarter left] (o1),
      (i1) -- [fermion, quarter left] (it),
      (it) -- [fermion, quarter left] (i2),
      (i2) -- [fermion, quarter left] (ib),
      (ib) -- [fermion, quarter left] (i1),
    };
  \end{feynman}
\end{tikzpicture}

\end{document}

Which produces the following output: Basic example of "closing the loop"

It is not clear to me why the vertex styles dot and crossed dot are not being displayed.

In general I would be happy with any style that suitably conveys that the loops are cut propagators, although this goes beyond the scope of the question.

  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – BambOo Sep 12 '18 at 10:55
  • Poor form on my part, have updated! – Charmander35 Sep 12 '18 at 11:18
  • This is really strange. Perhaps it has to do with the \pgfextra in \def\tikzfeynman@commands@vertex{ \path \pgfextra{\tikzfeynmanallowemptynodetrue} \pgfextra{\tikzfeynmanvertextrue} node} in /tikzlibraryfeynman.code.tex. One option would be to just draw the vertices with a \foreach loop by hand. – marmot Sep 12 '18 at 13:22
3

Welcome to TeX.SE! I really do not know what is going on here. All I can offer is a workaround that is based on a syntax that should be equivalent to what you are doing, but apparently is not.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage[compat=1.1.0]{tikz-feynman}

\begin{document}
\begin{tikzpicture}
  \begin{feynman}[every dot={/tikz/draw=black}]
    \path (0,0) node[vertex,dot] (o1) 
     node[vertex,right=of o1,dot] (i1)
    node[vertex,above right=of i1] (it)
    node[vertex,above=of it,crossed dot] (ot)
    node[vertex,below right=of it,dot] (i2)
    node[vertex,below left=of i2] (ib)
    node[vertex,below=of ib] (ob)
    node[vertex,right=of i2,dot] (o2);

    \diagram {
      (o1) -- [gluon] (i1),
      (i2) -- [gluon] (o2),
      (o1) -- [fermion, quarter left] (ot),
      (ot) -- [fermion, quarter left] (o2),
      (o2) -- [fermion, quarter left] (ob),
      (ob) -- [fermion, quarter left] (o1),
      (i1) -- [fermion, quarter left] (it),
      (it) -- [fermion, quarter left] (i2),
      (i2) -- [fermion, quarter left] (ib),
      (ib) -- [fermion, quarter left] (i1),
    };
  \end{feynman}
\end{tikzpicture}
\end{document}

enter image description here

One possible, though unlikely, explanation is that this is triggered by the \pgfextra in \def\tikzfeynman@commands@vertex{ \path \pgfextra{\tikzfeynmanallowemptynodetrue} \pgfextra{\tikzfeynmanvertextrue} node} in /tikzlibraryfeynman.code.tex. The pgfmanual says on p. 162 that

This effect can be achieved using the following path operation \pgfextra. Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths.

Quite possible that this is not the reason, but anyway I would like to argue that one should try to avoid pfgextra. It is not needed here either. One could simply define a pgfkey vertextrue/.code={\tikzfeynmanallowemptynodetrue\tikzfeynmanvertextrue} and then do \path [vertextrue] node.

  • Thanks! I would not know more than you as to whether your suggestion is the reason for the difference between our outputs however it is always interesting to know a little more about what goes on under the hood so it is appreciated. – Charmander35 Sep 12 '18 at 16:39
  • @Charmander35 Thanks! I did a little more testing and it seems that this is not the reason, at least when I replace \pgfextra by the safer (?) syntax the issue is still there. tikz-feynman is overall a great package but there are a few things that could be improved. (I am still curious what an anti Majorana fermion is supposed to be. ;-) – marmot Sep 12 '18 at 16:43

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.