% tkz-base.cfg
% Copyright 2024  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.
% If you modify this original file, YOUR CHANGES WILL BE LOST when it is
% updated.  Instead, put your changes in the entire copy of tkz-base.cfg 
% and save the file in a directory  part of your TEXINPUTS environment 
% variable. 

\def\fileversion{4.21c}
\def\filedate{2024/01/16} 
\typeout{2024/01/16 4.21c tkz-base.cfg}
%<------   colors  ---------------------------------------–> 
\def\tkz@backgroundcolor{white}
\def\tkz@textcolor{black}  
%<---------------------------------------------------------
\def\tkz@fillcolor{\tkz@backgroundcolor}    
\def\tkz@mainlinecolor{\tkz@textcolor} 
\def\tkz@otherlinecolor{\tkz@mainlinecolor!50} 
%<--------------------------    points   -----------------------------------–>
\def\tkz@euc@pointshape{circle}
\def\tkz@euc@pointcolor{\tkz@mainlinecolor}
\def\tkz@euc@labelcolor{\tkz@mainlinecolor} 
\def\tkz@euc@pointsize{2}
\def\tkz@euc@pointpos{below right}
\def\tkz@euc@segmentcolor{\tkz@mainlinecolor}
\def\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,
                               fill         = \tkz@euc@pointcolor
                               }
        }  
% label for the point 
\tikzset{label style/.style={ below, \tkz@euc@labelcolor,
                                font = \normalsize}
                                }
\tikzset{label angle style/.style={ \tkz@euc@labelcolor,
                                font = \normalsize}
                                }                                   
%<--------------------------   line  ---------------------------------------–>
\def\tkz@euc@linecolor{\tkz@mainlinecolor}
\def\tkz@euc@linewidth{0.2pt}
\def\tkz@euc@linestyle{solid}
\def\tkz@euc@lineleft{.2}
\def\tkz@euc@lineright{.2}
\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},
    line cap   = round
    }
}
%<-------------------------    circle   -----------------------------------–>   
\def\tkz@euc@circlelw{\tkz@euc@linewidth}
\def\tkz@euc@circlecolor{\tkz@otherlinecolor}
\def\tkz@euc@circlestyle{solid}
\tikzset{%
circle style/.style         = {%
    color         = \tkz@euc@circlecolor,
    line width    = \tkz@euc@circlelw,
    style         = \tkz@euc@circlestyle}
}
\tikzset{label circle style/.style = {%
    color      = \tkz@mainlinecolor}
}
%<-------------------------    compass   -----------------------------------–> 
\def\tkz@euc@compasscolor{\tkz@otherlinecolor}
\def\tkz@euc@compasswidth{\tkz@euc@linewidth}
\def\tkz@euc@compassstyle{solid} 
\tikzset{%
compass style/.style         = {%
    color         = \tkz@euc@compasscolor,
    line width    = \tkz@euc@compasswidth,
    style         = \tkz@euc@compassstyle}
} 
%<-------------------------    arc   -----------------------------------–> 
\def\tkz@euc@arclw{\tkz@euc@linewidth}
\def\tkz@euc@arccolor{\tkz@mainlinecolor}
\def\tkz@euc@arcstyle{solid}
\tikzset{%
arc style/.style={%
    color     = \tkz@euc@arccolor,
    line width  = \tkz@euc@linewidth}
}               
%<------   axes cartesian system  ---------------------------------------–>   
\def\tkz@init@color{\tkz@textcolor}
\def\tkz@init@lw{0.4 pt}
\def\tkz@init@tickwd{0.8 pt}
\def\tkz@init@ticka{2 pt}  
\def\tkz@init@tickb{2 pt}
\def\tkz@init@xlabel{$x$}
\def\tkz@init@ylabel{$y$}
\def\tkz@init@tickb{2 pt}
\def\tkz@init@rightspace{.5} 
\def\tkz@init@leftspace{0}
\def\tkz@init@upspace{.5} 
\def\tkz@init@downspace{0}
\global\let\tkzmathstyle\displaystyle
\def\tkz@legend@line@len{1cm}
%<--------------------------   rep  ---------------------------------------–>
\def\tkz@sur@color{\tkz@mainlinecolor}
\def\tkz@sur@colorlabel{\tkz@mainlinecolor}
\def\tkz@sur@lw{0.8 pt}
\def\tkz@sur@posxlabel{below=2pt}
\def\tkz@sur@posylabel{left=2pt}
%<--------------------------   grid  ---------------------------------------–>
\def\tkz@grid@color{gray}
\def\tkz@grid@lw{0.4 pt}
\def\tkzCoeffSubColor{50} 
\def\tkzCoeffSubLw{0.8}
\def\tkz@grid@xstep{0.2}
\def\tkz@grid@ystep{0.2} 
\def\tkz@init@gradsize{\textstyle}
\def\tkzRatioLineGrid{0.75} 
\def\tkz@gd@sublw{0.4 pt}% size line sub grid
 
%<----------------------------    mark   -----------------------------------–> 
\def\tkz@mk@color{\tkz@mainlinecolor}
\def\tkz@mk@mark{*}
\def\tkz@mk@size{3pt}
\def\tkz@mk@fill{\tkz@otherlinecolor} 
%<--------------------------------------------------------------------------–>
%<------------------------------  styles   ---------------------------------–>
\def\tkzSetUpStyle[#1]#2{\tikzset{#2/.style={#1}}}% add 2024

\tikzset{xlabel style/.style                =   {below      =   3 pt,
                                                inner sep   =   1pt,
                                                outer sep   =   0pt}
                                                }                                       
\tikzset{ylabel style/.style                =   {left       =   3 pt,
                                                inner sep   =   1pt,
                                                outer sep   =   0pt}}
\tikzset{xaxe style/.style                  =   {>          =   latex,  ->}
}  
\tikzset{yaxe style/.style                  =   {>          =   latex,  ->}
}    
        
\tikzset{rep style/.style       = { ->,
                                    >=latex}
                                }                             

\tikzset{mark style/.style            =  {mark         =    \tkz@mk@mark,
                                          mark size    =    \tkz@mk@size,
                                          mark options = {color= \tkz@mk@color,
                                          fill         = \tkz@mk@fill
                                                 }
                                }
}

%<------------------------- Cartesian system   -----------------------------–>
% Default unity cm
% Geometry Euclidean  with unity for x and y = 1cm ---> step = 1
% 0 ≤ x ≤ 10
% 0 ≤ y ≤ 10
\def\tkz@init@xorigine{0}
\def\tkz@init@yorigine{0}
\def\tkz@init@xstep{1}
\def\tkz@init@ystep{1}
\def\tkz@init@xmin{0}
\def\tkz@init@ymin{0}
\def\tkz@init@xmax{10}
\def\tkz@init@ymax{10}
\def\tkz@init@xdec{1}
\def\tkz@init@ydec{1}  
%<----------------------    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}
                                        }  
%
\tikzset{help lines/.style=teal!30,ultra thin}
%<---------------------------  arrow --------------------------------------–>
% Syntax:
%
%  - tkz arrow=<arrow end tip>`
%  - tkz arrow=<arrow end tip> at <pos> (<pos> = .5 by default)
%  - tkz arrow={<arrow end tip>[<arrow options>] at <pos>}
%
%
% Example usages:
%
% \draw[tkz arrow=Stealth] (A) -- (B);
% \draw[tkz arrow={To[scale=3] at .3}] (A)-- (B);
% \draw[tkz arrow={Latex[scale=5,blue] at .8}] (A)-- (B);

\tikzset{
tkz arrow/.default=Latex,
  tkz arrow/.code=%
  {%
    \pgfutil@in@{ at }{#1}%
    \ifpgfutil@in@
      \mytikz@parsearrow#1\mytikz@stop
    \else
      \mytikz@parsearrow#1 at .5\mytikz@stop
    \fi
  }
}
\def\mytikz@parsearrow#1 at #2\mytikz@stop{%
  \pgfutil@in@{[}{#1}%
  \ifpgfutil@in@
    \mytikz@parsearrow@opt{#2}#1\mytikz@stop
  \else
    \mytikz@parsearrow@opt{#2}#1[]\mytikz@stop
  \fi
}

% #1 = pos, #2 = arrow end tip, #3 = arrow options
\def\mytikz@parsearrow@opt#1#2[#3]\mytikz@stop{%
  \pgfkeysalso{decoration={
      markings,
      mark=at position #1 with {\arrow[#3]{#2}}
    },
    postaction={decorate}
  }%
}
%<------------------------------------------------------------------------->
\tikzset{
   on each path/.style={
    decorate,
    decoration={
      show path construction,
      moveto code={},
      lineto code={
        \path [#1]
        (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);
      },
      curveto code={
        \path [#1] (\tikzinputsegmentfirst)
        .. controls
        (\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb)
        ..
        (\tikzinputsegmentlast);
      },
      closepath code={
        \path [#1]
        (\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);
      }}}}
 %<---------------------------  arrows --------------------------------------–>          
\tikzset{tkz arrows/.style=%
{postaction={on each path={tkz arrow={Latex[scale=2,color=black]}}}}}   
%<---------------------------  vector --------------------------------------–>
\tikzset{vector style/.style={>=Latex,->}}
%<---------------------------  tkzdotted --------------------------------------–>
\tikzset{tkzdotted/.style={%
    dash pattern=on 0.4\pgflinewidth off #1\pgflinewidth,line cap=round, shorten >=#1\pgflinewidth/2,shorten <=#1\pgflinewidth/2,
    tkzdotted/.default=8}}
    
% \tikzset{tkzreverseclip/.style={insert path={%
%   (\tkz@xa,\tkz@ya) rectangle (\tkz@xb,\tkz@yb)}}}
  
\tikzset{tkzreverseclip/.style={insert path={
  (current bounding box.south west) --(current bounding box.north west)
   --(current bounding box.north east) --  (current bounding box.south east)
   -- cycle} }}
   

\def\tkzPhi{1.618034}
\def\tkzInvPhi{0.618034}
\def\tkzSqrtPhi{1.27202}
\def\tkzSqrTwo{1.414213}
\def\tkzSqrThree{1.7320508}
\def\tkzSqrFive{2.2360679}
\def\tkzSqrTwobyTwo{0.7071065}
\def\tkzPi{3.1415926}
\def\tkzEuler{2.71828182}

\endinput