Here's an example (stolen shamelessly from the tkz-euclide
manual):
\documentclass{article}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetikzlibrary{calc}
\usetkzobj{all}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[scale=2]
\tkzDefPoint(0,0){O}
\tkzDefPoint(2,-1){A}
\tkzDefPoint(2,2){B}
\tkzDefPointsBy[symmetry=center O](B,A){}
\tkzDrawLine(A,A')
\tkzDrawLine(B,B')
\tkzMarkAngle[mark=s,arc=l,size=2 cm,mkcolor=red,line width=2pt,arrows=->](A,O,B)
\end{tikzpicture}
\end{document}
![enter image description here](https://i.stack.imgur.com/FPWLT.png)
But you can also use decorations as here:
\documentclass{article}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetikzlibrary{calc}
\usetkzobj{all}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[scale=2,my arrow/.style={decorate,decoration={markings,mark=at position 1 with {\arrow[scale=4]{>}};}}]
\tkzDefPoint(0,0){O}
\tkzDefPoint(2,-1){A}
\tkzDefPoint(2,2){B}
\tkzDefPointsBy[symmetry=center O](B,A){}
\tkzDrawLine(A,A')
\tkzDrawLine(B,B')
\tkzDrawArc[postaction={my arrow}](O,A)(B)
\end{tikzpicture}
\end{document}
To get
![enter image description here](https://i.stack.imgur.com/NYGPD.png)
UPDATE
It seems that mark=at position 1 with ...
doesn't always work when TikZ thinks that 1
is past the end of the path. So, you can modify this by using
mark=at position -0.1pt with ...
The negative distance tells TikZ to place the decoration at the end of the path. I'd recommend a negligible distance. Also, if you've loaded the TikZ library calc
, you can write something like
\coordinate (tOA) at ($(O)!2cm!(A)$);
\tkzDrawArc[postaction={my arrow}](O,tOA)(B)
to control how far from the angle vertex the arc is placed.
You can do it with \tkzLabelSegment
.
I took the liberty to adjust also the bc
label:
\documentclass[11pt,a4paper]{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzInit[xmin=-2,xmax=3,ymin=-2,ymax=3]
\tkzAxeXY
\tkzDefPoint[label=below:{$A$}](-1,-1){A}
\tkzDefPoint[label=right:{$B$}](3,1){B}
\tkzDefPoint[label=above:{$C$}](1,2){C}
\tkzDrawSegments(A,B B,C C,A)
\tkzDefPointBy[projection=onto A--C](B)
\tkzDefPoint(2,1.5){BC}
\tkzLabelSegment[above right=-2pt and -2pt](B,C){$bc$}
\tkzDrawSegments(A,BC)
\tkzLabelSegment[above=1pt](A,BC){$M$}
\end{tikzpicture}
\end{document}
![enter image description here](https://i.stack.imgur.com/noK1X.png)
Best Answer
Maybe it's not quite you want (you didn't tell us where the arrow must be placed), but if you replace
by
you get an arrow at the end of the segment:
Edit As said in the comments, here is a way to put the arrow in the middle of the segment. (Using the
decorations.markings
marking library.)Output: