\subsection{Mark a segment \tkzcname{tkzMarkSegment}}
\hypertarget{tms}{}  
  
 \begin{NewMacroBox}{tkzMarkSegment}{\oarg{local options}\parg{pt1,pt2}}% 
The macro allows you to place a mark on a segment.

\medskip
\begin{tabular}{lll}%
\toprule
options             & default & definition   \\
\midrule
\TOline{pos}{.5}{position of the mark} 
\TOline{color}{black}{color of the mark} 
\TOline{mark}{none}{choice of the mark} 
\TOline{size}{4pt}{size of the mark}
\bottomrule
\end{tabular}

Possible marks are those provided by \TIKZ, but other marks have been created based on an idea by Yves Combe.
\end{NewMacroBox} 

\subsubsection{Several marks }
\begin{tkzexample}[latex=5cm,small] 
\begin{tikzpicture}
  \tkzDefPoint(2,1){A}
  \tkzDefPoint(6,4){B}
  \tkzDrawSegment(A,B)
  \tkzMarkSegment[color=brown,size=2pt,pos=0.4, mark=z](A,B) 
  \tkzMarkSegment[color=blue,pos=0.2, mark=oo](A,B)
  \tkzMarkSegment[pos=0.8,mark=s,color=red](A,B) 
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Use of \tkzname{mark}}      
\begin{tkzexample}[latex=5cm,small] 
\begin{tikzpicture}
  \tkzDefPoint(2,1){A} 
  \tkzDefPoint(6,4){B}
  \tkzDrawSegment(A,B)
  \tkzMarkSegment[color=gray,pos=0.2,mark=s|](A,B)
  \tkzMarkSegment[color=gray,pos=0.4,mark=s||](A,B)
  \tkzMarkSegment[color=brown,pos=0.6,mark=||](A,B)
  \tkzMarkSegment[color=red,pos=0.8,mark=|||](A,B)
\end{tikzpicture}
\end{tkzexample}


\subsection{Marking segments \tkzcname{tkzMarkSegments}}
\hypertarget{tmss}{} 
 
\begin{NewMacroBox}{tkzMarkSegments}{\oarg{local options}\parg{pt1,pt2 pt3,pt4 ...}}%
Arguments are a list of pairs of points separated by spaces. The styles of \TIKZ\ are available for plots.
\end{NewMacroBox} 

\subsubsection{Marks for an isosceles triangle}      
\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[scale=1]
 \tkzDefPoints{0/0/O,2/2/A,4/0/B,6/2/C}
 \tkzDrawSegments(O,A A,B)
 \tkzDrawPoints(O,A,B)
 \tkzDrawLine(O,B)   
 \tkzMarkSegments[mark=||,size=6pt](O,A A,B)
\end{tikzpicture}
\end{tkzexample} 

\subsection{Another marking}   
\begin{tkzexample}[latex=5cm,small] 
 \begin{tikzpicture}[scale=1]
  \tkzDefPoint(0,0){A}\tkzDefPoint(3,2){B} 
  \tkzDefPoint(4,0){C}\tkzDefPoint(2.5,1){P}
  \tkzDrawPolygon(A,B,C)
  \tkzDefEquilateral(A,P) \tkzGetPoint{P'}
  \tkzDefPointsBy[rotation=center A angle 60](P,B){P',C'}
  \tkzDrawPolygon(A,P,P')
  \tkzDrawPolySeg(P',C',A,P,B)
  \tkzDrawSegment(C,P)
  \tkzDrawPoints(A,B,C,C',P,P')
  \tkzMarkSegments[mark=s|,size=6pt,
  color=blue](A,P P,P' P',A) 
  \tkzMarkSegments[mark=||,color=orange](B,P P',C')
  \tkzLabelPoints(A,C) \tkzLabelPoints[below](P) 
  \tkzLabelPoints[above right](P',C',B) 
\end{tikzpicture} 
\end{tkzexample}  

\subsection{Mark an arc \tkzcname{tkzMarkArc}}
\hypertarget{tms}{}  
  
 \begin{NewMacroBox}{tkzMarkArc}{\oarg{local options}\parg{pt1,pt2,pt3}}% 
The macro allows you to place a mark on an arc. pt1 is the center, pt2 and pt3 are the endpoints of the arc.

\medskip
\begin{tabular}{lll}%
\toprule
options             & default & definition   \\
\midrule
\TOline{pos}{.5}{position of the mark} 
\TOline{color}{black}{color of the mark} 
\TOline{mark}{none}{choice of the mark} 
\TOline{size}{4pt}{size of the mark}
\bottomrule
\end{tabular}

Possible marks are those provided by \TIKZ, but other marks have been created based on an idea by Yves Combe.
\begin{tkzltxexample}[]
|, ||,|||, z, s, x, o, oo 
\end{tkzltxexample}
\end{NewMacroBox} 

\subsubsection{Several marks }
\begin{tkzexample}[latex=7cm,small] 
\begin{tikzpicture}
\tkzDefPoint(0,0){O}
\pgfmathsetmacro\r{2}
\tkzDefPoint(30:\r){A}
\tkzDefPoint(85:\r){B}
\tkzDrawCircle(O,A)
\tkzMarkArc[color=red,mark=||](O,A,B)
\tkzDrawPoints(B,A,O)
\end{tikzpicture}
\end{tkzexample}

 
\subsection{Mark an angle mark : {\tkzcname{tkzMarkAngle}}}
More delicate operation because there are many options. The symbols used for marking in addition to those of \TIKZ\ are defined in the file |tkz-lib-marks.tex| and designated by the following characters:\begin{tkzltxexample}[]
|, ||,|||, z, s, x, o, oo 
\end{tkzltxexample}



%                \tkzMarkAngle(B, A, C)
%
% Angle mark
% arc (simple/double/triple) and mark of equality.
%
% By default: 
%                 arc       = simple
%                 mksize  = 1 (radius of the arc)
%                 style traits pleins
%                 mkpos ?  position: 0.5 (mark position)
%                 mark   none
%
% Parameters (optional)
%             arc     : l, ll, lll
%             mksize  : 1
%             gap     : 3pt
%             dist    : 1?
%             style   : type of lines
%             mkpos   : 0.5
%             mark    : none  , |, ||,|||, z, s, x, o, oo mais tous les 
%  % tikz symbols are allowed

\begin{NewMacroBox}{tkzMarkAngle}{\oarg{local options}\parg{A,O,B}}%
$O$ is the vertex. Attention the arguments vary according to the options. Several markings are possible. You can simply draw an arc or  add a mark on this arc. The style of the arc is chosen with the option \tkzname{arc}, the radius of the arc is given by \tkzname{mksize}, the arc can, of course, be colored.

\medskip

\begin{tabular}{lll}%
\toprule
options             & default & definition                        \\ 
\midrule
\TOline{arc}{l}{choice of l, ll and lll (single, double or triple).}
\TOline{size}{1 (cm)}{arc radius.}
\TOline{mark}{none}{choice of mark.}
\TOline{mksize}{4pt}{symbol size (mark).}
\TOline{mkcolor}{black}{symbol color (mark).}
\TOline{mkpos}{0.5}{position of the symbol on the arc.}
\end{tabular} 
\end{NewMacroBox}  

\DeleteShortVerb{\|}
\subsubsection{Example with \tkzname{mark = x} and with \tkzname{mark =||}}

\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[scale=.75]
    \tkzDefPoints{0/0/O,5/0/A,3/4/B}
    \tkzMarkAngle[size = 4,mark = x,
                  arc=ll,mkcolor = red,mkpos=.33](A,O,B)
    \tkzMarkAngle[size = 2,mark = ||,
                arc=ll,mkcolor = blue,mkpos=.66](A,O,B)
    \tkzDrawLines(O,A O,B)
    \tkzDrawPoints(O,A,B)
\end{tikzpicture}
\end{tkzexample}

\MakeShortVerb{\|}
\begin{NewMacroBox}{tkzMarkAngles}{\oarg{local options}\parg{A,O,B}\parg{A',O',B'}etc.}%
With common options, there is a macro for multiple angles.
  \end{NewMacroBox}  

\subsection{Problem to mark a small angle: {\tkzname{Option veclen}}}\label{opt-veclen}
  The problem comes from the "decorate" action and  from the value used in size in 
  \tkzcname{tkzMarkAngle}. The solution is to enclose the macro  \tkzcname{tkzMarkAngle}.
  In the next example without the "scope" the result is :  Latex Error:  Dimension too large.
  
  \begin{tkzexample}[latex=6cm,small]
    \begin{tikzpicture}[scale=1]
      \tkzDefPoint(0,0){O}
      \tkzDefPoint(2.5,0){N}
      \tkzDefPoint(-4.2,0.5){M}
      \tkzDefPointBy[rotation=center O angle 30](N)
      \tkzGetPoint{B}
      \tkzDefPointBy[rotation=center O angle -50](N)
      \tkzGetPoint{A}
      \tkzInterLC[common=B](M,B)(O,B) \tkzGetFirstPoint{C}
      \tkzInterLC[common=A](M,A)(O,A) \tkzGetFirstPoint{A'}
      \tkzDrawSegments(A,C M,A M,B A,B)
      \tkzDrawCircle(O,N)
      \begin{scope}[veclen]
        \tkzMarkAngle[mkpos=.2, size=1.2](C,A,M)
      \end{scope}
      \tkzDrawPoints(O, A, B, M, B, C, A')
      \tkzLabelPoints[right](O,A,B)
      \tkzLabelPoints[above left](M,C)
      \tkzLabelPoint[below left](A'){$A'$}
    \end{tikzpicture}
  \end{tkzexample}

  
\subsection{Marking a right angle: {\tkzcname{tkzMarkRightAngle}}}

\begin{NewMacroBox}{tkzMarkRightAngle}{\oarg{local options}\parg{A,O,B}}%
The \tkzname{german} option allows you to change the style of the drawing. The option \tkzname{size} allows to change the size of the drawing.

\medskip
\begin{tabular}{lll}%
\toprule
options             & default & definition         \\ 
\midrule
\TOline{german}{normal}{ german arc with inner point.}
\TOline{size}{0.2}{ side size.}
\end{tabular} 
\end{NewMacroBox}  

\subsubsection{Example of marking a right angle} 
\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}
  \tkzDefPoints{0/0/A,3/1/B,0.9/-1.2/P}
  \tkzDefPointBy[projection = onto B--A](P)  \tkzGetPoint{H}
  \tkzDrawLines[add=.5 and .5](P,H)
  \tkzMarkRightAngle[fill=blue!20,size=.5,draw](A,H,P) 
  \tkzDrawLines[add=.5 and .5](A,B)
  \tkzMarkRightAngle[fill=red!20,size=.8](B,H,P)
  \tkzDrawPoints[](A,B,P,H)  
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Example of marking a right angle, german style} 
\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}
  \tkzDefPoints{0/0/A,3/1/B,0.9/-1.2/P}
  \tkzDefPointBy[projection = onto B--A](P)  \tkzGetPoint{H}
  \tkzDrawLines[add=.5 and .5](P,H)
  \tkzMarkRightAngle[german,size=.5,draw](A,H,P) 
  \tkzDrawPoints[](A,B,P,H) 
  \tkzDrawLines[add=.5 and .5](A,B)
  \tkzMarkRightAngle[german,size=.8](P,H,B) 
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Mix of styles} 
\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[scale=.75]
  \tkzDefPoint(0,0){A}
  \tkzDefPoint(4,1){B}
  \tkzDefPoint(2,5){C}
  \tkzDefPointBy[projection=onto B--A](C) 
      \tkzGetPoint{H}
  \tkzDrawLine(A,B)
  \tkzDrawLine[add = .5 and .2,color=red](C,H)
  \tkzMarkRightAngle[,size=1,color=red](C,H,A)
  \tkzMarkRightAngle[german,size=.8,color=blue](B,H,C)
  \tkzFillAngle[opacity=.2,fill=blue!20,size=.8](B,H,C)
  \tkzLabelPoints(A,B,C,H)
  \tkzDrawPoints(A,B,C,H)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Full example} 

\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[rotate=-90]
\tkzDefPoint(0,1){A}
\tkzDefPoint(2,4){C}
\tkzDefPointWith[orthogonal normed,K=7](C,A)
\tkzGetPoint{B}
\tkzDrawSegment[green!60!black](A,C)
\tkzDrawSegment[green!60!black](C,B)
\tkzDrawSegment[green!60!black](B,A)
\tkzDefSpcTriangle[orthic](A,B,C){N,O,P}
\tkzDrawLine[dashed,color=magenta](C,P)
\tkzLabelPoint[left](A){$A$}
\tkzLabelPoint[right](B){$B$}
\tkzLabelPoint[above](C){$C$}
\tkzLabelPoint[left](P){$P$}
\tkzLabelSegment[auto](B,A){$c$}
\tkzLabelSegment[auto,swap](B,C){$a$}
\tkzLabelSegment[auto,swap](C,A){$b$}
\tkzMarkAngle[size=1,color=cyan,mark=|](C,B,A)
\tkzMarkAngle[size=1,color=cyan,mark=|](A,C,P)
\tkzMarkAngle[size=0.75,color=orange,
    mark=||](P,C,B)
\tkzMarkAngle[size=0.75,color=orange,
   mark=||](B,A,C)
\tkzMarkRightAngle[german](A,C,B)
\tkzMarkRightAngle[german](B,P,C)
\end{tikzpicture} 
\end{tkzexample} 

\subsection{\tkzcname{tkzMarkRightAngles}}
\begin{NewMacroBox}{tkzMarkRightAngles}{\oarg{local options}\parg{A,O,B}\parg{A',O',B'}etc.}%
With common options, there is a macro for multiple angles.
\end{NewMacroBox}

\subsection{Angles Library} % (fold)
\label{sub:angles_library}

If you prefer to use  \TIKZ\ library \tkzname{angles}, you can mark angles with the macro \tkzcname{tkzPicAngle} and \tkzcname{tkzPicRightAngle}.

\begin{NewMacroBox}{tkzPicAngle}{\oarg{tikz options}\parg{A,O,B}}%
  
\medskip
\begin{tabular}{lll}%
\toprule
options             & example & definition         \\ 
\midrule
\TOline{tikz option}{see below}{drawing of the angle $\widehat{AOB}$.}
\end{tabular} 
\end{NewMacroBox}  

\begin{NewMacroBox}{tkzPicRightAngle}{\oarg{tikz options}\parg{A,O,B}}%
  
\medskip
\begin{tabular}{lll}%
\toprule
options             & example & definition         \\ 
\midrule
\TOline{tikz option}{see below}{drawing of the right angle $\widehat{AOB}$.}
\end{tabular} 

\medskip
\emph{You need to know possible options of the \tkzname{angles} library}
\end{NewMacroBox} 

\subsubsection{Angle with \TIKZ} % (fold)
\label{ssub:angle_with_tikz}


\begin{tkzexample}[latex=7cm,small]
  \begin{tikzpicture}
  \tkzDefPoints{0/0/A,4/0/B}
  \tkzDefTriangle[right,swap](A,B) \tkzGetPoint{C}
  \tkzDrawPolygon(A,B,C)
  \tkzDrawPoints(A,B,C)
  \tkzLabelPoints[below](B,A)
  \tkzLabelPoints[above right](C)
  \tkzPicAngle["$\alpha$",draw=orange,
               <->,angle eccentricity=1.2,
               angle radius=1cm](B,A,C)
  \tkzPicRightAngle[draw,red,thick,
                angle eccentricity=.5,
                pic text=.](C,B,A)
  \end{tikzpicture}
\end{tkzexample}

% subsubsection angle_with_tikz (end)
% subsection angles_library (end)
\endinput