我试图在xypic
图表中得到一个循环箭头,但就是做不到。目前,我有以下内容:
\[\xymatrix{
p^{-1}(U_{\alpha})\ar[rr]^-{\tau_{\alpha}} & & U_{\alpha}\times\mathbb R^k\ar[dl]^{pr_1} \\
& U_{\alpha}\ar[ul]^-{s|_{U_{\alpha}}} \ar`ul/20pt[ur]`/10pt[0,0]`/10pt[l]^{id}`/10pt[ul]
}.\]
如您所见,箭头的最后部分没有指向其起点。我的目标是让箭头的尖端非常接近箭头的尖端\ar[dl]^{pr_1}
。我的问题是我无法将起点称为目标,因为它[0,0]
会成为弯曲中心并且"2,2"
不会被解释。我查看了软件包的文档,但什么也没找到。我该怎么做?
答案1
如果你愿意切换到tikz-cd这变得容易。
% arara: pdflatex
\documentclass{article}
\usepackage{mathtools}
\usepackage{amsfonts}
\DeclareMathOperator\id{id}
\DeclareMathOperator\pr{pr}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}
p^{-1}(U_{\alpha})\ar{rr}{\tau_{\alpha}} && U_{\alpha}\times\mathbb{R}^k\ar{dl}{\pr_1}\\
& U_{\mathrlap\alpha}\ar{ul}{s|_{U_{\alpha}}}\ar[loop above]{}{\id} &
\end{tikzcd}
\]
\end{document}
为了操纵箭头的目标,您可能需要尝试一下下面箭头中的选项。
\begin{tikzcd}
p^{-1}(U_{\alpha})\ar{rr}{\tau_{\alpha}} && U_{\alpha}\times\mathbb{R}^k\ar{dl}{\pr_1}\\
& U_{\mathrlap\alpha}\ar{ul}{s|_{U_{\alpha}}}\ar[%
,loop % tells tikz-cd to do a loop
,out=123 % start at angle 123°
,in=57 % stop at angle 57°
,distance=2.5em % biggest distance of arrow to node. You can use pt or cm as well.
]{}{\id} &
\end{tikzcd}
我刚刚检查了语法xy
,默认结果看起来也相当不错。这是否足够接近右箭头?
% arara: pdflatex
\documentclass{article}
\usepackage{mathtools}
\usepackage{amsfonts}
\DeclareMathOperator\id{id}
\DeclareMathOperator\pr{pr}
\usepackage[all,cmtip]{xy}
\begin{document}
\[
\xymatrix{%
p^{-1}(U_{\alpha})\ar[rr]^-{\tau_{\alpha}} & & U_{\alpha}\times\mathbb{R}^k\ar[dl]^{\pr_1} \\
& U_{\alpha}\ar[ul]^-{s|_{U_{\alpha}}} \ar@(ul,ur)^{\id} % smashing the alpha here would result in touching arrow heads. That's why I didn't do that here
}. % supposing, this dot was set here by purpose...
\]
\end{document}