summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-euclide/doc/latex/TKZdoc-euclide-styles.tex
blob: 5d1930584e18342a7465d4ce69f5cf7d73000885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
\section{Predefined styles}\label{custom}
The way to proceed will depend on your use of the package. A method that seems to me to be correct is to use as much as possible predefined styles in order to separate the content from the form. This method will be the right one if you plan to create a document (like this documentation) with many figures. We will see how to define a global style for a document. We will see how to use a style locally.

The file \tkzname{tkz-euclide.cfg} contains the predefined styles of the main objects. Among these the most important are points, lines, segments, circles, arcs and compass traces.
 If you always use the same styles and if you create many figures then it is interesting to create your own styles . To do this you need to know what features you can modify. It will be necessary to know some notions of \TIKZ.
 
 The predefined styles are global styles. They exist before the creation of the figures. It is better to avoid changing them between two figures. On the other hand these styles can be modified in a figure temporarily. There the styles are defined locally and do not influence the other figures.
 
 For the document you are reading here is how I defined the different styles.

\begin{tkzltxexample}[]
  \tkzSetUpColors[background=white,text=black]  
  \tkzSetUpPoint[size=2,color=teal]
  \tkzSetUpLine[line width=.4pt,color=teal]
  \tkzSetUpCompass[color=orange, line width=.4pt,delta=10]
  \tkzSetUpArc[color=gray,line width=.4pt]
  \tkzSetUpStyle[orange]{new}
\end{tkzltxexample}

The macro \tkzcname{tkzSetUpColors} allows you to set the background color as well as the text color. If you don't use it, the colors of your document will be used as well as the fonts. Let's see how to define the styles of the main objects.

\section{Points style}
This is how the points  are defined :
\begin{tkzltxexample}[]
\tikzset{point style/.style = {%
       draw         = \tkz@euc@pointcolor,
       inner sep    = 0pt,
       shape        = \tkz@euc@pointshape,
       minimum size = \tkz@euc@pointsize,
       fill         = \tkz@euc@pointcolor}}  
\end{tkzltxexample}

It is of course possible to use \tkzcname{tikzset} but you can use a macro provided by the package. You can use the macro \tkzcname{tkzSetUpPoint} globally or locally, \\ Let's look at this possibility.

\subsection{Use of \tkzcname{tkzSetUpPoint}}

\begin{NewMacroBox}{tkzSetUpPoint}{\oarg{local options}}%
\begin{tabular}{lll}%
options &  default & definition                 \\ 
\midrule
\TOline{color}{black}{point color} 
\TOline{size}{3}{point size} 
\TOline{fill}{black!50}{inside point color} 
\TOline{shape}{circle}{point shape circle, cross or cross out} 
\end{tabular}
\end{NewMacroBox}



\subsubsection{Global style or local style}
First of all here is a figure created with the styles of my documentation, then the style of the points is modified within the environment \tkzNameEnv{tikzspicture}. 

You can use the macro \tkzcname{tkzSetUpPoint} globally or locally, If you place this macro in your preamble or before your first figure then the point style will be valid for all figures in your document. It will be possible to use another style locally by using this command within an environment \tkzNameEnv{tikzpicture}.\\ Let's look at this possibility.


\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
  \tkzDefPoints{0/0/A,5/0/B,3/2/C,3/1/D}
  \tkzDrawPolygon(A,B,C)
  \tkzDrawPoints(A,B,C)
  \tkzLabelPoints(A,B) 
  \tkzLabelPoints[above right](C) 
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Local style}
The style of the points is modified locally in the second figure 
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
  \tkzSetUpPoint[size=4,color=red,fill=red!20]
  \tkzDefPoints{0/0/A,5/0/B,3/2/C,3/1/D}
  \tkzDrawPolygon(A,B,C)
  \tkzDrawPoints(A,B,C)
  \tkzDrawPoint[shape=cross out,thick](D)
  \tkzLabelPoints(A,B) 
  \tkzLabelPoints[above right](C) 
\end{tikzpicture}
\end{tkzexample}

\subsubsection{\tkzname{Style} and \tkzname{scope}}
The points get back the initial style. Point D has a new style limited by the environment \tkzNameEnv{scope}. It is also possible to use |{...}| orThe points get back the initial style. Point $D$ has a new style limited by the environment \tkzNameEnv{scope}. It is also possible to use |{...}| or |\begingoup  ... \endgroup|.

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
  \tkzDefPoints{0/0/A,5/0/B,3/2/C,3/1/D}
  \tkzDrawPolygon(A,B,C)
  \tkzDrawPoints(A,B,C)
  \begin{scope}
    \tkzSetUpPoint[size=4,color=red,fill=red!20]
    \tkzDrawPoint(D)
  \end{scope}
  \tkzLabelPoints(A,B) 
  \tkzLabelPoints[above right](C) 
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Simple example with \tkzcname{tkzSetUpPoint}}

\begin{tkzexample}[latex=5cm,small]
\begin{tikzpicture}
  \tkzSetUpPoint[shape = cross out,color=blue]
  \tkzDefPoint(2,1){A}
  \tkzDefPoint(4,0){B}
  \tkzDrawLine(A,B)
  \tkzDrawPoints(A,B)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Use of \tkzcname{tkzSetUpPoint} inside a group}
\begin{tkzexample}[latex=8cm,small]
\begin{tikzpicture}
  \tkzDefPoints{0/0/A,2/4/B,4/0/C,3/2/D}
  \tkzDrawSegments(A,B A,C A,D)
  {\tkzSetUpPoint[shape=cross out,
            fill= teal!50,
            size=4,color=teal]
  \tkzDrawPoints(A,B)}
  \tkzSetUpPoint[fill= teal!50,size=4,
               color=teal]
   \tkzDrawPoints(C,D)
  \tkzLabelPoints(A,B,C,D)
\end{tikzpicture}
\end{tkzexample}

\section{Lines style}

You have several possibilities to change the style of a line. You can modify the style of a line with \tkzcname{tkzSetUpLine} or directly modify the style of the lines with |\tikzset{line style/.style = ... }|

Reminder about \tkzname{line width} : There are a number of predefined styles that provide more “natural” ways of setting the line width. You can also redefine these styles.


\medskip
\begin{tabular}{cc}
predefined style & value of \tkzname{line width} \cr
\midrule
ultra thin    &  0.1 pt \cr
very thin     &  0.2 pt \cr
thin          &  0.4 pt \cr
semithick     &  0.6 pt \cr
thick         &  0.8 pt \cr
very thick    &  1.2 pt \cr
ultra thick   &  1.6 pt \cr
\midrule
\end{tabular}


\subsection{Use of \tkzcname{tkzSetUpLine}} \label{tkzsetupline}
It is a macro that allows you to define the style of all the lines.

\begin{NewMacroBox}{tkzSetUpLine}{\oarg{local options}}%
\begin{tabular}{lll}%
options &  default & definition                 \\
\midrule
\TOline{color}{black}{colour of the construction lines}
\TOline{line width}{0.4pt}{thickness of the construction lines}
\TOline{style}{solid}{style of construction lines}
\TOline{add}{.2 and .2}{changing the length of a line segment}
\end{tabular}
\end{NewMacroBox}

\subsubsection{Change line width}
\begin{tkzexample}[latex=8cm,small]
\begin{tikzpicture}[scale=.75]
\tkzSetUpLine[line width=1pt]
\begin{scope}[rotate=-90]
    \tkzDefPoints{0/6/A,10/0/B,10/6/C}
    \tkzDefPointBy[projection = onto B--A](C)
    \tkzGetPoint{H}
    \tkzMarkRightAngle[size=.4,
                       fill=teal!20](B,C,A)
    \tkzMarkRightAngle[size=.4,
                       fill=orange!20](B,H,C)
    \tkzDrawPolygon(A,B,C)
    \tkzDrawSegment[new](C,H)
\end{scope}
 \tkzLabelSegment[below](C,B){$a$}
 \tkzLabelSegment[right](A,C){$b$}
 \tkzLabelSegment[left](A,B){$c$}
 \tkzLabelSegment[color=red](C,H){$h$}
 \tkzDrawPoints(A,B,C)
 \tkzLabelPoints[above left](H)
 \tkzLabelPoints(B,C)
 \tkzLabelPoints[above](A)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Change style of line}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=.5]
\tikzset{line style/.style = {color = gray,
                             style=dashed}}
\tkzDefPoints{1/0/A,4/0/B,1/1/C,5/1/D}
\tkzDefPoints{1/2/E,6/2/F,0/4/A',3/4/B'}
\tkzCalcLength(C,D)
\tkzGetLength{rCD}
\tkzCalcLength(E,F)
\tkzGetLength{rEF}
\tkzInterCC[R](A',\rCD)(B',\rEF)
\tkzGetPoints{I}{J}
\tkzDrawLine(A',B')
\tkzCompass(A',B')
\tkzDrawSegments(A,B C,D E,F)
\tkzDefCircle[R](A',\rCD) \tkzGetPoint{a'}
\tkzDefCircle[R](B',\rEF)\tkzGetPoint{b'}
\tkzDrawCircles(A',a' B',b')
\begin{scope}
  \tkzSetUpLine[color=red]
  \tkzDrawSegments(A',I B',I)
\end{scope}
\tkzDrawPoints(A,B,C,D,E,F,A',B',I,J)
\tkzLabelPoints(A,B,C,D,E,F,A',B',I,J)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Example 3: extend lines}
\begin{tkzexample}[latex=7cm,small]
  \begin{tikzpicture}[scale=.75]
  \tkzSetUpLine[add=.5 and .5]
  \tkzDefPoints{0/0/A,4/0/B,1/3/C}
  \tkzDrawLines(A,B B,C A,C)
  \tkzDrawPolygon[red,thick](A,B,C)
  \tkzSetUpPoint[size=4,circle,color=red,fill=red!20]
  \tkzDrawPoints(A,B,C)
  \end{tikzpicture}
\end{tkzexample}

\section{Arc style}

\subsection{The macro \tkzcname{tkzSetUpArc}}
\begin{NewMacroBox}{tkzSetUpArc}{\oarg{local options}}%
\begin{tabular}{lll}%
options &  default & definition                 \\
\midrule
\TOline{color}{black}{colour of the  lines}
\TOline{line width}{0.4pt}{thickness of the lines}
\TOline{style}{solid}{style of construction lines}
\end{tabular}
\end{NewMacroBox}

\subsubsection{Use of \tkzcname{tkzSetUpArc}}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
\def\r{3} \def\angle{200}
\tkzSetUpArc[delta=10,color=purple,line width=.2pt]
\tkzSetUpLabel[font=\scriptsize,red]
\tkzDefPoint(0,0){O}
\tkzDefPoint(\angle:\r){A}
\tkzInterCC(O,A)(A,O) \tkzGetPoints{C'}{C}
\tkzInterCC(O,A)(C,O) \tkzGetPoints{D'}{D}
\tkzInterCC(O,A)(D,O) \tkzGetPoints{X'}{X}
\tkzDrawCircle(O,A)
\tkzDrawArc(A,C')(C)
\tkzDrawArc(C,O)(D)
\tkzDrawArc(D,O)(X)
\tkzDrawLine[add=.1 and .1](A,X)
\tkzDrawPoints(O,A)
\tkzSetUpPoint[size=3,color=purple,fill=purple!10]
\tkzDrawPoints(C,C',D,X)
\tkzLabelPoints[below left](O,A)
\tkzLabelPoints[below](C')
\tkzLabelPoints[below right](X)
\tkzLabelPoints[above](C,D)
\end{tikzpicture}
\end{tkzexample}

\section{Compass style, configuration macro \tkzcname{tkzSetUpCompass}}
The following macro will help to understand the construction of a figure by showing the compass traces necessary to obtain certain points. 

\subsection{The macro \tkzcname{tkzSetUpCompass} }
\begin{NewMacroBox}{tkzSetUpCompass}{\oarg{local options}}%
\begin{tabular}{lll}%
options &  default & definition                 \\
\midrule
\TOline{color}{black}{colour of the construction lines}
\TOline{line width}{0.4pt}{thickness of the construction lines}
\TOline{style}{solid}{style of  lines : solid, dashed,dotted,...}
\TOline{delta}{0}{changes the length of the arc }
\end{tabular}
\end{NewMacroBox}

\subsubsection{Use of \tkzcname{tkzSetUpCompass}}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
  \tkzSetUpCompass[color=red,delta=15]
  \tkzDefPoint(1,1){A}
  \tkzDefPoint(6,1){B}
  \tkzInterCC[R](A,4)(B,4) \tkzGetPoints{C}{D}
  \tkzCompass(A,C)
  \tkzCompass(B,C)
  \tkzDrawPolygon(A,B,C)
  \tkzDrawPoints(A,B,C)
\end{tikzpicture} 
\end{tkzexample}

\subsubsection{Use of \tkzcname{tkzSetUpCompass} with \tkzcname{tkzShowLine}}

\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}[scale=.75]
\tkzSetUpStyle[bisector,size=2,gap=3]{showbi}
\tkzSetUpCompass[color=teal,line width=.3 pt] 
\tkzDefPoints{0/1/A, 8/3/B, 3/6/C} 
\tkzDrawPolygon(A,B,C) 
\tkzDefLine[bisector](B,A,C) \tkzGetPoint{a} 
\tkzDefLine[bisector](C,B,A) \tkzGetPoint{b} 
\tkzShowLine[showbi](B,A,C) 
\tkzShowLine[showbi](C,B,A) 
\tkzInterLL(A,a)(B,b) \tkzGetPoint{I} 
\tkzDefPointBy[projection= onto A--B](I)
\tkzGetPoint{H} 
\tkzDrawCircle[new](I,H) 
\tkzDrawSegments[new](I,H) 
\tkzDrawLines[add=0 and .2,new](A,I B,I)
\end{tikzpicture}
\end{tkzexample} 





\section{Label style}

\subsection{The macro \tkzcname{tkzSetUpLabel} }
The macro \tkzcname{tkzSetUpLabel} is used to define the style of the point labels.
\begin{NewMacroBox}{tkzSetUpStyle}{\oarg{local options}}%
  The options are the same as those of \TIKZ
\end{NewMacroBox}

\subsubsection{Use of  \tkzcname{tkzSetUpLabel}}
\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}[scale=.75]
  \tkzSetUpLabel[font=\scriptsize,red]
  \tkzSetUpStyle[line width=1pt,teal]{XY}
  \tkzInit[xmin=-3,xmax=3,ymin=-3,ymax=3]
  \tkzDrawX[noticks,XY]
  \tkzDrawY[noticks,XY]
  \tkzDefPoints{1/0/A,0/1/B,-1/0/C,0/-1/D}
  \tkzDrawPoints[teal,fill=teal!30,size=6](A,...,D)
  \tkzLabelPoint[above right](A){$A(1,0)$}
  \tkzLabelPoint[above right](B){$B(0,1)$}
  \tkzLabelPoint[above left](C){$C(-1,0)$}
  \tkzLabelPoint[below left](D){$D(0,-1)$}
\end{tikzpicture}
\end{tkzexample}


\section{Own style}
You can set  your own style with \tkzcname{tkzSetUpStyle}

\subsection{The macro \tkzcname{tkzSetUpStyle} }
\begin{NewMacroBox}{tkzSetUpStyle}{\oarg{local options}}%
  The options are the same as those of \TIKZ
\end{NewMacroBox}

\subsubsection{Use of \tkzcname{tkzSetUpStyle}}
\begin{tkzexample}[latex=2cm,small]
\begin{tikzpicture}
  \tkzSetUpStyle[color=blue!20!black,fill=blue!20]{mystyle}
  \tkzDefPoint(0,0){O}
  \tkzDefPoint(0,1){A}
  \tkzDrawPoints(O) % general style
  \tkzDrawPoints[mystyle,size=4](A) % my style
  \tkzLabelPoints(O,A)
\end{tikzpicture}
\end{tkzexample}

\section{How to use \tkzname{arrows}}

In some countries, arrows are used to indicate the parallelism of lines,
to represent half-lines or the sides of an angle (rays).

Here are some examples of how to place these arrows.
\tkzname{ tkz-euclide} loads a library called \tkzname{arrows.meta}.
 
|\usetikzlibrary{arrows.meta}|

This  library is used to produce different styles of arrow heads. The next examples use some of them. 

\subsection{Arrows at endpoints on segment, ray or line}
\tkzname{Stealth}, \tkzname{Triangle}, \tkzname{To}, \tkzname{Latex} and \dots  which can be combined with \tkzname{reversed}. That's easy to place an arrow at one or two endpoints.

\begin{enumerate}
\item \tkzname{-Triangle} and \tkzname{Segment}
 \begin{tkzexample}[latex=6cm,small]
    \begin{tikzpicture}
      \tkzDefPoints{0/0/A,4/0/B}
      \tkzDrawSegment[-Triangle](A,B)
    \end{tikzpicture}
  \end{tkzexample}
\item \tkzname{Stealth-Stealth} and \tkzname{Segment}
  \begin{tkzexample}[latex=6cm,small]
    \begin{tikzpicture}
      \tkzDefPoints{0/0/A,4/0/B}
      \tkzDrawSegment[Stealth-Stealth](A,B)
    \end{tikzpicture}
  \end{tkzexample}
\item \tkzname{Latex-Latex}   and \tkzname{Line}
  \begin{tkzexample}[latex=6cm,small]
    \begin{tikzpicture}
      \tkzDefPoints{0/0/A,4/0/B}
      \tkzDrawLine[red,Latex-Latex](A,B)
      \tkzDrawPoints(A,B)
    \end{tikzpicture}
  \end{tkzexample}
\item \tkzname{To-To} and \tkzname{Segment}
  \begin{tkzexample}[latex=6cm,small]
    \begin{tikzpicture}
      \tkzDefPoints{0/0/A,4/0/B}
      \tkzDrawSegment[To-To](A,B)
    \end{tikzpicture}
  \end{tkzexample}
\item \tkzname{Latex-Late}  and \tkzname{Segment}
  \begin{tkzexample}[latex=6cm,small]
    \begin{tikzpicture}
      \tkzDefPoints{0/0/A,4/0/B}
      \tkzDrawSegment[Latex-Latex](A,B)
    \end{tikzpicture}
  \end{tkzexample}
\item \tkzname{Latex-}  and \tkzname{Segment}
  \begin{tkzexample}[latex=6cm,small]
    \begin{tikzpicture}
      \tkzDefPoints{0/0/A,4/0/B}
      \tkzDrawSegment[Latex-](A,B)
    \end{tikzpicture}
  \end{tkzexample}
\item \tkzname{-Latex}  and \tkzname{Segments}
  \begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}
 \tkzDefPoints{0/0/A,4/0/B,5/-2/C}
 \tkzDrawSegments[-Latex](A,B A,C)
\end{tikzpicture}
\end{tkzexample}
\end{enumerate}

\subsubsection{Scaling an arrow head}

\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}
 \tkzDefPoints{0/0/A,4/0/B}
 \tkzDrawSegment[{Latex[scale=2]}-{Latex[scale=2]}](A,B)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Using vector style}
|\tikzset{vector style/.style={>=Latex,->}}|

You can redefine this style.
\begin{tkzexample}[latex=6cm,small]
\begin{tikzpicture}
 \tkzDefPoints{0/0/A,4/0/B}
\tkzDrawSegment[vector style](A,B)
\end{tikzpicture}
\end{tkzexample}
  
\subsection{Arrows on  middle point of a line segment}

Arrows on lines are used to indicate that those lines are parallel. It depends on the country, in France we prefer to indicate outside the figure that $(A,B) \parallel (D,C)$. The code is an adaptation of an answer by \tkzname{Muzimuzhi Z} on the site \href{https://tex.stackexchange.com/questions/632596/how-to-manage-argument-pattern-keys-and-subways}{tex.stackexchange.com}.

\medskip
 Syntax: \\

 \begin{itemize}
\item |tkz arrow| (\tkzname{Latex} by default)
\item |tkz arrow=<arrow end tip>|
\item |tkz arrow=<arrow end tip> at <pos> (<pos> = .5 by default)|
\item |tkz arrow={<arrow end tip>[<arrow options>] at <pos>}| option possible \tkzname{scale}
 \end{itemize}

Example usages: \\

|\tkzDrawSegment[tkz arrow=Stealth] (A,B)|\\
|\tkzDrawSegment[tkz arrow={To[scale=3] at .4}](A,B)|\\
|\tkzDrawSegment[tkz arrow={Latex[scale=5,blue] at .6}](A,B)|

\subsubsection{In a parallelogram}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
 \tkzDefPoints{0/0/A,3/0/B,4/2/C} 
 \tkzDefParallelogram(A,B,C) 
 \tkzGetPoint{D}
 \tkzDrawSegments[tkz arrow](A,B D,C)
 \tkzDrawSegments(B,C D,A)
 \tkzLabelPoints(A,B) 
 \tkzLabelPoints[above right](C,D)
 \tkzDrawPoints(A,...,D)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{A line parallel to another one}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
 \tkzDefPoints{0/0/A,3/0/B,1/2/C} 
 \tkzDefPointWith[colinear= at C](A,B) 
 \tkzGetPoint{D}
 \tkzDrawSegments[tkz arrow=Triangle](A,B C,D)
 \tkzLabelPoints(A,B,C) 
 \tkzDrawPoints(A,...,C)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Arrow on a circle}
It is possible to place an arrow on the first quarter of a circle. A rotation allows you to move the arrow.
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
\tkzDefPoints{0/0/A,3/0/B} 
\begin{scope}[rotate=150]
 \tkzDrawCircle[tkz arrow={Latex[scale=2,red]}](A,B)
\end{scope}
\end{tikzpicture}
\end{tkzexample}

\subsection{Arrows on  all segments of a polygon}
Some users of my package have asked me to be able to place an arrow on each side of a polygon. I used a style proposed by Paul Gaborit on the site 
\href{https://tex.stackexchange.com/questions/3161/tikz-how-to-draw-an-arrow-in-the-middle-of-the-line}{tex.stackexchange.com}.

|\tikzset{tkz arrows/.style=|\\
|{postaction={on each path={tkz arrow={Latex[scale=2,color=black]}}}}}|   

You can change this style. With \tkzname{tkz arrows} you can an arrow on each segment of a polygon

\subsubsection{Arrow on each segment with \tkzname{tkz arrows} }
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
 \tkzDefPoints{0/0/A,3/0/B}  
 \tkzDefSquare(A,B) \tkzGetPoints{C}{D}
 \tkzDrawPolygon[tkz arrows](A,...,D)
\end{tikzpicture}
\end{tkzexample}

\subsubsection{Using \tkzname{tkz arrows} with a circle}
\begin{tkzexample}[latex=7cm,small]
\begin{tikzpicture}
 \tkzDefPoints{0/0/A,3/0/B} 
 \tkzDrawCircle[tkz arrows](A,B)
\end{tikzpicture}
\end{tkzexample}

\endinput