我试图写一个箭头指向一个角度来指定它的大小。但是当我编译它时,我只得到一个直箭头。(请参阅最后一条\draw
语句以了解有问题的代码行。)
\documentclass[border=6pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{intersections}
\usepackage{tkz-euclide}
\usetkzobj{all}
\newcommand\degrees[1]{$#1^\circ$}
\begin{document}
\def\aes{in*0.54}%%
\def\aeang{70}%%
\def\aerise{2.15}%%
\def\aerun{4}
\begin{tikzpicture}[>={Stealth[scale=2]}]
\coordinate (A) at (0,0);
\coordinate (B) at ($(A)+(3\aes,0)$);
\coordinate (C) at ($(B)+(-90:2\aes)$);
\coordinate (ttD) at ($(C)+(180:1\aes)$);
\coordinate (tD) at ($(A)+(-63:1\aes)$);
\tkzInterLL(A,tD)(C,ttD)
\tkzGetPoint{D}
\draw (A) -- (B) -- (C) -- (D) -- cycle;
\draw (B) -- (D);
\draw[arrows=->] (A) -- ($(A)!0.5!(B)$);
\draw[arrows=->] (D) -- ($(D)!0.5!(C)$);
\tkzMarkRightAngle(B,C,D)
\tkzLabelAngle[pos=-0.5,anchor=east,xshift=3pt](A,B,D){$4x$}
\tkzLabelAngle[pos=0.65](B,D,A){\degrees{65}}
\tkzLabelAngle[pos=0.8](C,D,B){\degrees{52}}
\begin{pgfinterruptboundingbox}
\tkzDefLine[bisector](D,B,C)
\end{pgfinterruptboundingbox}
\tkzGetPoint{tE}
\coordinate (E) at ($(B)!8pt!(tE)$);
\coordinate (lE) at ($(E)+(-40:0.5\aes)$);
\node[anchor=west] (nlE) at (lE) {$(3y+5)$};
\draw[arrows=-{>[scale=0.85]},out=180,in=-90] (nlE.west) -- (E);
\end{tikzpicture}
\end{document}
答案1
--
总是笔直的。你需要一些其他的东西来表示曲线。我认为你正在寻找的是一条弯曲的to
路径:
\draw[arrows=-{>[scale=0.85]}] (nlE.west) [out=180,in=-90] to (E);
完整代码:
\documentclass[border=6pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{intersections}
\usepackage{tkz-euclide}
\usetkzobj{all}
\newcommand\degrees[1]{$#1^\circ$}
\begin{document}
\def\aes{in*0.54}%%
\def\aeang{70}%%
\def\aerise{2.15}%%
\def\aerun{4}
\begin{tikzpicture}[>={Stealth[scale=2]}]
\coordinate (A) at (0,0);
\coordinate (B) at ($(A)+(3\aes,0)$);
\coordinate (C) at ($(B)+(-90:2\aes)$);
\coordinate (ttD) at ($(C)+(180:1\aes)$);
\coordinate (tD) at ($(A)+(-63:1\aes)$);
\tkzInterLL(A,tD)(C,ttD)
\tkzGetPoint{D}
\draw (A) -- (B) -- (C) -- (D) -- cycle;
\draw (B) -- (D);
\draw[arrows=->] (A) -- ($(A)!0.5!(B)$);
\draw[arrows=->] (D) -- ($(D)!0.5!(C)$);
\tkzMarkRightAngle(B,C,D)
\tkzLabelAngle[pos=-0.5,anchor=east,xshift=3pt](A,B,D){$4x$}
\tkzLabelAngle[pos=0.65](B,D,A){\degrees{65}}
\tkzLabelAngle[pos=0.8](C,D,B){\degrees{52}}
\begin{pgfinterruptboundingbox}
\tkzDefLine[bisector](D,B,C)
\end{pgfinterruptboundingbox}
\tkzGetPoint{tE}
\coordinate (E) at ($(B)!8pt!(tE)$);
\coordinate (lE) at ($(E)+(-40:0.5\aes)$);
\node[anchor=west] (nlE) at (lE) {$(3y+5)$};
\draw[arrows=-{>[scale=0.85]}] (nlE.west) [out=180,in=-90] to (E);
\end{tikzpicture}
\end{document}