同构符号

同构符号

如何在两幅图之间输入同构符号?

\documentclass{article}
\usepackage{tikz}
\begin{document}

\begin{multicols}{2}
$C_5$:
\begin{center}
\begin{tikzpicture}
  [scale=.8,auto=left,every node/.style={draw,thick,circle,
  fill=mintgreen,minimum size=.88cm}]
  \node (n6) at (4,2) {$l$}[];
  \node (n4) at (2,7)  {$o$};
  \node (n5) at (1,4)  {$r$};
  \node (n1) at (6,7) {$s$};
  \node (n2) at (7,4)  {$a$};
  

  \foreach \from/\to in {n6/n5, n6/n2, n5/n4, n4/n1, n1/n2}
    \draw [thick](\from) -- (\to);

\end{tikzpicture}
\end{center}
\vfill \null
\columnbreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
$\overbar{C_5}$:
\begin{center}
\begin{tikzpicture}
  [scale=.8,auto=left,every node/.style={draw,thick,circle,
  fill=mintgreen,minimum size=.88cm}]
  \node (n6) at (4,2) {$l$}[];
  \node (n4) at (2,7)  {$o$};
  \node (n5) at (1,4)  {$r$};
  \node (n1) at (6,7) {$s$};
  \node (n2) at (7,4)  {$a$};
  

  \foreach \from/\to in {n6/n4, n6/n1, n5/n1, n5/n2,n4/n2}
    \draw [thick,royalazure](\from) -- (\to);

\end{tikzpicture}

\end{center}
\vfill \null
\end{multicols}
\end{document}

在此处输入图片描述

答案1

在我看来,更好的方法是在同一个tikzpicture环境中绘制两个图形,然后您可以将符号放在所需位置的附加节点中。如下所示(我稍微修改了您的代码):

\documentclass[border=2mm]{standalone}
\usepackage    {tikz}
\usetikzlibrary{calc}

\tikzset%
{%
  mynode/.style={draw,thick,circle,fill=green,minimum size=0.8cm}
}

\begin{document}
\begin{tikzpicture}
\node at (-2,3)  { $C_5:$};
\node at (3.5,0) {\huge $\cong$};
\node at (5,3)   {$\bar C_5:$};
\foreach\i/\j in {1/s, 2/o, 3/r, 4/l, 5/a}
{%
  \node[mynode] (n\i) at         (72*\i-18:2)   {\itshape\j};
  \node[mynode] (m\i) at ($(7,0)+(72*\i-18:2)$) {\itshape\j};
}
\foreach\i in {1,...,5}
{%
  \pgfmathtruncatemacro\nn{Mod(\i,5)+1}
  \pgfmathtruncatemacro\mm{Mod(\i+1,5)+1}
  \draw[thick,blue] (n\i) -- (n\nn);
  \draw[thick,blue] (m\i) -- (m\mm);
}
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容