![XY画像内の矢印の開始位置を変更する](https://rvso.com/image/399815/XY%E7%94%BB%E5%83%8F%E5%86%85%E3%81%AE%E7%9F%A2%E5%8D%B0%E3%81%AE%E9%96%8B%E5%A7%8B%E4%BD%8D%E7%BD%AE%E3%82%92%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B.png)
答え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)$);