我想创建一个函数变体表,并使用像这样的箭头。有没有办法引入箭头?
答案1
我没见过这样的箭头(而且无法通过解纤tikz
),因此创建它们的方法如下:
根据实际应用,可能有更好的方法来绘制这些。
代码:
\documentclass{article}
\usepackage{tikz}
\newcommand{\ArcDistance}{0.2cm}%
\newcommand{\BaseDist}{0.15cm}%
\newcommand{\RightUp}[1][]{\tikz[thick, baseline]
\draw [>->,#1]
(0,0) -- ++(\BaseDist,0) to[out=0,in=-90] ++(\ArcDistance,\ArcDistance) -- ++(0,\BaseDist);%
}%
\newcommand{\UpRight}[1][]{\tikz[thick, baseline]
\draw [>->,#1]
(0,0) -- ++(0,\BaseDist) to[out=90,in=180] ++(\ArcDistance,\ArcDistance) -- ++(\BaseDist,0);%
}%
\newcommand{\DownRight}[1][]{\tikz[thick, baseline]
\draw [>->,#1]
(0,\ArcDistance+\BaseDist) -- ++(0,-\BaseDist) to[out=-90,in=180] ++(\ArcDistance,-\ArcDistance) -- ++(\BaseDist,0);%
}%
\newcommand{\RightDown}[1][]{\tikz[thick, baseline]
\draw [>->,#1]
(0,\ArcDistance+\BaseDist) -- ++(\BaseDist,0) to[out=0,in=90] ++(\ArcDistance,-\ArcDistance) -- ++(0,-\BaseDist);%
}%
\begin{document}
\RightUp \quad \UpRight[red] \quad \DownRight[blue] \quad \RightDown[orange]
\end{document}
答案2
解决方案如下xy
:
% arara: pdflatex
\documentclass{article}
\usepackage[all,cmtip]{xy}
\begin{document}
\fbox{\begin{xy} (-1,-1)="a",(2,2)="b" \ar@{>->}@/_3px/ "a";"b" \end{xy}}
\fbox{\begin{xy} (-1,-1)="a",(2,2)="b" \ar@{>->}@/^3px/ "a";"b" \end{xy}}
\fbox{\begin{xy} (-1,2)="a",(2,-1)="b" \ar@{>->}@/_3px/ "a";"b" \end{xy}}
\fbox{\begin{xy} (-1,2)="a",(2,-1)="b" \ar@{>->}@/^3px/ "a";"b" \end{xy}}
\end{document}