在 TQFT 图表上添加文本

在 TQFT 图表上添加文本

我想在用该tqft包创建的共边图上添加文本。不幸的是,我对 TikZ 了解不多,所以我一直在反复试验,但这最终让我束手无策。理想情况下,我希望得到如下图所示的效果:

在此处输入图片描述

我能够使用以下代码生成图表,但我尝试使用该pic text选项,但没有任何结果。此外,我想注释边界,因此如果您也能提供一个例子,我将不胜感激。谢谢!

    \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

您可以使用组件的锚点来定位\node具有所需标签的组件:

在此处输入图片描述

代码:

\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}

相关内容