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
|
% tkz-tools-eu-base.tex
% Copyright 2023 Alain Matthes
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
% This work has the LPPL maintenance status “maintained”.
% The Current Maintainer of this work is Alain Matthes.
\def\fileversion{5.00c}
\def\filedate{2023/01/23}
\typeout{2023/01/23 5.00c tkz-tools-eu-base.tex}
\makeatletter
%<--------------------------------------------------------------------------–>
\global\let\tkz@tmp@xa\tkz@init@xmin% modif 2016
\global\let\tkz@tmp@xb\tkz@init@xmax% modif 2016
\global\let\tkz@tmp@ya\tkz@init@ymin% modif 2016
\global\let\tkz@tmp@yb\tkz@init@ymax% modif 2016
%<--------------------------------------------------------------------------–>
\pgfkeys{
/tkzInit/.cd,
xmin/.store in = \tkz@init@xmin,
xmax/.store in = \tkz@init@xmax,
xstep/.store in = \tkz@init@xstep,
ymin/.store in = \tkz@init@ymin,
ymax/.store in = \tkz@init@ymax,
ystep/.store in = \tkz@init@ystep,
NO/.is if = tkz@init@NO,
NO/.default = true,
xmin = 0,
xmax = 10,
xstep = 1,
ymin = 0,
ymax = 10,
ystep = 1,
NO = false
}
\def\tkzInit{\pgfutil@ifnextchar[{\tkz@Init}{\tkz@Init[]}}
\def\tkz@Init[#1]{%
\pgfqkeys{/tkzInit}{#1}
\ifx\tkzfctloaded\undefined
\else
\tkz@tkzf@fct=0 % only if tkz-fct loaded
\fi
\xdef\tkz@init@xorigine{0}
\xdef\tkz@init@yorigine{0}
\edef\@xsgmin{\fpeval{sign(\tkz@init@xmin)}} % -> -1 or 1
\edef\@xsgmax{\fpeval{sign(\tkz@init@xmax)}}
\edef\@ysgmin{\fpeval{sign(\tkz@init@ymin)}}
\edef\@ysgmax{\fpeval{sign(\tkz@init@ymax)}}
\let\tkz@tmp@xa\tkz@init@xmin %modif 2016
\let\tkz@tmp@xb\tkz@init@xmax %modif 2016
\let\tkz@tmp@ya\tkz@init@ymin %modif 2016
\let\tkz@tmp@yb\tkz@init@ymax %modif 2016
\tkz@init@NOfalse
\ifx\@xsgmin\@xsgmax \tkz@init@NOtrue \fi
\ifx\@ysgmin\@ysgmax \tkz@init@NOtrue \fi
\iftkz@init@NO%
\ifx\@xsgmin\@xsgmax
\edef\tkz@init@xmax{\fpeval{\tkz@init@xmax-\tkz@init@xmin}}
\edef\tkz@init@xorigine{\tkz@init@xmin}
\edef\tkz@init@xmin{0}
\fi
\ifx\@ysgmin\@ysgmax
\edef\tkz@init@ymax{\fpeval{\tkz@init@ymax-\tkz@init@ymin}}
\edef\tkz@init@yorigine{\tkz@init@ymin}
\edef\tkz@init@ymin{0}
\fi
\fi
\edef\tkz@xa{\fpeval{\tkz@init@xmin/\tkz@init@xstep}}
\edef\tkz@xb{\fpeval{\tkz@init@xmax/\tkz@init@xstep}}
\edef\tkz@ya{\fpeval{\tkz@init@ymin/\tkz@init@ystep}}
\edef\tkz@yb{\fpeval{\tkz@init@ymax/\tkz@init@ystep}}
\tkz@getdecimal{\tkz@init@xstep} % amélioration nb dec et integer
\xdef\tkz@init@xdec{\number\c@pgfmath@countb}
\tkz@getdecimal{\tkz@init@ystep}
\xdef\tkz@init@ydec{\number\c@pgfmath@countb}
}%
\def\tkzAddName{\pgfutil@ifnextchar[{\tkz@AddName}{\tkz@AddName[]}}
\def\tkz@AddName[#1]#2{%
\node[above left,#1] at (\pgf@path@lastx,\pgf@path@lasty){#2};
}%
%<--------------------------------------------------------------------------–>
\makeatother
\endinput
|