% tkz-tools-misc.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-tools-misc.tex} \makeatletter %<--------------------------------------------------------------------------–> % hline pb avec line %<--------------------------------------------------------------------------–> \def\tkzHLine{\pgfutil@ifnextchar[{\tkz@HLine}{\tkz@HLine[]}} \def\tkz@HLine[#1]#2{% \begingroup \edef\tkz@ptya{\fpeval{(#2-\tkz@init@yorigine)/\tkz@init@ystep}} \draw[#1] (\tkz@xa,\tkz@ptya)--(\tkz@xb,\tkz@ptya);% \endgroup } %<--------------------------------------------------------------------------–> % hlines pb avec line %<--------------------------------------------------------------------------–> \def\tkzHLines{\pgfutil@ifnextchar[{\tkz@HLines}{\tkz@HLines[]}} \def\tkz@HLines[#1]#2{% \begingroup \foreach \tkz@vy in {#2}{% \edef\my@tkz@vy{\fpeval{(\tkz@vy)}} \tkz@HLine[#1]{\my@tkz@vy}} \endgroup } %<---------------------------------------------------------------------------> % vline %<---------------------------------------------------------------------------> \def\tkzVLine{\pgfutil@ifnextchar[{\tkz@VLine}{\tkz@VLine[]}} \def\tkz@VLine[#1]#2{% \begingroup \edef\tkz@ptxa{\fpeval{(#2-\tkz@init@xorigine)/\tkz@init@xstep}} \draw[#1](\tkz@ptxa,\tkz@ya)--(\tkz@ptxa,\tkz@yb); \endgroup } %<---------------------------------------------------------------------------> % vlines %<---------------------------------------------------------------------------> \def\tkzVLines{\pgfutil@ifnextchar[{\tkz@VLines}{\tkz@VLines[]}} \def\tkz@VLines[#1]#2{% \begingroup \foreach \tkz@vx in {#2}{% \edef\my@tkz@vx{\fpeval{(\tkz@vx)}} \tkz@VLine[#1]{\my@tkz@vx}} \endgroup } %<--------------------------------------------------------------------------–> \def\tkzHTick{\pgfutil@ifnextchar[{\tkz@HTick}{\tkz@HTick[]}} \def\tkz@HTick[#1]#2{% \begingroup \edef\tkz@ptxa{\fpeval{(round(#2,5)-\tkz@init@xorigine)/\tkz@init@xstep}} \draw plot[mark style,#1] coordinates {(\tkz@ptxa,0)}; \endgroup } \def\tkzHTicks{\pgfutil@ifnextchar[{\tkz@HTicks}{\tkz@HTicks[]}} \def\tkz@HTicks[#1]#2{% \begingroup \foreach \tkz@hy in {#2} {\tkz@HTick[#1]{\tkz@hy}} \endgroup } %<--------------------------------------------------------------------------–> \def\tkzVTick{\pgfutil@ifnextchar[{\tkz@VTick}{\tkz@VTick[]}} \def\tkz@VTick[#1]#2{% \begingroup \edef\tkz@ptya{\fpeval{(round(#2,5)-\tkz@init@yorigine)/\tkz@init@ystep}} \draw plot[mark style,#1] coordinates {(0,\tkz@ptya)}; \endgroup } %<--------------------------------------------------------------------------–> \def\tkzVTicks{\pgfutil@ifnextchar[{\tkz@VTicks}{\tkz@VTicks[]}} \def\tkz@VTicks[#1]#2{% \begingroup \foreach \tkz@hy in {#2} {\tkz@VTick[#1]{\tkz@hy}} \endgroup } \makeatother \endinput