# Putting text on TQFT diagrams

I'd like put text over cobordism diagrams created with the tqft package. Unfortunately, I don't know much about TikZ so I have been getting by with trial and error, but this has finally got me stumped. Ideally, I would like to have something like the picture below:

I am able to produce the diagram with the following code, but I have tried using the pic text option and nothing came out of it. Additionally, I would like to annotate the boundaries, so if you could provide an example of that too, I would be very grateful. Thanks!

\begin{tikzpicture}[tqft/cobordism/.style={draw},
tqft/view from=outgoing, tqft/boundary separation=30pt,
tqft/cobordism height=40pt, tqft/circle x radius=8pt,
tqft/circle y radius=3pt, tqft/every boundary component/.style={draw,rotate=90}]

\pic[tqft/cylinder,rotate=90,name=a,anchor={(1,0)}];
\pic[tqft,
incoming boundary components=0,
outgoing boundary components=2,
rotate=90,name=b,anchor={(0,0)}];
\pic[tqft,
incoming boundary components=2,
outgoing boundary components=0,
rotate=90,name=c,at=(a-outgoing boundary)];
\pic[tqft/cylinder,rotate=90,at=(b-outgoing boundary 2)];
\end{tikzpicture}

## 1 Answer

You can use tha anchors for the components to locate a \node with the desired label:

The code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tqft}

\begin{document}

\begin{tikzpicture}[tqft/cobordism/.style={draw},
tqft/view from=outgoing, tqft/boundary separation=30pt,
tqft/cobordism height=40pt, tqft/circle x radius=8pt,
tqft/circle y radius=3pt, tqft/every boundary component/.style={draw,rotate=90}]

\pic[tqft/cylinder,rotate=90,name=a,anchor={(1,0)}];
\pic[tqft,
incoming boundary components=0,
outgoing boundary components=2,
rotate=90,name=b,anchor={(0,0)}];
\pic[tqft,
incoming boundary components=2,
outgoing boundary components=0,
rotate=90,name=c,at=(a-outgoing boundary)];
\pic[tqft/cylinder,rotate=90,name=d,at=(b-outgoing boundary 2)];
\node at ([xshift=-4pt]b-between outgoing 1 and 2) {$\xi$};
\node[pin=20:$\delta_{2}$] at (c-incoming boundary 2) {};
\node[pin=-20:$\delta_{1}$] at (c-incoming boundary 1) {};
\end{tikzpicture}

\end{document}