# Draw OPE diagram

How to draw a textbook operator product expansion diagram like this?

In another word, how to make lines to have some kind of angle between each other and how to separate two points only a little bit?

The author suggested that I should assign the position of those points explicitly but is there someway I can do it within \feynmandiagram?

• Welcome to TeX.SX! Please post a minimal, but compilable code example (MWE) to help us help you. – TeXnician Oct 23 '17 at 8:17

As I alluded to in the Github issue, the first and last diagrams won't really be (easily) feasible using just the \feynmandiagram command. Having said that, the more verbose syntax is still quite simple:

\RequirePackage{luatex85}
\documentclass[tikz, border=10pt]{standalone}

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

\begin{document}
\begin{tikzpicture}
\begin{feynman}
\vertex (p1);
\vertex [above right=of p1] (x) {$$x$$};
\vertex [right=0.5cm of x] (0) {$$0$$};
\vertex [below right=of 0] (p2);

\diagram* {
(p1) -- [momentum=$$p_{1}$$, fermion] (x);
(p2) -- [momentum'=$$p_{2}$$, fermion] (0);
};
\end{feynman}
\end{tikzpicture}
\begin{tikzpicture}
\begin{feynman}
\vertex (p1);
\vertex [above=of p1] (0) {$$0$$};
\vertex [right=of p1] (p2);
\vertex [right=of 0] (x) {$$x$$};

\diagram* {
(p1) -- [momentum={[arrow shorten=0.3]$$p_{1}$$}, fermion] (x);
(p2) -- [momentum'={[arrow shorten=0.3]$$p_{2}$$}, fermion] (0);
};
\end{feynman}
\end{tikzpicture}
\begin{tikzpicture}
\begin{feynman}
\vertex (p1);
\vertex [above right=of p1] (dot);
\vertex [below right=of dot] (p2);

\diagram* {
(p1) -- [momentum=$$p_{1}$$, fermion] (dot);
(p2) -- [momentum'=$$p_{2}$$, fermion] (dot);
};
\end{feynman}
\end{tikzpicture}
\end{document}


which produces the following outputs:

The main thing I'm not sure of right now (and others are free to edit this answer if they know), is if there's a nice and easy way of making the little loop in the second diagram. I suspect a similar question has been asked before, so if you forage through this site you might find exactly what you need.

• Can I ask another question? I put your code into align* but then I can't get through compiling. If I use  everything is fine, if I don't use math environment at all, everything is fine, if inside feynman I use diagram first instead of assigning vertex, everything is fine, so what could be the problem? – Turgon Nov 3 '17 at 4:51
• Most likely, it is because the align* environment has issues with empty lines (such as just before \diagram*). You can either remove them, or put a % in the line so that LaTeX doesn't see the empty line (so that you can have slightly neater code). – JP-Ellis Nov 3 '17 at 5:16
• OK, that solved my problem, txs. And really sorry keeping troubling you with these trivial questions. – Turgon Nov 3 '17 at 5:57