答案1
可能的解决方案是tikz-cd
:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}
N_0\oplus G_1
& N_1\oplus G_2
\arrow[l, bend right=60, "u", swap, start anchor={[xshift=-10pt]north east}, end anchor={[xshift=-10pt]north east}]\\
\end{tikzcd}
\]
\end{document}
xymatrix
如果你想要一个像添加的箭头提示
\tikzcdset{arrow style=tikz, diagrams={>={Straight Barb[length=5pt,width=5pt]}}}
在你的序言中,之后\usepackage{tikz-cd}
,你会得到:
答案2
您可以使用tikz
包。请考虑以下代码:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\tikzstyle{every picture}+=[remember picture]
\begin{document}
\begin{equation}
N_0\oplus \tikz[baseline]{\node[fill=blue!20,circle,inner sep=1pt,anchor=base] (t1){$G_1$}} \quad
N_1\oplus \tikz[baseline]{\node[fill=red!20,circle,inner sep=1pt,anchor=base] (t2){$G_1$}}
\end{equation}
\begin{tikzpicture}[overlay]
\draw[-latex](t2.90)to[in=60,out=120]node[midway,above]{$u$}(t1);
\end{tikzpicture}
\end{document}
这是输出:
笔记:您可以轻松更改或删除节点颜色。
\begin{equation}
N_0\oplus \tikz[baseline]{\node[fill=none,draw=none,inner sep=1pt,anchor=base] (t1){$G_1$}} \quad
N_1\oplus \tikz[baseline]{\node[fill=none,draw=none,inner sep=1pt,anchor=base] (t2){$G_1$}}
\end{equation}
您还可以通过更改代码中的以下行来更改箭头的输出和输入角度和位置:
\draw[-latex]($(t2)+(-1mm,2mm)$)to[in=60,out=120]node[midway,above]{$u$}($(t1)+(-1mm,2mm)$);