3

Consider the following code written using the tikz-feynman package:

\RequirePackage{luatex85}
\documentclass{standalone}
\usepackage[compat=1.0.0]{tikz-feynman}
\begin{document}
    \feynmandiagram [horizontal=a to b] {
        a -- b [dot] -- [out=135, in=45, loop, min distance=3cm] b -- c,
    };
\end{document}

This draws the following Feynman diagram:

enter image description here

I would like to make the line completely horizontal and turn the loop from an oval into a sphere?

How do you do this?

3
  • 1
    Hello, you should provide a minimal working example (MWE) for us to be able to help you
    – Moriambar
    Commented Apr 8, 2017 at 20:43
  • 1
    I can't reproduce your solution. With testing\documentclass{standalone} \usepackage[compat=1.0.0]{tikz-feynman} \begin{document} ...[your code here] \end{document} -> the line will be horizontal. So you have to add a MWE.
    – Bobyandbob
    Commented Apr 8, 2017 at 20:58
  • Edited question to reflect your comment Commented Apr 8, 2017 at 23:44

1 Answer 1

3

The issue here is that the algorithm that TikZ-Feynman (CTAN) uses in order to place the vertices doesn't work well if it only has a straight line because the difference in the optimization between a mostly-straight and a fully-straight line are quite small.

This can be easily fixed by using an alternative layout algorithm, such as the layered layout in this case:

%% luatex85 is only necesary to fix a bug in standalone
\RequirePackage{luatex85}
\documentclass{standalone}

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

\begin{document}
\feynmandiagram [horizontal=a to b, layered layout] {
  a -- b [dot] -- [out=135, in=45, loop, min distance=3cm] b -- c,
};
\end{document}

output

You must log in to answer this question.

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