# Tikz Feynman error in irreducible diagrams

I am trying to create some feynman diagrams with tikz. My problem is, that I want to create some simple diagrams like vacuum diagrams in φ^4 theory, which are reducible though, so I don't know where to put the vertices and the nodes. For the simplest two point function of free scalar field diagram for example I use this code:

\feynmandiagram [horizontal=a to b,horizontal=c to d] {
a[particle=$x_1$] -- b[particle=$x_2$],
c[particle=$x_3$] -- d[particle=$x_4$],
};+\feynmandiagram [vertical=a to b,vertical=c to d] {
a[particle=$x_1$] -- b[particle=$x_2$],
c[particle=$x_3$] -- d[particle=$x_4$],
};


which just gives

which apparently isn't what i want,the desired diagram is :

I think the problem lies on the horizontal command which I don't know if stands for more than one variable, I just don't know how to fix it.

• Welcome to TeX.SX! The second image is missing. Aug 8, 2017 at 15:16
• Having not seen the second image: Try compiling with lualatex instead of pdflatex/xelatex. The tikz-feynman package makes use of Lua for positioning stuff, so you won't always get the best results with pdflatex Aug 8, 2017 at 15:48
• Please extend your code to a minimal working example (MWE). Aug 8, 2017 at 15:56
• I editted so you can see the second picture. I have tried lualatex which merely saves the day, since the visuals get better but i still cant get two parallel lines vertically and two parallel lines horizontally as i wish. Meanwhile when i compile whiti lualatex ,my whole text dissaperas, i guess because its in greek which doesnt help Aug 8, 2017 at 19:06

TikZ-Feynman (CTAN) can only use on horizontal directive, and in addition doesn't really know how to handle disconnected diagrams.

The solution in your case is actually pretty simple: just connect the diagrams so that the algorithm can handle everything nicely, but then use draw=none so that the lines aren't actually drawn.

Here's an example for your first one:

\RequirePackage{luatex85}
\documentclass[tikz, border=1em]{standalone}

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

\begin{document}
\feynmandiagram [horizontal=a to b] {
a [particle=$x_1$] -- b [particle=$x_2$],
c [particle=$x_3$] -- d [particle=$x_4$],
{[edges={draw=none}]
a -- c, b -- d,
},
};
\end{document}


If you want to fine tune the placement of the lines and their separation, it might be easier to then specify the placement of vertices as shown in the TikZ-Feynman manual.