% !TEX TS-program = lualatex
% encoding : utf8 
% Documentation of tkz-elements v1.40c
% 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.
\PassOptionsToPackage{unicode}{hyperref}

\documentclass[DIV         = 14,
               fontsize    = 10,
               index       = totoc,
               twoside,
               cadre,
               headings    = small
               ]{tkz-doc}
\gdef\tkznameofpack{tkz-elements}
\gdef\tkzversionofpack{1.60c}
\gdef\tkzdateofpack{\today}
\gdef\tkznameofdoc{tkz-elements.pdf}
\gdef\tkzversionofdoc{1.60c}
\gdef\tkzdateofdoc{\today}
\gdef\tkzauthorofpack{Alain Matthes}
\gdef\tkzadressofauthor{}
\gdef\tkznamecollection{AlterMundus}
\gdef\tkzurlauthor{http://altermundus.fr}
\gdef\tkzengine{lualatex}
\gdef\tkzurlauthorcom{http://altermundus.fr}
\nameoffile{\tkznameofpack}
% -- Packages ---------------------------------------------------  
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{calc}
\usepackage{tkz-base}
\usepackage{tkz-euclide}
\usepackage{tkz-elements}
\usepackage{pgfornament}
\usetikzlibrary{backgrounds}
\usetikzlibrary{mindmap}
\usetikzlibrary{shapes.multipart}
\usepackage[colorlinks,pdfencoding=auto, psdextra]{hyperref}
\hypersetup{
      linkcolor=Gray,
      citecolor=Green,
      filecolor=Mulberry,
      urlcolor=orange,
      menucolor=Gray,
      runcolor=Mulberry,
      linkbordercolor=Gray,
      citebordercolor=Green,
      filebordercolor=Mulberry,
      urlbordercolor=NavyBlue,
      menubordercolor=Gray,
      runbordercolor=Mulberry,
      pdfsubject={Euclidean Geometry},
      pdfauthor={\tkzauthorofpack},
      pdftitle={\tkznameofpack},
      pdfcreator={\tkzengine}
}
\usepackage{tkzexample}
\usepackage{fontspec}
\setmainfont{texgyrepagella}[
  Extension = .otf,
  UprightFont = *-regular ,
  ItalicFont  = *-italic  ,
  BoldFont    = *-bold    ,
  BoldItalicFont = *-bolditalic
]
\setsansfont{texgyreheros}[
  Extension = .otf,
  UprightFont = *-regular ,
  ItalicFont  = *-italic  ,
  BoldFont    = *-bold    ,
  BoldItalicFont = *-bolditalic ,
]

\setmonofont{lmmono10-regular.otf}[
  Numbers={Lining,SlashedZero},
  ItalicFont=lmmonoslant10-regular.otf,
  BoldFont=lmmonolt10-bold.otf,
  BoldItalicFont=lmmonolt10-boldoblique.otf,
]
\newfontfamily\ttcondensed{lmmonoltcond10-regular.otf}
%% (La)TeX font-related declarations:
\linespread{1.05}  % Pagella needs more space between lines
%\usepackage[math-style=literal,bold-style=literal]{unicode-math}
\usepackage{unicode-math} 
\usepackage{fourier-otf}
\setmathfont{Concrete-Math.otf}
\let\rmfamily\ttfamily
\usepackage{multicol,lscape,wrapfig}
\usepackage[english]{babel}
\usepackage[normalem]{ulem}
\usepackage{multirow,multido,booktabs,cellspace}
\usepackage{shortvrb,bookmark,caption,enumitem} 
\usepackage{makeidx}
\usepackage[most]{tcolorbox}

\newtcolorbox{mybox}{
enhanced,
boxrule=0pt,frame hidden,
borderline west={4pt}{0pt}{darkgray!50!white},
colback=lightgray!10!white,
sharp corners
}
%\usepackage{float}
\makeindex 

\makeatletter
\renewenvironment{theindex}
   {\section*{\indexname}\begin{multicols}{2}%
    \@mkboth{\MakeUppercase\indexname}%
  {\MakeUppercase\indexname}%
    \thispagestyle{plain}\parindent\z@
    \parskip\z@ \@plus .3\p@\relax
    \columnseprule \z@
    \columnsep 35\p@
    \let\item\@idxitem}
   {\end{multicols}}
\makeatother
\newcommand*{\tkzfname}[1]{\Amacro{#1}\textbf{\texttt{\textcolor{MidnightBlue}{%
 #1}}}}
 \newcommand*{\tkzmname}[1]{\Amacro{#1}\textbf{\texttt{\textcolor{MidnightBlue}{%
#1}}}}
 \newcommand*{\tkzaname}[1]{\Amacro{#1}\textbf{\texttt{\textcolor{MidnightBlue}{%
#1}}}}  
\def\langle{} \def\rangle{}
\renewcommand*{\IargName}[2]{\texttt{#2}\index{#1_2@\texttt{#1: argument(s)}!\texttt{#2}}}
\newcommand*{\Amacro}[1]{\index{#1_1@\texttt{#1}}}
\renewcommand*{\IoptName}[2]{\texttt{#2}\index{#1_3@\texttt{#1: attribute(s)}!\texttt{#2}}}
\newcommand*{\Iattr}[2]{\texttt{#2}\index{#1_3@\texttt{#1:  attribute}!\texttt{#2}}}
\newcommand*{\Imeth}[2]{\texttt{#2}\index{#1_3@\texttt{#1:  method}!\texttt{#2}}}
\newcommand*{\Igfct}[2]{\texttt{#2}\index{#1_3@\texttt{#1:  function}!\texttt{#2}}}
\newcommand*{\Iclass}[1]{\texttt{#1}\index{Class !#1@\texttt{#1}}}
\newcommand*{\tkzNameObj}[1]{\tkzname{#1}\Iobj{#1}}
\newcommand*{\Iobj}[1]{\index{Object_1@\texttt{Object}!\texttt{#1}}}
\newcommand*{\tkzRBomb}{\textcolor{red}{\bomb}}
\newcommand*{\IEmacro}[1]{\index{#1_1@\texttt{\textbackslash#1}}\texttt{#1}}
\newcommand*{\tkzimpbf}[1]{\texttt{\textbf{#1}}}
\newcommand*{\tkzEHand}{\textcolor{red}{\lefthand}}
%<---------------------------------------------------------------------------> 
% settings styles
\tkzSetUpColors[background=white,text=black]  
\tkzSetUpCompass[color=orange, line width=.2pt,delta=10]
\tkzSetUpArc[color=gray,line width=.2pt]
\tkzSetUpPoint[size=2,color=teal]
\tkzSetUpLine[line width=.2pt,color=teal]
\tkzSetUpStyle[color=orange,line width=.2pt]{new}
\tikzset{every picture/.style={line width=.2pt}}
\tikzset{label angle style/.append style={color=teal,font=\footnotesize}} 
\tikzset{label style/.append style={below,color=teal,font=\scriptsize}}
\tikzset{new/.style={color=orange,line width=.2pt}} 
\def\tkzar{\hspace{1em}-->\hspace{1em}}

\makeatletter\let\percentchar\@percentchar\makeatother
\def\luaveclen#1#2{%
\directlua{tex.print(string.format(
'\percentchar.5f',math.sqrt((#1)*(#1)+(#2)*(#2))))
}}
% printnumber

\let\pmpn\pgfmathprintnumber

\AtBeginDocument{\MakeShortVerb{\|}} % link to shortvrb
\begin{document} 
  
\parindent=0pt
\tkzTitleFrame{tkz-elements \tkzversionofpack\\Euclidean Geometry}
\clearpage

\defoffile{\lefthand\
 This document brings together some notes about  \tkzname{\tkznameofpack}, the first version of a library written in lua, allowing to make all the necessary calculations to define the objects of a Euclidean geometry figure. You need to compile with Lua\LaTeX.\\ With \pkg{tkz-elements}, the definitions and calculations are only done with \pkg{lua}. \\ The main possibility of programmation  proposed is oriented "object programming" with object classes like point, line, triangle, circle and ellipse.  For the moment, once the calculations are done, it is \pkg{tkz-euclide} or   \pkg{TikZ} which allows the drawings.\\
 I discovered Lua and object-oriented programming when I created this package, so it's highly probable that I've made a few mistakes.  If you'd like to participate in the development of this package or give me advice on how to proceed, please contact me via my email. \\
English is  not my native language so there  might be some errors.
}

\presentation

\vspace*{1cm}

\lefthand\ Acknowledgements : I received much valuable advice, remarks, corrections  from \\ \tkzimp{Nicolas Kisselhoff}, \tkzimp{David Carlisle}, \tkzimp{Roberto Giacomelli} and \tkzimp{Qrrbrbirlbel}.\\
 Thanks to Wolfgang Büchel, for correcting the examples.

\vspace*{12pt}
\lefthand\ I would also like to thank \tkzimp{Eric Weisstein}, creator of 
\href{http://mathworld.wolfram.com/about/author.html}{MathWorld}.

\vspace*{12pt}
\lefthand\ You can find some examples on my site:
\href{http://altermundus.fr}{altermundus.fr}. \hspace{2cm} under construction!

\vfill
Please report typos or any other comments to this documentation to: \href{mailto:al.ma@mac.com}{\textcolor{blue}{Alain Matthes}}.

This file can be redistributed and/or modified under the terms of the \LaTeX{} 
Project Public License Distributed from \href{http://www.ctan.org/}{CTAN}\  archives.

\clearpage
\tableofcontents

\clearpage
\newpage
\input{TKZdoc-elements-structure.tex}
\input{TKZdoc-elements-why.tex}
\input{TKZdoc-elements-presentation.tex}
\input{TKZdoc-elements-convention.tex}
\input{TKZdoc-elements-transferts.tex}
\input{TKZdoc-elements-classes.tex}
\input{TKZdoc-elements-classes-point.tex}
\input{TKZdoc-elements-classes-line.tex}
\input{TKZdoc-elements-classes-circle.tex}
\input{TKZdoc-elements-classes-triangle.tex}
\input{TKZdoc-elements-classes-ellipse.tex}
\input{TKZdoc-elements-classes-quadrilateral.tex}
\input{TKZdoc-elements-classes-square.tex}
\input{TKZdoc-elements-classes-rectangle.tex}
\input{TKZdoc-elements-classes-parallelogram.tex}
\input{TKZdoc-elements-classes-regular.tex}
\input{TKZdoc-elements-classes-misc.tex}
\input{TKZdoc-elements-intersection.tex}
\input{TKZdoc-elements-indepthstudy.tex}
\input{TKZdoc-elements-examples.tex}

\clearpage\newpage
\small\printindex
\end{document}