summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-base/latex/tkz-tools-modules.tex
blob: 81525e824a7c61b8eefc05539c8dfd2fd4350aea (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
% tkz-tools-modules
% Copyright 2020 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.
\def\fileversion{3.02c}
\def\filedate{2020/01/24} 
\typeout{2020/01/24 3.02c  tkz-tools-utilities.tex}  
\makeatletter
%<------------- % chargement des modules ---------------------------------->
\def\tkz@obj@all{angles,arcs,compass,defcircles,deflines,defpoints,defpointsby,defpointsrnd,defpointswith,polygons,protractor,sectors,show,triangles}%
\def\tkz@obj@txt{all}
\def\usetkzobj{\pgfutil@ifnextchar[{\use@usetkzobj}{\use@@usetkzobj}}%}
\def\use@usetkzobj[#1]{\use@@usetkzobj{#1}}
\def\use@@usetkzobj#1{% 
  \def\tkz@list{#1}
  \ifx\tkz@obj@txt\tkz@list \edef\tkz@list{\tkz@obj@all}% 
      \else  
      \edef\tkz@list{#1}%
    \fi
  \pgfutil@for\tkz@temp:=\tkz@list\do{%
    \expandafter\ifx\csname tkz@library@\tkz@temp @loaded\endcsname\relax%
      \expandafter\global\expandafter\let\csname tkz@library@\tkz@temp @loaded\endcsname=\pgfutil@empty%
      \expandafter\edef\csname tkz@obj@#1@atcode\endcsname{\the\catcode`\@}
      \expandafter\edef\csname tkz@obj@#1@barcode\endcsname{\the\catcode`\|}
      \catcode`\@=11
      \catcode`\|=12   
      \input tkz-obj-\tkz@temp.tex 
      \catcode`\@=\csname tkz@obj@#1@atcode\endcsname
      \catcode`\|=\csname tkz@obj@#1@barcode\endcsname  
    \fi%
  }%
}%
%<---------------------------------------------------------–>
\def\tkz@tool@all{math-xfp}
\def\tkz@tool@txt{all}

\def\usetkztool{\pgfutil@ifnextchar[{\use@usetkztool}{\use@@usetkztool}}%}
\def\use@usetkztool[#1]{\use@@usetkztool{#1}}
\def\use@@usetkztool#1{% 
  \def\tkz@list{#1}
  \ifx\tkz@tool@txt\tkz@list \edef\tkz@list{\tkz@tool@all}%
      \else
      \edef\tkz@list{#1}%
    \fi
  \pgfutil@for\tkz@temp:=\tkz@list\do{%
    \expandafter\ifx\csname tkz@library@\tkz@temp @loaded\endcsname\relax%
      \expandafter\global\expandafter\let\csname tkz@library@\tkz@temp @loaded\endcsname=\pgfutil@empty%
      \expandafter\edef\csname tkz@tool@#1@atcode\endcsname{\the\catcode`\@}
      \expandafter\edef\csname tkz@tool@#1@barcode\endcsname{\the\catcode`\|}
      \catcode`\@=11
      \catcode`\|=12
      \input tkz-tools-\tkz@temp.tex
      \catcode`\@=\csname tkz@tool@#1@atcode\endcsname
      \catcode`\|=\csname tkz@tool@#1@barcode\endcsname
    \fi%
  }%
}%
\makeatother
\endinput