Debian Codegraph @

texmf-dist/tex/latex/tkz-euclide/tkz-euclide.cfg

raw
1 % tkz-euclide.cfg
2 % Copyright 2011-2026 Alain Matthes
3 % SPDX-License-Identifier: LPPL-1.3c
4 % Maintainer: Alain Matthes
5
6
7 % If you modify this original file, YOUR CHANGES WILL BE LOST when it is
8 % updated. Instead, put your changes in the entire copy of tkz-base.cfg
9 % and save the file in a directory part of your TEXINPUTS environment
10 % variable.
11
12
13 \typeout{2026/01/25 5.13c tkz-euclide.cfg}
14 %<------ colors ---------------------------------------–>
15 \def\tkz@backgroundcolor{white}
16 \def\tkz@textcolor{black}
17 %<---------------------------------------------------------
18 \def\tkz@fillcolor{\tkz@backgroundcolor}
19 \def\tkz@mainlinecolor{\tkz@textcolor}
20 \def\tkz@otherlinecolor{\tkz@mainlinecolor!50}
21 %<-------------------------- points -----------------------------------–>
22 \def\tkz@euc@pointshape{circle}
23 \def\tkz@euc@pointcolor{\tkz@mainlinecolor}
24 \def\tkz@euc@pointfillcolor{\tkz@euc@pointcolor!10}
25 \def\tkz@euc@labelcolor{\tkz@mainlinecolor}
26 \def\tkz@euc@pointsize{2}
27 \def\tkz@euc@pointpos{below right}
28 \def\tkz@euc@segmentcolor{\tkz@mainlinecolor}
29 \def\tkz@euc@circlecolor{\tkz@mainlinecolor}
30 \tikzset{point style/.style = {draw = \tkz@euc@pointcolor,
31 inner sep = 0pt,
32 shape = \tkz@euc@pointshape,
33 minimum size = \tkz@euc@pointsize,
34 fill = \tkz@euc@pointfillcolor
35 }
36 }
37 % label for the point
38 \tikzset{label style/.style={ below, \tkz@euc@labelcolor,
39 font = \normalsize}
40 }
41 \tikzset{label angle style/.style={ \tkz@euc@labelcolor,
42 font = \normalsize}
43 }
44 %<-------------------------- line ---------------------------------------–>
45 \def\tkz@euc@linecolor{\tkz@mainlinecolor}
46 \def\tkz@euc@linewidth{0.2pt}
47 \def\tkz@euc@linestyle{solid}
48 \def\tkz@euc@lineleft{.2}
49 \def\tkz@euc@lineright{.2}
50 \tikzset{%
51 line style/.style = {%
52 line width = \tkz@euc@linewidth,
53 color = \tkz@euc@linecolor,
54 style = \tkz@euc@linestyle,
55 add = {\tkz@euc@lineleft} and {\tkz@euc@lineright},
56 line cap = round
57 }
58 }
59 %<------------------------- circle -----------------------------------–>
60 \def\tkz@euc@circlelw{\tkz@euc@linewidth}
61 \def\tkz@euc@circlecolor{\tkz@otherlinecolor}
62 \def\tkz@euc@circlestyle{solid}
63 \tikzset{%
64 circle style/.style = {%
65 color = \tkz@euc@circlecolor,
66 line width = \tkz@euc@circlelw,
67 style = \tkz@euc@circlestyle}
68 }
69 \tikzset{label circle style/.style = {%
70 color = \tkz@mainlinecolor}
71 }
72 %<------------------------- compass -----------------------------------–>
73 \def\tkz@euc@compasscolor{\tkz@otherlinecolor}
74 \def\tkz@euc@compasswidth{\tkz@euc@linewidth}
75 \def\tkz@euc@compassstyle{solid}
76 \tikzset{%
77 compass style/.style = {%
78 color = \tkz@euc@compasscolor,
79 line width = \tkz@euc@compasswidth,
80 style = \tkz@euc@compassstyle}
81 }
82 %<------------------------- arc -----------------------------------–>
83 \def\tkz@euc@arclw{\tkz@euc@linewidth}
84 \def\tkz@euc@arccolor{\tkz@mainlinecolor}
85 \def\tkz@euc@arcstyle{solid}
86 \tikzset{%
87 arc style/.style={%
88 color = \tkz@euc@arccolor,
89 line width = \tkz@euc@linewidth}
90 }
91 %<------ axes cartesian system ---------------------------------------–>
92 \def\tkz@init@color{\tkz@textcolor}
93 \def\tkz@init@lw{0.4 pt}
94 \def\tkz@init@tickwd{0.8 pt}
95 \def\tkz@init@ticka{2 pt}
96 \def\tkz@init@tickb{2 pt}
97 \def\tkz@init@xlabel{$x$}
98 \def\tkz@init@ylabel{$y$}
99 \def\tkz@init@tickb{2 pt}
100 \def\tkz@init@rightspace{.5}
101 \def\tkz@init@leftspace{0}
102 \def\tkz@init@upspace{.5}
103 \def\tkz@init@downspace{0}
104 \global\let\tkzmathstyle\displaystyle
105 \def\tkz@legend@line@len{1cm}
106 %<-------------------------- rep ---------------------------------------–>
107 \def\tkz@sur@color{\tkz@mainlinecolor}
108 \def\tkz@sur@colorlabel{\tkz@mainlinecolor}
109 \def\tkz@sur@lw{0.8 pt}
110 \def\tkz@sur@posxlabel{below=2pt}
111 \def\tkz@sur@posylabel{left=2pt}
112 %<-------------------------- grid ---------------------------------------–>
113 \def\tkz@grid@color{gray}
114 \def\tkz@grid@lw{0.4 pt}
115 \def\tkzCoeffSubColor{50}
116 \def\tkzCoeffSubLw{0.8}
117 \def\tkz@grid@xstep{0.2}
118 \def\tkz@grid@ystep{0.2}
119 \def\tkz@init@gradsize{\textstyle}
120 \def\tkzRatioLineGrid{0.75}
121 \def\tkz@gd@sublw{0.4 pt}% size line sub grid
122
123 %<---------------------------- mark -----------------------------------–>
124 \def\tkz@mk@color{\tkz@mainlinecolor}
125 \def\tkz@mk@mark{*}
126 \def\tkz@mk@size{3pt}
127 \def\tkz@mk@fill{\tkz@otherlinecolor}
128 %<--------------------------------------------------------------------------–>
129 %<------------------------- mark angle -----------------------------------–>
130 \def\tkz@euc@mkcolor{\tkz@otherlinecolor}
131 \def\tkz@euc@mkarctype{l}
132 \def\tkz@euc@mksize{4pt}
133 \def\tkz@euc@mkarcsize{1}
134 \def\tkz@euc@markang{none}
135 \def\tkz@euc@mkstyle{solid}
136 \def\tkz@euc@mkpos{.5}
137 \tikzset{%
138 mark style/.style = {%
139 arc = \tkz@euc@mkarctype,
140 color = \tkz@euc@mkcolor,
141 size = \tkz@euc@mkarcsize,
142 style = \tkz@euc@mkstyle,
143 mark = \tkz@euc@markang,
144 pos = \tkz@euc@mkpos}
145 }
146 %<--------------------------------------------------------------------------–>
147 %<------------------------------ styles ---------------------------------–>
148 \def\tkzSetUpStyle[#1]#2{\tikzset{#2/.style={#1}}}% add 2024
149
150 \tikzset{xlabel style/.style = {below = 3 pt,
151 inner sep = 1pt,
152 outer sep = 0pt}
153 }
154 \tikzset{ylabel style/.style = {left = 3 pt,
155 inner sep = 1pt,
156 outer sep = 0pt}}
157 \tikzset{xaxe style/.style = {> = latex, ->}
158 }
159 \tikzset{yaxe style/.style = {> = latex, ->}
160 }
161
162 \tikzset{rep style/.style = { ->,
163 >=latex}
164 }
165
166 \tikzset{mark style/.style = {mark = \tkz@mk@mark,
167 mark size = \tkz@mk@size,
168 mark options = {color= \tkz@mk@color,
169 fill = \tkz@mk@fill
170 }
171 }
172 }
173
174 %<------------------------- Cartesian system -----------------------------–>
175 % Default unity cm
176 % Geometry Euclidean with unity for x and y = 1cm ---> step = 1
177 % 0 ≤ x ≤ 10
178 % 0 ≤ y ≤ 10
179 \def\tkz@init@xorigine{0}
180 \def\tkz@init@yorigine{0}
181 \def\tkz@init@xstep{1}
182 \def\tkz@init@ystep{1}
183 \def\tkz@init@xmin{0}
184 \def\tkz@init@ymin{0}
185 \def\tkz@init@xmax{10}
186 \def\tkz@init@ymax{10}
187 \def\tkz@init@xdec{1}
188 \def\tkz@init@ydec{1}
189 %<---------------------- show coord -----------------------------------–>
190 \tikzset{arrow coord style/.style = {dashed,
191 \tkz@euc@linecolor,
192 > = latex',
193 ->}
194 }
195 \tikzset{xcoord style/.style = {\tkz@euc@labelcolor,
196 font = \normalsize,
197 text height = 1ex,
198 inner sep = 0pt,
199 outer sep = 0pt,
200 fill = \tkz@fillcolor,
201 below = 3pt}
202 }
203 \tikzset{ycoord style/.style = {\tkz@euc@labelcolor,
204 font = \normalsize,
205 text height = 1ex,
206 inner sep = 0pt,
207 outer sep = 0pt,
208 fill = \tkz@fillcolor,
209 left = 3pt}
210 }
211 %
212 \tikzset{help lines/.style=teal!30,ultra thin}
213 %<--------------------------- arrow --------------------------------------–>
214 % Syntax:
215 %
216 % - tkz arrow=<arrow end tip>`
217 % - tkz arrow=<arrow end tip> at <pos> (<pos> = .5 by default)
218 % - tkz arrow={<arrow end tip>[<arrow options>] at <pos>}
219 %
220 %
221 % Example usages:
222 %
223 % \draw[tkz arrow=Stealth] (A) -- (B);
224 % \draw[tkz arrow={To[scale=3] at .3}] (A)-- (B);
225 % \draw[tkz arrow={Latex[scale=5,blue] at .8}] (A)-- (B);
226
227 \tikzset{
228 tkz arrow/.default=Latex,
229 tkz arrow/.code=%
230 {%
231 \pgfutil@in@{ at }{#1}%
232 \ifpgfutil@in@
233 \mytikz@parsearrow#1\mytikz@stop
234 \else
235 \mytikz@parsearrow#1 at .5\mytikz@stop
236 \fi
237 }
238 }
239 \def\mytikz@parsearrow#1 at #2\mytikz@stop{%
240 \pgfutil@in@{[}{#1}%
241 \ifpgfutil@in@
242 \mytikz@parsearrow@opt{#2}#1\mytikz@stop
243 \else
244 \mytikz@parsearrow@opt{#2}#1[]\mytikz@stop
245 \fi
246 }
247
248 % #1 = pos, #2 = arrow end tip, #3 = arrow options
249 \def\mytikz@parsearrow@opt#1#2[#3]\mytikz@stop{%
250 \pgfkeysalso{decoration={
251 markings,
252 mark=at position #1 with {\arrow[#3]{#2}}
253 },
254 postaction={decorate}
255 }%
256 }
257 %<------------------------------------------------------------------------->
258 \tikzset{
259 on each path/.style={
260 decorate,
261 decoration={
262 show path construction,
263 moveto code={},
264 lineto code={
265 \path [#1]
266 (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);
267 },
268 curveto code={
269 \path [#1] (\tikzinputsegmentfirst)
270 .. controls
271 (\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb)
272 ..
273 (\tikzinputsegmentlast);
274 },
275 closepath code={
276 \path [#1]
277 (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);
278 }}}}
279 %<--------------------------- arrows --------------------------------------–>
280 \tikzset{tkz arrows/.style=%
281 {postaction={on each path={tkz arrow={Latex[scale=2,color=black]}}}}}
282 %<--------------------------- vector --------------------------------------–>
283 \tikzset{vector style/.style={>=Latex,->}}
284 %<--------------------------- tkzdotted --------------------------------------–>
285 \tikzset{tkzdotted/.style={%
286 dash pattern=on 0.4\pgflinewidth off #1\pgflinewidth,line cap=round, shorten >=#1\pgflinewidth/2,shorten <=#1\pgflinewidth/2,
287 tkzdotted/.default=8}}
288
289 % \tikzset{tkzreverseclip/.style={insert path={%
290 % (\tkz@xa,\tkz@ya) rectangle (\tkz@xb,\tkz@yb)}}}
291
292 \tikzset{tkzreverseclip/.style={insert path={
293 (current bounding box.south west) --(current bounding box.north west)
294 --(current bounding box.north east) -- (current bounding box.south east)
295 -- cycle} }}
296
297
298 \def\tkzPhi{1.618034}
299 \def\tkzInvPhi{0.618034}
300 \def\tkzSqrtPhi{1.27202}
301 \def\tkzSqrTwo{1.414213}
302 \def\tkzSqrThree{1.7320508}
303 \def\tkzSqrFive{2.2360679}
304 \def\tkzSqrTwobyTwo{0.7071065}
305 \def\tkzPi{3.1415926}
306 \def\tkzEuler{2.71828182}
307
308 \endinput