summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tkz-base/tkz-base.sty
blob: 217b9a127ba626875fa30118a3ff7d7a101c215a (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
% Copyright 2011 by Alain Matthes
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License. 
% This work consists of the main source file interfaces.dtx
% and the derived files 

% tkz-base.sty % this file
% tkz-base.cfg  
% tkz-obj-marks.tex
% tkz-obj-points.tex
% tkz-obj-segments.tex
% tkz-tools-arith.tex
% tkz-tools-base.tex
% tkz-tools-math.tex
% tkz-tools-misc.tex
% tkz-tools-obsolete.tex
% tkz-tools-utilities.tex  
%<--------------------------------------------------------------------------–>
%  Objet :  Outils pour la création de graphiques géométriques
%<--------------------------------------------------------------------------–>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tkz-base}[2018/09/19 1.16 d tkz-base]
\ifx\e@alloc\@undefined
  \RequirePackage{etex}
\fi
\RequirePackage{tikz}   
\usetikzlibrary{calc,%
                arrows,%
                plotmarks,%
                positioning,%
                shapes.misc,%
                decorations,%
                decorations.markings,%
                decorations.pathreplacing,  
                patterns}
%  Pour les les labels sur les axes
\@ifpackageloaded{numprint}{}
{\RequirePackage[autolanguage]{numprint}} %
\RequirePackage{fp}
% pas de messages de la part de fp !
\FPmessagesfalse%
\newdimen\tkzRadius
\newdimen\tkzLength
\newdimen\tkz@radi
\newdimen\tkz@ax
\newdimen\tkz@ay
\newdimen\tkz@bx
\newdimen\tkz@by
\newdimen\tkz@cx
\newdimen\tkz@cy
\newdimen\tkz@dx
\newdimen\tkz@dy
\newif\iftkz@Y@noticks
\newif\iftkz@Y@nograd
\newif\iftkz@Y@orig
\newif\iftkz@Y@unit
\newif\iftkz@X@noticks
\newif\iftkz@X@nograd
\newif\iftkz@X@orig
\newif\iftkz@X@unit
\global\def\tkz@mathresult{}
%<---------------------------  colors --------------------------------------->
\def\tkz@backgroundcolor{white}
\def\tkz@textcolor{black}   
\global\edef\tkz@fillcolor{\tkz@backgroundcolor}    
\global\edef\tkz@mainlinecolor{\tkz@textcolor} 
\global\edef\tkz@otherlinecolor{\tkz@mainlinecolor!50}  
\tikzset{%
    add/.style args={#1 and #2}{
        to path={%
 ($(\tikztostart)!-#1!(\tikztotarget)$)--($(\tikztotarget)!-#2!(\tikztostart)$)%
  \tikztonodes}}
} 
%<---------   axes cartesian system  ---------------------------------------–>  
\global\edef\tkz@init@color{\tkz@textcolor} 
\global\def\tkz@init@lw{0.4 pt}
\global\edef\tkz@init@gradsize{\textstyle}
\global\def\tkz@init@xlabel{$x$}
\global\def\tkz@init@ylabel{$y$}  
\global\def\tkz@init@tickwd{0.8 pt}
\global\def\tkz@init@ticka{2 pt}  
\global\def\tkz@init@tickb{2 pt}
\global\def\tkz@init@rightspace{.5} 
\global\def\tkz@init@leftspace{0}
\global\def\tkz@init@upspace{.5}
\global\let\tkzmathstyle\displaystyle  
\global\def\tkz@init@downspace{0}
%<------------------------------  styles   ---------------------------------–>
\tikzset{xlabel style/.style={below=3 pt,
                              inner sep = 1pt,
                              outer sep = 0pt}}
\tikzset{xaxe style/.style ={>=latex,->}}
\tikzset{ylabel style/.style={left = 3 pt,
                              inner sep = 1pt,
                              outer sep = 0pt}}
\tikzset{yaxe style/.style ={>=latex,->}}   
%<--------------------------   rep  ---------------------------------------–>
\global\edef\tkz@sur@color{\tkz@mainlinecolor}
\global\edef\tkz@sur@colorlabel{\tkz@mainlinecolor}
\global\def\tkz@sur@lw{0.8 pt}
\global\def\tkz@sur@posxlabel{below=2pt}
\global\def\tkz@sur@posylabel{left=2pt}
\tikzset{rep style/.style={->,>=latex}}    
%<--------------------------   grid  ---------------------------------------–>
\global\edef\tkz@grid@color{gray}
\global\def\tkz@grid@lw{0.4 pt}
\global\def\tkzCoeffSubColor{50} 
\global\def\tkzCoeffSubLw{0.8}
\global\def\tkz@grid@xstep{0.2}
\global\def\tkz@grid@ystep{0.2}   
%<--------------------------   line  ---------------------------------------–>
\global\edef\tkz@euc@linecolor{\tkz@mainlinecolor}
\global\def\tkz@euc@linewidth{0.6pt}
\global\def\tkz@euc@linestyle{solid}
\global\def\tkz@euc@lineleft{.2}
\global\def\tkz@euc@lineright{.2}
\global\def\tkz@legend@line@len{1cm}
\tikzset{line style/.style={%
         line width = \tkz@euc@linewidth,
         color      = \tkz@euc@linecolor,
         style      = \tkz@euc@linestyle,
         add        = {\tkz@euc@lineleft} and {\tkz@euc@lineright}}
         }
%<--------------------------    points   -----------------------------------–>
\global\edef\tkz@euc@pointshape{circle}
\global\edef\tkz@euc@pointcolor{\tkz@mainlinecolor}
\global\edef\tkz@euc@labelcolor{\tkz@mainlinecolor} 
\global\def\tkz@euc@pointsize{6}
\global\def\tkz@euc@pointpos{below right}
\global\edef\tkz@euc@segmentcolor{\tkz@mainlinecolor}
\global\edef\tkz@euc@circlecolor{\tkz@mainlinecolor}
\tikzset{point style/.style={draw         = \tkz@euc@pointcolor,
                             inner sep    = 0pt,
                             shape        = \tkz@euc@pointshape,
                             minimum size = \tkz@euc@pointsize*\pgflinewidth,
                             fill         = \tkz@euc@pointcolor!50}}  
%<-------------------------    compass   -----------------------------------–> 
\global\edef\tkz@euc@compasscolor{\tkz@otherlinecolor}
\global\def\tkz@euc@compasswidth{0.4pt}
\global\def\tkz@euc@compassstyle{solid}  
\tikzset{compass style/.style={color      = \tkz@euc@compasscolor,
                               line width = \tkz@euc@compasswidth,
                               style      = \tkz@euc@compassstyle}}   
%<----------------------------    mark   -----------------------------------–> 
\global\edef\tkz@mk@color{\tkz@mainlinecolor}   
\global\edef\tkz@mk@mark{*}
\global\edef\tkz@mk@size{3pt}
\global\edef\tkz@mk@fill{\tkz@otherlinecolor} 
\tikzset{mark style/.style={mark=\tkz@mk@mark,mark size=\tkz@mk@size,mark options={color=\tkz@mk@color,fill=\tkz@mk@fill}}} 
%<----------------------    show coord   -----------------------------------–> 
\tikzset{arrow coord style/.style={dashed,
                             \tkz@euc@linecolor,
                             >=latex',
                             ->}}
\tikzset{xcoord style/.style={\tkz@euc@labelcolor,
                           font=\normalsize,text height=1ex,
                           inner sep = 0pt,
                           outer sep = 0pt,
                           fill=\tkz@fillcolor,
                           below=3pt}} 
\tikzset{ycoord style/.style={\tkz@euc@labelcolor,
                           font=\normalsize,text height=1ex, 
                           inner sep = 0pt,
                           outer sep = 0pt, 
                           fill=\tkz@fillcolor,
                           left=3pt}}  
%<---------------------------  vector --------------------------------------–>
\tikzset{vector style/.style={>=latex,->}}   
%<------------------------- Cartesian system   -----------------------------–>
% Default
% Geometry Euclidean  with unity for x and y = 1cm ---> step=1
% 0 ≤ x ≤ 10
% 0 ≤ y ≤ 10
\xdef\tkz@init@xorigine{0}
\xdef\tkz@init@yorigine{0}
\xdef\tkz@init@xstep{1}
\xdef\tkz@init@ystep{1}
\xdef\tkz@init@xmin{0}
\xdef\tkz@init@ymin{0}
\xdef\tkz@init@xmax{10}
\xdef\tkz@init@ymax{10}
\xdef\tkz@init@xdec{1}
\xdef\tkz@init@ydec{1}     

\input{tkz-tools-utilities}% obligatoire   
\input{tkz-tools-arith}% used only for axis
\input{tkz-tools-base}
\input{tkz-tools-misc}
\input{tkz-tools-math}
\input{tkz-obj-points}
\input{tkz-obj-segments}
\input{tkz-obj-marks} 
\endinput