| 1 |
% tkz-euclide.sty |
| 2 |
% Copyright 2011-2026 Alain Matthes |
| 3 |
% SPDX-License-Identifier: LPPL-1.3c |
| 4 |
% Maintainer: Alain Matthes |
| 5 |
|
| 6 |
%--------------------------------------------------------------- |
| 7 |
\def\fileversion{5.13c} |
| 8 |
\def\filedate{2026/01/25} |
| 9 |
\typeout{2026/01/25 5.13c tkz-euclide.sty} |
| 10 |
\NeedsTeXFormat{LaTeX2e} |
| 11 |
\ProvidesPackage{tkz-euclide}[ 2026/01/25 5.13c for pure Euclidean Geometry ] |
| 12 |
\newif\if@tkzlua |
| 13 |
\@tkzluafalse |
| 14 |
\DeclareOption{lua}{\@tkzluatrue} |
| 15 |
\newif\if@tkzmini |
| 16 |
\@tkzminifalse |
| 17 |
\DeclareOption{mini}{\@tkzminitrue} |
| 18 |
\ProcessOptions\relax |
| 19 |
|
| 20 |
\@ifpackageloaded{tkz-base}{ |
| 21 |
\newdimen\tkzRadius |
| 22 |
\newdimen\tkzLength |
| 23 |
\newdimen\tkz@radi |
| 24 |
\newif\iftkz@line@normed |
| 25 |
\newif\ifnormtkzcode@execute% german ? right angle |
| 26 |
%---------------------- semi circle |
| 27 |
\newif\iftkz@swap@sc |
| 28 |
\newif\iftkz@line@normed |
| 29 |
%--------------------- circles |
| 30 |
\newif\iftkzClipOutCircle |
| 31 |
%--------------------- polygons |
| 32 |
\newif\iftkzClipOutPoly |
| 33 |
%--------------------- triangles |
| 34 |
\newif\iftkz@swap@tr |
| 35 |
\newif\iftkz@permute |
| 36 |
%--------------------- intersections |
| 37 |
\newif\iftkzFlagLC\tkzFlagLCfalse |
| 38 |
\newif\iftkzFlagCC\tkzFlagCCfalse |
| 39 |
\newif\iftkz@near\tkz@nearfalse |
| 40 |
%--------------------- |
| 41 |
\newif\iftkzLinear\tkzLinearfalse |
| 42 |
\newif\iftkzOrtho\tkzOrthofalse |
| 43 |
}{ |
| 44 |
\RequirePackage{tikz} |
| 45 |
\usetikzlibrary{angles, |
| 46 |
arrows, |
| 47 |
arrows.meta, |
| 48 |
backgrounds, |
| 49 |
calc, |
| 50 |
decorations, |
| 51 |
decorations.markings, |
| 52 |
decorations.pathreplacing, |
| 53 |
decorations.shapes, |
| 54 |
decorations.text, |
| 55 |
decorations.pathmorphing, |
| 56 |
intersections, |
| 57 |
math, |
| 58 |
plotmarks, |
| 59 |
positioning, |
| 60 |
quotes, |
| 61 |
shapes.misc, |
| 62 |
through |
| 63 |
} |
| 64 |
\RequirePackage{xfp} |
| 65 |
\usepackage{xpatch} |
| 66 |
\xpatchcmd\pgfmathreciprocal@@ {\[email protected]\pgfmath@y\[email protected]\pgfmath@y\[email protected]\pgfmath@y\[email protected]\pgfmath@y} |
| 67 |
{\pgfmath@y\dimexpr\pgfmath@y/10000\relax} |
| 68 |
{}{\PatchFailed} |
| 69 |
|
| 70 |
%------------------------------- |
| 71 |
\newdimen\tkzRadius |
| 72 |
\newdimen\tkzLength |
| 73 |
\newdimen\tkz@radi |
| 74 |
%------------------------------- |
| 75 |
% tkz registres |
| 76 |
\newdimen\tkz@ax |
| 77 |
\newdimen\tkz@ay |
| 78 |
\newdimen\tkz@bx |
| 79 |
\newdimen\tkz@by |
| 80 |
\newdimen\tkz@cx |
| 81 |
\newdimen\tkz@cy |
| 82 |
\newdimen\tkz@dx |
| 83 |
\newdimen\tkz@dy |
| 84 |
%--------------------- points |
| 85 |
\newif\iftkz@polar\tkz@polarfalse |
| 86 |
\newif\iftkz@pt@polar |
| 87 |
\newif\iftkz@pt@show |
| 88 |
\newif\iftkz@pt@noname |
| 89 |
\newif\iftkz@coord@noxdraw |
| 90 |
\newif\iftkz@coord@noydraw |
| 91 |
\newif\iftkz@vec@normed |
| 92 |
%--------------------- lines |
| 93 |
\newif\iftkz@line@normed |
| 94 |
%--------------------- circles |
| 95 |
\newif\iftkzClipOutCircle |
| 96 |
%--------------------- polygons |
| 97 |
\newif\iftkzClipOutPoly |
| 98 |
%--------------------- triangles |
| 99 |
\newif\iftkz@swap@tr |
| 100 |
\newif\iftkz@permute |
| 101 |
%--------------------- intersections |
| 102 |
\newif\iftkzFlagLC\tkzFlagLCfalse |
| 103 |
\newif\iftkzFlagCC\tkzFlagCCfalse |
| 104 |
\newif\iftkz@near\tkz@nearfalse |
| 105 |
%--------------------- utilities |
| 106 |
\newif\iftkzLinear\tkzLinearfalse |
| 107 |
\newif\iftkzOrtho\tkzOrthofalse |
| 108 |
%--------------------- tkz axis |
| 109 |
\newif\iftkz@X@noticks |
| 110 |
\newif\iftkz@Y@noticks |
| 111 |
\newif\iftkz@X@nograd |
| 112 |
\newif\iftkz@Y@nograd |
| 113 |
\newif\iftkz@X@orig |
| 114 |
\newif\iftkz@Y@orig |
| 115 |
\newif\iftkz@X@unit |
| 116 |
\newif\iftkz@Y@unit |
| 117 |
\newif\iftkz@np |
| 118 |
\newif\iftkz@swap |
| 119 |
\newif\iftkz@init@NO |
| 120 |
\newif\iftkz@integer |
| 121 |
\newif\iftkz@Rep@orig%---------------------- Rep |
| 122 |
\newif\iftkzLengthIncm%--------------------- Math |
| 123 |
\newif\iftkz@sop@show%---------------------- marks |
| 124 |
\newif\iftkz@equi@show |
| 125 |
\newif\iftkz@gd@sub% sub grid ?%--------------------- about grid |
| 126 |
\newif\iftkz@node\tkz@nodefalse |
| 127 |
\newif\iftkz@legend@line%--------------------- legend |
| 128 |
\newif\iftkz@TestSubString |
| 129 |
\newif\ifnormtkzcode@execute% german ? right angle |
| 130 |
\newif\iftkz@swap@sc%---------------------- semi circle |
| 131 |
\newif\ifpgf@unknown % math arith |
| 132 |
\newif\ifpgf@isaprime |
| 133 |
\newcount\tkz@cntmk |
| 134 |
\newif\iftkz@RappReturn % protractor |
| 135 |
\newif\iftkz@RappFull |
| 136 |
%------------------------------------------------------------------------------- |
| 137 |
% Init |
| 138 |
\def\tkz@xa{0} |
| 139 |
\def\tkz@xb{10} |
| 140 |
\def\tkz@ya{0} |
| 141 |
\def\tkz@yb{10} |
| 142 |
\def\tkz@mathresult{} |
| 143 |
\InputIfFileExists{tkz-euclide.cfg}{% |
| 144 |
\typeout{Local configuration file tkz-euclide.cfg found and used}}{% |
| 145 |
\typeout{tkz-euclide.cfg not found}} |
| 146 |
} |
| 147 |
%------------------------------------------------------------------------------- |
| 148 |
\def\tkz@tmp@xa{-5} |
| 149 |
\def\tkz@tmp@xb{+5} |
| 150 |
\def\tkz@tmp@ya{-5} |
| 151 |
\def\tkz@tmp@yb{+5} |
| 152 |
%------------------------------------------------------------------------------- |
| 153 |
\DeclareOption*{} |
| 154 |
\ProcessOptions |
| 155 |
%<----------------------------------------------------------> |
| 156 |
% Initialisation |
| 157 |
%<----------------------------------------------------------> |
| 158 |
|
| 159 |
\if@tkzlua |
| 160 |
\RequirePackage{luacode} |
| 161 |
\fi |
| 162 |
\if@tkzmini |
| 163 |
\@tkzluatrue |
| 164 |
\RequirePackage{luacode} |
| 165 |
\@ifpackageloaded{tkz-base}{}{% |
| 166 |
% from base |
| 167 |
\input{tkz-tools-eu-base.tex} |
| 168 |
\input{tkz-tools-eu-utilities.tex} |
| 169 |
\input{tkz-tools-eu-BB.tex} |
| 170 |
\input{tkz-obj-eu-grids.tex} |
| 171 |
\input{tkz-lib-eu-marks.tex} |
| 172 |
\input{tkz-tools-eu-text.tex} |
| 173 |
\input{tkz-lib-eu-shape.tex} |
| 174 |
\input{tkz-obj-eu-axesmin.tex} |
| 175 |
\input{tkz-tools-eu-colors.tex} |
| 176 |
\input{tkz-obj-eu-points.tex} |
| 177 |
\input{tkz-draw-eu-points.tex} |
| 178 |
\input{tkz-obj-eu-triangles.tex} |
| 179 |
} |
| 180 |
% next from euclide |
| 181 |
\input{tkz-obj-eu-lua-points-by.tex} |
| 182 |
\input{tkz-tools-eu-lua-math.tex} |
| 183 |
\input{tkz-tools-eu-lua-angles.tex} |
| 184 |
\input{tkz-obj-eu-lua-points-with.tex} |
| 185 |
\input{tkz-obj-eu-lua-points-spc.tex} |
| 186 |
\input{tkz-tools-eu-lua-intersections.tex} |
| 187 |
% drawings |
| 188 |
\input{tkz-draw-eu-lines.tex} |
| 189 |
\input{tkz-draw-eu-circles.tex} |
| 190 |
\input{tkz-draw-eu-ellipses.tex} |
| 191 |
\input{tkz-draw-eu-polygons.tex} |
| 192 |
\input{tkz-draw-eu-arcs.tex} |
| 193 |
\input{tkz-draw-eu-angles.tex} |
| 194 |
\input{tkz-draw-eu-sectors.tex} |
| 195 |
\input{tkz-draw-eu-compass.tex} |
| 196 |
\input{tkz-draw-eu-show.tex} |
| 197 |
\input{tkz-draw-eu-protractor.tex} |
| 198 |
\else |
| 199 |
\@ifpackageloaded{tkz-base}{}{% |
| 200 |
% from base |
| 201 |
\input{tkz-tools-eu-base.tex} |
| 202 |
\input{tkz-tools-eu-utilities.tex} |
| 203 |
\input{tkz-tools-eu-BB.tex} |
| 204 |
\input{tkz-obj-eu-grids.tex} |
| 205 |
\input{tkz-lib-eu-marks.tex} |
| 206 |
\input{tkz-tools-eu-text.tex} |
| 207 |
\input{tkz-lib-eu-shape.tex} |
| 208 |
\input{tkz-obj-eu-axesmin.tex} |
| 209 |
\input{tkz-tools-eu-colors.tex} |
| 210 |
\input{tkz-obj-eu-points.tex} |
| 211 |
\input{tkz-draw-eu-points.tex} |
| 212 |
} |
| 213 |
% next from euclide |
| 214 |
\makeatletter |
| 215 |
\if@tkzlua |
| 216 |
\input{tkz-tools-eu-lua-base.tex} |
| 217 |
\input{tkz-obj-eu-lua-points.tex} |
| 218 |
\input{tkz-tools-eu-lua-math.tex} |
| 219 |
\input{tkz-tools-eu-lua-intersections.tex} |
| 220 |
\input{tkz-obj-eu-lua-points-by.tex} |
| 221 |
\input{tkz-obj-eu-lua-points-with.tex} |
| 222 |
\input{tkz-obj-eu-lua-points-spc.tex} |
| 223 |
\input{tkz-tools-eu-lua-angles.tex} |
| 224 |
\input{tkz-obj-eu-lua-circles.tex} |
| 225 |
\input{tkz-obj-eu-lua-circles-by.tex} |
| 226 |
\else |
| 227 |
\input{tkz-obj-eu-points.tex} |
| 228 |
\input{tkz-obj-eu-points-by.tex} |
| 229 |
\input{tkz-tools-eu-math.tex} |
| 230 |
\input{tkz-tools-eu-intersections.tex} |
| 231 |
\input{tkz-obj-eu-points-with.tex} |
| 232 |
\input{tkz-obj-eu-points-spc.tex} |
| 233 |
\input{tkz-tools-eu-angles.tex} |
| 234 |
\input{tkz-obj-eu-circles.tex} |
| 235 |
\input{tkz-obj-eu-circles-by.tex} |
| 236 |
\fi |
| 237 |
|
| 238 |
\input{tkz-obj-eu-points-rnd.tex} |
| 239 |
\input{tkz-obj-eu-lines.tex} |
| 240 |
\input{tkz-obj-eu-polygons.tex} |
| 241 |
\input{tkz-obj-eu-triangles} |
| 242 |
% drawings |
| 243 |
\input{tkz-draw-eu-lines.tex} |
| 244 |
\input{tkz-draw-eu-circles.tex} |
| 245 |
\input{tkz-draw-eu-ellipses.tex} |
| 246 |
\input{tkz-draw-eu-polygons.tex} |
| 247 |
\input{tkz-draw-eu-arcs.tex} |
| 248 |
\input{tkz-draw-eu-angles.tex} |
| 249 |
\input{tkz-draw-eu-sectors.tex} |
| 250 |
\input{tkz-draw-eu-compass.tex} |
| 251 |
\input{tkz-draw-eu-show.tex} |
| 252 |
\input{tkz-draw-eu-protractor.tex} |
| 253 |
\fi |
| 254 |
\endinput |