Debian Codegraph @

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

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