Debian Codegraph @

texmf-dist/doc/latex/tkz-euclide/TKZdoc-euclide-styles.tex

raw
1 \section{Predefined styles}\label{custom}
2 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.
3
4 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.
5 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.
6
7 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.
8
9 For the document you are reading here is how I defined the different styles.
10
11 \begin{tkzltxexample}[]
12 \tkzSetUpColors[background=white,text=black]
13 \tkzSetUpPoint[size=2,color=teal]
14 \tkzSetUpLine[line width=.4pt,color=teal]
15 \tkzSetUpCompass[color=orange, line width=.4pt,delta=10]
16 \tkzSetUpArc[color=gray,line width=.4pt]
17 \tkzSetUpStyle[orange]{new}
18 \end{tkzltxexample}
19
20 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.
21
22 \section{Points style}
23 This is how the points are defined :
24 \begin{tkzltxexample}[]
25 \tikzset{point style/.style = {%
26 draw = \tkz@euc@pointcolor,
27 inner sep = 0pt,
28 shape = \tkz@euc@pointshape,
29 minimum size = \tkz@euc@pointsize,
30 fill = \tkz@euc@pointcolor}}
31 \end{tkzltxexample}
32
33 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.
34
35 \subsection{Use of \tkzcname{tkzSetUpPoint}}
36
37 \begin{NewMacroBox}{tkzSetUpPoint}{\oarg{local options}}%
38 \begin{tabular}{lll}%
39 options & default & definition \\
40 \midrule
41 \TOline{color}{black}{point color}
42 \TOline{size}{3}{point size}
43 \TOline{fill}{black!50}{inside point color}
44 \TOline{shape}{circle}{point shape circle, cross or cross out}
45 \end{tabular}
46 \end{NewMacroBox}
47
48
49
50 \subsubsection{Global style or local style}
51 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}.
52
53 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.
54
55
56 \begin{tkzexample}[latex=7cm,small]
57 \begin{tikzpicture}
58 \tkzDefPoints{0/0/A,5/0/B,3/2/C,3/1/D}
59 \tkzDrawPolygon(A,B,C)
60 \tkzDrawPoints(A,B,C)
61 \tkzLabelPoints(A,B)
62 \tkzLabelPoints[above right](C)
63 \end{tikzpicture}
64 \end{tkzexample}
65
66 \subsubsection{Local style}
67 The style of the points is modified locally in the second figure
68 \begin{tkzexample}[latex=7cm,small]
69 \begin{tikzpicture}
70 \tkzSetUpPoint[size=4,color=red,fill=red!20]
71 \tkzDefPoints{0/0/A,5/0/B,3/2/C,3/1/D}
72 \tkzDrawPolygon(A,B,C)
73 \tkzDrawPoints(A,B,C)
74 \tkzDrawPoint[shape=cross out,thick](D)
75 \tkzLabelPoints(A,B)
76 \tkzLabelPoints[above right](C)
77 \end{tikzpicture}
78 \end{tkzexample}
79
80 \subsubsection{\tkzname{Style} and \tkzname{scope}}
81 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|.
82
83 \begin{tkzexample}[latex=7cm,small]
84 \begin{tikzpicture}
85 \tkzDefPoints{0/0/A,5/0/B,3/2/C,3/1/D}
86 \tkzDrawPolygon(A,B,C)
87 \tkzDrawPoints(A,B,C)
88 \begin{scope}
89 \tkzSetUpPoint[size=4,color=red,fill=red!20]
90 \tkzDrawPoint(D)
91 \end{scope}
92 \tkzLabelPoints(A,B)
93 \tkzLabelPoints[above right](C)
94 \end{tikzpicture}
95 \end{tkzexample}
96
97 \subsubsection{Simple example with \tkzcname{tkzSetUpPoint}}
98
99 \begin{tkzexample}[latex=5cm,small]
100 \begin{tikzpicture}
101 \tkzSetUpPoint[shape = cross out,color=blue]
102 \tkzDefPoint(2,1){A}
103 \tkzDefPoint(4,0){B}
104 \tkzDrawLine(A,B)
105 \tkzDrawPoints(A,B)
106 \end{tikzpicture}
107 \end{tkzexample}
108
109 \subsubsection{Use of \tkzcname{tkzSetUpPoint} inside a group}
110 \begin{tkzexample}[latex=8cm,small]
111 \begin{tikzpicture}
112 \tkzDefPoints{0/0/A,2/4/B,4/0/C,3/2/D}
113 \tkzDrawSegments(A,B A,C A,D)
114 {\tkzSetUpPoint[shape=cross out,
115 fill= teal!50,
116 size=4,color=teal]
117 \tkzDrawPoints(A,B)}
118 \tkzSetUpPoint[fill= teal!50,size=4,
119 color=teal]
120 \tkzDrawPoints(C,D)
121 \tkzLabelPoints(A,B,C,D)
122 \end{tikzpicture}
123 \end{tkzexample}
124
125 \section{Lines style}
126
127 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 = ... }|
128
129 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.
130
131
132 \medskip
133 \begin{tabular}{cc}
134 predefined style & value of \tkzname{line width} \cr
135 \midrule
136 ultra thin & 0.1 pt \cr
137 very thin & 0.2 pt \cr
138 thin & 0.4 pt \cr
139 semithick & 0.6 pt \cr
140 thick & 0.8 pt \cr
141 very thick & 1.2 pt \cr
142 ultra thick & 1.6 pt \cr
143 \midrule
144 \end{tabular}
145
146
147 \subsection{Use of \tkzcname{tkzSetUpLine}} \label{tkzsetupline}
148 It is a macro that allows you to define the style of all the lines.
149
150 \begin{NewMacroBox}{tkzSetUpLine}{\oarg{local options}}%
151 \begin{tabular}{lll}%
152 options & default & definition \\
153 \midrule
154 \TOline{color}{black}{colour of the construction lines}
155 \TOline{line width}{0.4pt}{thickness of the construction lines}
156 \TOline{style}{solid}{style of construction lines}
157 \TOline{add}{.2 and .2}{changing the length of a line segment}
158 \end{tabular}
159 \end{NewMacroBox}
160
161 \subsubsection{Change line width}
162 \begin{tkzexample}[latex=8cm,small]
163 \begin{tikzpicture}[scale=.75]
164 \tkzSetUpLine[line width=1pt]
165 \begin{scope}[rotate=-90]
166 \tkzDefPoints{0/6/A,10/0/B,10/6/C}
167 \tkzDefPointBy[projection = onto B--A](C)
168 \tkzGetPoint{H}
169 \tkzMarkRightAngle[size=.4,
170 fill=teal!20](B,C,A)
171 \tkzMarkRightAngle[size=.4,
172 fill=orange!20](B,H,C)
173 \tkzDrawPolygon(A,B,C)
174 \tkzDrawSegment[new](C,H)
175 \end{scope}
176 \tkzLabelSegment[below](C,B){$a$}
177 \tkzLabelSegment[right](A,C){$b$}
178 \tkzLabelSegment[left](A,B){$c$}
179 \tkzLabelSegment[color=red](C,H){$h$}
180 \tkzDrawPoints(A,B,C)
181 \tkzLabelPoints[above left](H)
182 \tkzLabelPoints(B,C)
183 \tkzLabelPoints[above](A)
184 \end{tikzpicture}
185 \end{tkzexample}
186
187 \subsubsection{Change style of line}
188
189 \begin{tkzexample}[latex=7cm,small]
190 \begin{tikzpicture}[scale=.5]
191 \tikzset{line style/.style = {color = gray,
192 style=dashed}}
193 \tkzDefPoints{1/0/A,4/0/B,1/1/C,5/1/D}
194 \tkzDefPoints{1/2/E,6/2/F,0/4/A',3/4/B'}
195 \tkzCalcLength(C,D)
196 \tkzGetLength{rCD}
197 \tkzCalcLength(E,F)
198 \tkzGetLength{rEF}
199 \tkzInterCC[R](A',\rCD)(B',\rEF)
200 \tkzGetPoints{I}{J}
201 \tkzDrawLine(A',B')
202 \tkzCompass(A',B')
203 \tkzDrawSegments(A,B C,D E,F)
204 \tkzDefCircle[R](A',\rCD) \tkzGetPoint{a'}
205 \tkzDefCircle[R](B',\rEF)\tkzGetPoint{b'}
206 \tkzDrawCircles(A',a' B',b')
207 \begin{scope}
208 \tkzSetUpLine[color=red]
209 \tkzDrawSegments(A',I B',I)
210 \end{scope}
211 \tkzDrawPoints(A,B,C,D,E,F,A',B',I,J)
212 \tkzLabelPoints(A,B,C,D,E,F,A',B',I,J)
213 \end{tikzpicture}
214 \end{tkzexample}
215
216 \subsubsection{Example 3: extend lines}
217 \begin{tkzexample}[latex=7cm,small]
218 \begin{tikzpicture}[scale=.75]
219 \tkzSetUpLine[add=.5 and .5]
220 \tkzDefPoints{0/0/A,4/0/B,1/3/C}
221 \tkzDrawLines(A,B B,C A,C)
222 \tkzDrawPolygon[red,thick](A,B,C)
223 \tkzSetUpPoint[size=4,circle,color=red,fill=red!20]
224 \tkzDrawPoints(A,B,C)
225 \end{tikzpicture}
226 \end{tkzexample}
227
228 \section{Arc style}
229
230 \subsection{The macro \tkzcname{tkzSetUpArc}}
231 \begin{NewMacroBox}{tkzSetUpArc}{\oarg{local options}}%
232 \begin{tabular}{lll}%
233 options & default & definition \\
234 \midrule
235 \TOline{color}{black}{colour of the lines}
236 \TOline{line width}{0.4pt}{thickness of the lines}
237 \TOline{style}{solid}{style of construction lines}
238 \end{tabular}
239 \end{NewMacroBox}
240
241 \subsubsection{Use of \tkzcname{tkzSetUpArc}}
242 \begin{tkzexample}[latex=7cm,small]
243 \begin{tikzpicture}
244 \def\r{3} \def\angle{200}
245 \tkzSetUpArc[delta=10,color=purple,line width=.2pt]
246 \tkzSetUpLabel[font=\scriptsize,red]
247 \tkzDefPoint(0,0){O}
248 \tkzDefPoint(\angle:\r){A}
249 \tkzInterCC(O,A)(A,O) \tkzGetPoints{C'}{C}
250 \tkzInterCC(O,A)(C,O) \tkzGetPoints{D'}{D}
251 \tkzInterCC(O,A)(D,O) \tkzGetPoints{X'}{X}
252 \tkzDrawCircle(O,A)
253 \tkzDrawArc(A,C')(C)
254 \tkzDrawArc(C,O)(D)
255 \tkzDrawArc(D,O)(X)
256 \tkzDrawLine[add=.1 and .1](A,X)
257 \tkzDrawPoints(O,A)
258 \tkzSetUpPoint[size=3,color=purple,fill=purple!10]
259 \tkzDrawPoints(C,C',D,X)
260 \tkzLabelPoints[below left](O,A)
261 \tkzLabelPoints[below](C')
262 \tkzLabelPoints[below right](X)
263 \tkzLabelPoints[above](C,D)
264 \end{tikzpicture}
265 \end{tkzexample}
266
267 \section{Compass style, configuration macro \tkzcname{tkzSetUpCompass}}
268 The following macro will help to understand the construction of a figure by showing the compass traces necessary to obtain certain points.
269
270 \subsection{The macro \tkzcname{tkzSetUpCompass} }
271 \begin{NewMacroBox}{tkzSetUpCompass}{\oarg{local options}}%
272 \begin{tabular}{lll}%
273 options & default & definition \\
274 \midrule
275 \TOline{color}{black}{colour of the construction lines}
276 \TOline{line width}{0.4pt}{thickness of the construction lines}
277 \TOline{style}{solid}{style of lines : solid, dashed,dotted,...}
278 \TOline{delta}{0}{changes the length of the arc }
279 \end{tabular}
280 \end{NewMacroBox}
281
282 \subsubsection{Use of \tkzcname{tkzSetUpCompass}}
283
284 \begin{tkzexample}[latex=7cm,small]
285 \begin{tikzpicture}
286 \tkzSetUpCompass[color=red,delta=15]
287 \tkzDefPoint(1,1){A}
288 \tkzDefPoint(6,1){B}
289 \tkzInterCC[R](A,4)(B,4) \tkzGetPoints{C}{D}
290 \tkzCompass(A,C)
291 \tkzCompass(B,C)
292 \tkzDrawPolygon(A,B,C)
293 \tkzDrawPoints(A,B,C)
294 \end{tikzpicture}
295 \end{tkzexample}
296
297 \subsubsection{Use of \tkzcname{tkzSetUpCompass} with \tkzcname{tkzShowLine}}
298
299 \begin{tkzexample}[latex=7cm,small]
300 \begin{tikzpicture}[scale=.75]
301 \tkzSetUpStyle[bisector,size=2,gap=3]{showbi}
302 \tkzSetUpCompass[color=teal,line width=.3 pt]
303 \tkzDefPoints{0/1/A, 8/3/B, 3/6/C}
304 \tkzDrawPolygon(A,B,C)
305 \tkzDefLine[bisector](B,A,C) \tkzGetPoint{a}
306 \tkzDefLine[bisector](C,B,A) \tkzGetPoint{b}
307 \tkzShowLine[showbi](B,A,C)
308 \tkzShowLine[showbi](C,B,A)
309 \tkzInterLL(A,a)(B,b) \tkzGetPoint{I}
310 \tkzDefPointBy[projection= onto A--B](I)
311 \tkzGetPoint{H}
312 \tkzDrawCircle[new](I,H)
313 \tkzDrawSegments[new](I,H)
314 \tkzDrawLines[add=0 and .2,new](A,I B,I)
315 \end{tikzpicture}
316 \end{tkzexample}
317
318
319
320
321
322 \section{Label style}
323
324 \subsection{The macro \tkzcname{tkzSetUpLabel} }
325 The macro \tkzcname{tkzSetUpLabel} is used to define the style of the point labels.
326 \begin{NewMacroBox}{tkzSetUpStyle}{\oarg{local options}}%
327 The options are the same as those of \TIKZ
328 \end{NewMacroBox}
329
330 \subsubsection{Use of \tkzcname{tkzSetUpLabel}}
331 \begin{tkzexample}[latex=6cm,small]
332 \begin{tikzpicture}[scale=.75]
333 \tkzSetUpLabel[font=\scriptsize,red]
334 \tkzSetUpStyle[line width=1pt,teal]{XY}
335 \tkzInit[xmin=-3,xmax=3,ymin=-3,ymax=3]
336 \tkzDrawX[noticks,XY]
337 \tkzDrawY[noticks,XY]
338 \tkzDefPoints{1/0/A,0/1/B,-1/0/C,0/-1/D}
339 \tkzDrawPoints[teal,fill=teal!30,size=6](A,...,D)
340 \tkzLabelPoint[above right](A){$A(1,0)$}
341 \tkzLabelPoint[above right](B){$B(0,1)$}
342 \tkzLabelPoint[above left](C){$C(-1,0)$}
343 \tkzLabelPoint[below left](D){$D(0,-1)$}
344 \end{tikzpicture}
345 \end{tkzexample}
346
347
348 \section{Own style}
349 You can set your own style with \tkzcname{tkzSetUpStyle}
350
351 \subsection{The macro \tkzcname{tkzSetUpStyle} }
352 \begin{NewMacroBox}{tkzSetUpStyle}{\oarg{local options}}%
353 The options are the same as those of \TIKZ
354 \end{NewMacroBox}
355
356 \subsubsection{Use of \tkzcname{tkzSetUpStyle}}
357 \begin{tkzexample}[latex=2cm,small]
358 \begin{tikzpicture}
359 \tkzSetUpStyle[color=blue!20!black,fill=blue!20]{mystyle}
360 \tkzDefPoint(0,0){O}
361 \tkzDefPoint(0,1){A}
362 \tkzDrawPoints(O) % general style
363 \tkzDrawPoints[mystyle,size=4](A) % my style
364 \tkzLabelPoints(O,A)
365 \end{tikzpicture}
366 \end{tkzexample}
367
368 \section{How to use \tkzname{arrows}}
369
370 In some countries, arrows are used to indicate the parallelism of lines,
371 to represent half-lines or the sides of an angle (rays).
372
373 Here are some examples of how to place these arrows.
374 \tkzname{ tkz-euclide} loads a library called \tkzname{arrows.meta}.
375
376 |\usetikzlibrary{arrows.meta}|
377
378 This library is used to produce different styles of arrow heads. The next examples use some of them.
379
380 \subsection{Arrows at endpoints on segment, ray or line}
381 \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.
382
383 \begin{enumerate}
384 \item \tkzname{-Triangle} and \tkzname{Segment}
385 \begin{tkzexample}[latex=6cm,small]
386 \begin{tikzpicture}
387 \tkzDefPoints{0/0/A,4/0/B}
388 \tkzDrawSegment[-Triangle](A,B)
389 \end{tikzpicture}
390 \end{tkzexample}
391 \item \tkzname{Stealth-Stealth} and \tkzname{Segment}
392 \begin{tkzexample}[latex=6cm,small]
393 \begin{tikzpicture}
394 \tkzDefPoints{0/0/A,4/0/B}
395 \tkzDrawSegment[Stealth-Stealth](A,B)
396 \end{tikzpicture}
397 \end{tkzexample}
398 \item \tkzname{Latex-Latex} and \tkzname{Line}
399 \begin{tkzexample}[latex=6cm,small]
400 \begin{tikzpicture}
401 \tkzDefPoints{0/0/A,4/0/B}
402 \tkzDrawLine[red,Latex-Latex](A,B)
403 \tkzDrawPoints(A,B)
404 \end{tikzpicture}
405 \end{tkzexample}
406 \item \tkzname{To-To} and \tkzname{Segment}
407 \begin{tkzexample}[latex=6cm,small]
408 \begin{tikzpicture}
409 \tkzDefPoints{0/0/A,4/0/B}
410 \tkzDrawSegment[To-To](A,B)
411 \end{tikzpicture}
412 \end{tkzexample}
413 \item \tkzname{Latex-Late} and \tkzname{Segment}
414 \begin{tkzexample}[latex=6cm,small]
415 \begin{tikzpicture}
416 \tkzDefPoints{0/0/A,4/0/B}
417 \tkzDrawSegment[Latex-Latex](A,B)
418 \end{tikzpicture}
419 \end{tkzexample}
420 \item \tkzname{Latex-} and \tkzname{Segment}
421 \begin{tkzexample}[latex=6cm,small]
422 \begin{tikzpicture}
423 \tkzDefPoints{0/0/A,4/0/B}
424 \tkzDrawSegment[Latex-](A,B)
425 \end{tikzpicture}
426 \end{tkzexample}
427 \item \tkzname{-Latex} and \tkzname{Segments}
428 \begin{tkzexample}[latex=6cm,small]
429 \begin{tikzpicture}
430 \tkzDefPoints{0/0/A,4/0/B,5/-2/C}
431 \tkzDrawSegments[-Latex](A,B A,C)
432 \end{tikzpicture}
433 \end{tkzexample}
434 \end{enumerate}
435
436 \subsubsection{Scaling an arrow head}
437
438 \begin{tkzexample}[latex=6cm,small]
439 \begin{tikzpicture}
440 \tkzDefPoints{0/0/A,4/0/B}
441 \tkzDrawSegment[{Latex[scale=2]}-{Latex[scale=2]}](A,B)
442 \end{tikzpicture}
443 \end{tkzexample}
444
445 \subsubsection{Using vector style}
446 |\tikzset{vector style/.style={>=Latex,->}}|
447
448 You can redefine this style.
449 \begin{tkzexample}[latex=6cm,small]
450 \begin{tikzpicture}
451 \tkzDefPoints{0/0/A,4/0/B}
452 \tkzDrawSegment[vector style](A,B)
453 \end{tikzpicture}
454 \end{tkzexample}
455
456 \subsection{Arrows on middle point of a line segment}
457
458 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}.
459
460 \medskip
461 Syntax: \\
462
463 \begin{itemize}
464 \item |tkz arrow| (\tkzname{Latex} by default)
465 \item |tkz arrow=<arrow end tip>|
466 \item |tkz arrow=<arrow end tip> at <pos> (<pos> = .5 by default)|
467 \item |tkz arrow={<arrow end tip>[<arrow options>] at <pos>}| option possible \tkzname{scale}
468 \end{itemize}
469
470 Example usages: \\
471
472 |\tkzDrawSegment[tkz arrow=Stealth] (A,B)|\\
473 |\tkzDrawSegment[tkz arrow={To[scale=3] at .4}](A,B)|\\
474 |\tkzDrawSegment[tkz arrow={Latex[scale=5,blue] at .6}](A,B)|
475
476 \subsubsection{In a parallelogram}
477 \begin{tkzexample}[latex=7cm,small]
478 \begin{tikzpicture}
479 \tkzDefPoints{0/0/A,3/0/B,4/2/C}
480 \tkzDefParallelogram(A,B,C)
481 \tkzGetPoint{D}
482 \tkzDrawSegments[tkz arrow](A,B D,C)
483 \tkzDrawSegments(B,C D,A)
484 \tkzLabelPoints(A,B)
485 \tkzLabelPoints[above right](C,D)
486 \tkzDrawPoints(A,...,D)
487 \end{tikzpicture}
488 \end{tkzexample}
489
490 \subsubsection{A line parallel to another one}
491 \begin{tkzexample}[latex=7cm,small]
492 \begin{tikzpicture}
493 \tkzDefPoints{0/0/A,3/0/B,1/2/C}
494 \tkzDefPointWith[colinear= at C](A,B)
495 \tkzGetPoint{D}
496 \tkzDrawSegments[tkz arrow=Triangle](A,B C,D)
497 \tkzLabelPoints(A,B,C)
498 \tkzDrawPoints(A,...,C)
499 \end{tikzpicture}
500 \end{tkzexample}
501
502 \subsubsection{Arrow on a circle}
503 It is possible to place an arrow on the first quarter of a circle. A rotation allows you to move the arrow.
504 \begin{tkzexample}[latex=7cm,small]
505 \begin{tikzpicture}
506 \tkzDefPoints{0/0/A,3/0/B}
507 \begin{scope}[rotate=150]
508 \tkzDrawCircle[tkz arrow={Latex[scale=2,red]}](A,B)
509 \end{scope}
510 \end{tikzpicture}
511 \end{tkzexample}
512
513 \subsection{Arrows on all segments of a polygon}
514 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
515 \href{https://tex.stackexchange.com/questions/3161/tikz-how-to-draw-an-arrow-in-the-middle-of-the-line}{tex.stackexchange.com}.
516
517 |\tikzset{tkz arrows/.style=|\\
518 |{postaction={on each path={tkz arrow={Latex[scale=2,color=black]}}}}}|
519
520 You can change this style. With \tkzname{tkz arrows} you can an arrow on each segment of a polygon
521
522 \subsubsection{Arrow on each segment with \tkzname{tkz arrows} }
523 \begin{tkzexample}[latex=7cm,small]
524 \begin{tikzpicture}
525 \tkzDefPoints{0/0/A,3/0/B}
526 \tkzDefSquare(A,B) \tkzGetPoints{C}{D}
527 \tkzDrawPolygon[tkz arrows](A,...,D)
528 \end{tikzpicture}
529 \end{tkzexample}
530
531 \subsubsection{Using \tkzname{tkz arrows} with a circle}
532 \begin{tkzexample}[latex=7cm,small]
533 \begin{tikzpicture}
534 \tkzDefPoints{0/0/A,3/0/B}
535 \tkzDrawCircle[tkz arrows](A,B)
536 \end{tikzpicture}
537 \end{tkzexample}
538
539 \endinput