答案1
绘制箭头的方法有很多种。例如直接使用\pdfliteral
图元:
x%
\leavevmode\hbox to6pt{%
\pdfliteral{q 1 J .35 0 0 .35 -2 -2 cm
10 0 m 20 10 20 20 10 30 c S 10 30 m 13 20 l 19 24 l h B Q}\hss}
\bye
答案2
试试这个代码:
\documentclass[tikz]{standalone}
\def\centerarc[#1](#2)(#3:#4:#5);%
% #1 : options for drawing
% #2 : center of arc
% #3 : start angle for arc
% #4 : end angle for arc
% #5 : radius of arc
{
\draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
\begin{document}
\begin{tikzpicture}
\draw[gray!20] (0,0) grid (3,3);% comment if not needed
\draw (1,1)--(2,2);% comment if not needed
\draw (1,2)--(2,1);% comment if not needed
\centerarc[cyan,line width=1pt,-latex](1,1.5)(-26.565:26.565:1.118cm);
\end{tikzpicture}
\end{document}
输出:
这张图片中的代码有更多帮助:
编辑:其他例子。代码:
\documentclass[tikz]{standalone}
\def\centerarc[#1](#2)(#3:#4:#5);%
% #1 : options for drawing
% #2 : center of arc
% #3 : start angle for arc
% #4 : end angle for arc
% #5 : radius of arc
{
\draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
}
\begin{document}
\begin{tikzpicture}
\draw[gray!20] (0,0) grid (3,3);% comment if not needed
%\draw (1,1)--(2,2);% comment if not needed
%\draw (1,2)--(2,1);% comment if not needed
\filldraw[cyan] (1,1.5) circle(1pt);
\draw[cyan,dotted] (2,2)--(1,1.5)--(2,1);
\centerarc[cyan,line width=1pt,-latex](1,1.5)(-26.565:26.565:1.118cm);
\filldraw[magenta] (0,1) circle(1pt);
\draw[magenta,dotted] (1,0)--(0,1)--(1,2);
\centerarc[magenta,line width=1pt,-latex](0,1)(-45:45:1.412);
\filldraw[green] (1,0) circle(1pt);
\draw[green,dotted] (3,1)--(1,0)--(0,2);
\centerarc[green,line width=1pt,-latex](1,0)(26.565:116.565:2.236);
\end{tikzpicture}
\end{document}
输出: