diff options
Diffstat (limited to 'macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-lines.tex')
-rw-r--r-- | macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-lines.tex | 116 |
1 files changed, 77 insertions, 39 deletions
diff --git a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-lines.tex b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-lines.tex index 5246f68455..de4323a8b0 100644 --- a/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-lines.tex +++ b/macros/latex/contrib/tkz/tkz-euclide/latex/tkz-obj-eu-lines.tex @@ -1,11 +1,21 @@ % tkz-obj-eu-lines.tex -% 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-obj-eu-lines.tex} +% Copyright 2020 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. + +% utf8 encoding +\def\fileversion{3.05c} +\def\filedate{2020/03/03} +\typeout{2020/03/03 3.05c tkz-obj-eu-lines.tex} \makeatletter %<--------------------------------------------------------------------------–> % les lignes @@ -26,7 +36,8 @@ K = 1, normed/.is if = tkz@line@normed, normed/.default = true, - normed = false + normed = false, + mediator } \def\tkzDefLine{\pgfutil@ifnextchar[{\tkz@DefLine}{\tkz@DefLine[]}} @@ -53,70 +64,86 @@ %<--------------------------------------------------------------------------–> % tkzLineLL revoir out !! %<--------------------------------------------------------------------------–> -\def\tkzDefLineLL(#1,#2){% +\def\tkzDefLineLL{\pgfutil@ifnextchar[{\tkz@DefLineLL}{% + \tkz@DefLineLL[1]}} +\def\tkz@DefLineLL[#1](#2,#3){% \begingroup - \pgfpointdiff{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}% + \pgfpointdiff{\pgfpointanchor{#2}{center}}{\pgfpointanchor{#3}{center}}% \pgf@xa=\pgf@x\relax%% \pgf@ya=\pgf@y\relax%% \pgfinterruptboundingbox - \path[coordinate](\tkz@through)--++(\pgf@xa,\pgf@ya)% + \path[coordinate](\tkz@through)--++(\tkz@koeff\pgf@xa,\tkz@koeff\pgf@ya)% coordinate (tkzPointResult); \endpgfinterruptboundingbox - \iftkz@line@normed - \tkzVecKNorm(\tkz@through,tkzPointResult) - \fi + \iftkz@line@normed + \tkzVecKNorm(\tkz@through,tkzPointResult) + \fi \endgroup}% %<--------------------------------------------------------------------------–> % tkzOrthLine %<--------------------------------------------------------------------------–> \def\tkzDefOrthLine{\pgfutil@ifnextchar[{\tkz@DefOrthLine}{% \tkz@DefOrthLine[1]}} -\def\tkz@DefOrthLine[#1](#2,#3)(#4){% +\def\tkz@DefOrthLine[#1](#2,#3){% \begingroup - \tkzVecKOrth(#2,#3) + \tkzDefPointWith(#2,#3) \pgfnodealias{tkz@OLtmp}{tkzPointResult} - \tkz@VecKCoLinear[#1](#2,tkz@OLtmp,#4) + \tkz@VecKCoLinear[\tkz@koeff](#2,tkz@OLtmp,\tkz@through) \iftkz@line@normed \pgfinterruptboundingbox \tkzVecKNorm(\tkz@through,tkzPointResult) \endpgfinterruptboundingbox \fi -\endgroup -} +\endgroup}% %<--------------------------------------------------------------------------–> % tkzMediatorLine %<--------------------------------------------------------------------------–> -\def\tkzDefMediatorLine(#1,#2){% new 2020 +\def\tkzDefMediatorLine{\pgfutil@ifnextchar[{\tkz@DefMediatorLine}{% + \tkz@DefMediatorLine[1]}} + +\def\tkz@DefMediatorLine[#1](#2,#3){% new 2020 \begingroup - \tkzDefEquilateral(#1,#2) + \tkzDefEquilateral(#2,#3) \pgfnodealias{tkzFirstPointResult}{tkzPointResult} - \tkzDefEquilateral(#2,#1) - \pgfnodealias{tkzSecondPointResult}{tkzPointResult} - \iftkz@line@normed - \tkzDefMidPoint(#1,#2) - \pgfnodealias{tkz@mid}{tkzPointResult} - \pgfinterruptboundingbox - \tkzVecKNorm(tkz@mid,tkzFirstPointResult) - \pgfnodealias{tkzFirstPointResult}{tkzPointResult} - \tkzVecKNorm(tkz@mid,tkzSecondPointResult) - \pgfnodealias{tkzSecondPointResult}{tkzPointResult} - \endpgfinterruptboundingbox -\fi -\endgroup -} + \tkzDefEquilateral(#3,#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} + \ifx\tkz@koeff=1 % + \else + \tkzDefMidPoint(#2,#3) + \pgfnodealias{tkz@mid}{tkzPointResult} + \tkz@VecK[\tkz@koeff](tkz@mid,tkzFirstPointResult) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkz@VecK[\tkz@koeff](tkz@mid,tkzSecondPointResult) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} + \fi + \iftkz@line@normed + \tkzDefMidPoint(#2,#3) + \pgfnodealias{tkz@mid}{tkzPointResult} + \pgfinterruptboundingbox + \tkzVecKNorm[\tkz@koeff](tkz@mid,tkzFirstPointResult) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzVecKNorm[\tkz@koeff](tkz@mid,tkzSecondPointResult) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} + \endpgfinterruptboundingbox + \fi +\endgroup} % autre possibilité %<--------------------------------------------------------------------------–> -% BisectorLine % pb avec un angle plat +% BisectorLine %<--------------------------------------------------------------------------–> \def\tkzDefBisectorLine(#1,#2,#3){% \begingroup \pgfinterruptboundingbox - \tkzDuplicateLength(#2,#1)(#2,#3) + \tkzDuplicateSegment(#2,#1)(#2,#3) \pgfnodealias{bi@tmp}{tkzPointResult} \tkzDefEquilateral(bi@tmp,#1) + \ifx\tkz@koeff=1 % + \else + \tkzVecK[\tkz@koeff](#2,tkzPointResult) + \fi \iftkz@line@normed - \tkzVecKNorm(#2,tkzPointResult) + \tkzVecKNorm[\tkz@koeff](#2,tkzPointResult) \fi \endpgfinterruptboundingbox \endgroup @@ -132,8 +159,12 @@ \tkzDefMidPoint(#1,out@tmp) \pgfnodealias{out@pt1}{tkzPointResult} \tkzURotateAngle(#2,90)(out@pt1) + \ifx\tkz@koeff=1 % + \else + \tkzVecK[\tkz@koeff](#2,tkzPointResult) + \fi \iftkz@line@normed - \tkzVecKNorm(#2,tkzPointResult) + \tkzVecKNorm[\tkz@koeff](#2,tkzPointResult) \fi \endpgfinterruptboundingbox \endgroup @@ -148,6 +179,13 @@ \tkzDefMidPoint(#1,#3) \pgfnodealias{sym@pt2}{tkzPointResult} \tkzUSymOrth(#2,sym@pt1)(sym@pt2) + \ifx\tkz@koeff=1 % + \else + \tkzVecK[\tkz@koeff](#2,tkzPointResult) + \fi + \iftkz@line@normed + \tkzVecKNorm[\tkz@koeff](#2,tkzPointResult) + \fi \endgroup } %<-------------------------------------------------------------------------–> |