summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tkz/tkz-elements/doc/latex/TKZdoc-elements-main.tex
blob: 6540ebffaf8cc406a24be089d9dc1c32f5206be1 (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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
% !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.40c}
\gdef\tkzdateofpack{\today}
\gdef\tkznameofdoc{tkz-elements.pdf}
\gdef\tkzversionofdoc{1.40c}
\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{fourier-otf}
\let\rmfamily\ttfamily
\usepackage{multicol,lscape,wrapfig}
\usepackage[english]{babel}
\usepackage[normalem]{ulem}
\usepackage{multirow,multido,booktabs,cellspace}
\usepackage{shortvrb,bookmark,caption} 
\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. \\ This version \tkzversionofpack\ is a beta version.\\
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}.

\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}