diff options
author | Karl Berry <karl@freefriends.org> | 2020-05-05 21:32:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-05-05 21:32:55 +0000 |
commit | 16cbb36af5f9b830084a15c75c3506d13af72a02 (patch) | |
tree | 95a0f8512b4ed8c7c2f2444b19f0f68fb50f93ad /Master/texmf-dist/tex/latex/tkz-fct | |
parent | 5033b0a46ad21995a992442c4ca73580ed7e0c58 (diff) |
tkz-fct (5may20)
git-svn-id: svn://tug.org/texlive/trunk@55031 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tkz-fct')
-rw-r--r-- | Master/texmf-dist/tex/latex/tkz-fct/tkz-fct.sty | 254 |
1 files changed, 128 insertions, 126 deletions
diff --git a/Master/texmf-dist/tex/latex/tkz-fct/tkz-fct.sty b/Master/texmf-dist/tex/latex/tkz-fct/tkz-fct.sty index 37213a70d64..401fa985bfc 100644 --- a/Master/texmf-dist/tex/latex/tkz-fct/tkz-fct.sty +++ b/Master/texmf-dist/tex/latex/tkz-fct/tkz-fct.sty @@ -13,10 +13,10 @@ % constants from tkz-base % \tkz@init@xstep % \tkz@init@ystep -\typeout{2020/04/11 1.3c function tkz-fct} +\typeout{2020/05/01 1.4c function tkz-fct} %<---------------------------------------------------------------------------> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tkz-fct}[2020/04/11 1.3c function ] +\ProvidesPackage{tkz-fct}[2020/05/01 1.4c function ] \newcount\tkz@tkzf@fct \edef\tkzTWOPTCode{\the\catcode`\:} \tkz@tkzf@fct=0 % @@ -83,17 +83,17 @@ \global\let\tkz@tmp@yb\tkz@init@ymax% modif 2016 \catcode`\:=12 \pgfkeys{/@tkzfct/.cd, - domain/.code args = {#1:#2} {\FPeval\tkz@min{(#1)} - \FPeval\tkz@max{(#2)}}, - domain = \tkz@tmp@xa:\tkz@tmp@xb, - samples/.store in = \tkz@fct@samples, - id/.store in = \tkz@fct@id, - fp/.is if = tkz@fp, - fp/.default = false, - samples = 200, - fp = true, - id = tkzfct, - /@tkzfct/.search also = {/tikz}, + domain/.code args = {#1:#2} {\FPeval\tkz@min{(#1)} + \FPeval\tkz@max{(#2)}}, + domain = \tkz@tmp@xa:\tkz@tmp@xb, + samples/.store in = \tkz@fct@samples, + id/.store in = \tkz@fct@id, + fp/.is if = tkz@fp, + fp/.default = false, + samples = 200, + fp = true, + id = tkzfct, + /@tkzfct/.search also = {/tikz}, }% \def\tkzFct{\pgfutil@ifnextchar[{\tkzActivOff\tkz@fct}{\tkz@fct[]}} @@ -113,12 +113,14 @@ \def\x{(x*\tkz@init@xstep)}% \expandafter\edef\csname tkzFctgnu\@alph\tkz@tkzf@fct \endcsname{#2}% \expandafter\edef\csname tkzFctgnuLast\endcsname{#2} -% %%%%%%% +%%%%%%% \begin{scope} - \clip (\tkz@xa,\tkz@ya) rectangle (\tkz@xb,\tkz@yb); - \draw[#1, xshift = -\tkz@x@delta cm,yshift = -\tkz@y@delta cm]% - plot[ samples = \tkz@fct@samples,id=\tkz@fct@id, - domain= \tkz@ba:\tkz@bb] function{(#2)/\tkz@init@ystep};% + \clip (\tkz@xa,\tkz@ya) rectangle (\tkz@xb,\tkz@yb); + % \draw[#1, xshift = -\tkz@x@delta cm,yshift = -\tkz@y@delta cm] + \draw[#1, xshift = -\tkz@x@delta cm,] + plot[samples = \tkz@fct@samples,id=\tkz@fct@id, + domain= \tkz@ba:\tkz@bb] function{((#2)-\tkz@init@yorigine)/\tkz@init@ystep}; + % \node {-\tkz@y@delta cm }; \end{scope} % %%%%%%% \let\tkz@tmp@xstep\tkz@init@xstep @@ -140,30 +142,30 @@ % point d'une courbe (new method) %<---------------------------------------------------------------------------> \pgfkeys{/tkzfctpt/.cd, - draw/.is if = tkz@draw, - draw/.default = true, - with/.store in = \tkz@fct@used, - ref/.store in = \tkz@fct@ref, - draw = false, - with = {}, - ref = {} - } + draw/.is if = tkz@draw, + draw/.default = true, + with/.store in = \tkz@fct@used, + ref/.store in = \tkz@fct@ref, + draw = false, + with = {}, + ref = {} + } \def\tkzDefPointByFct{\pgfutil@ifnextchar[{\tkz@fctpoint}{\tkz@fctpoint[]}} \def\tkz@fctpoint[#1](#2){% \pgfqkeys{/tkzfctpt}{#1} \FPeval\x{(#2)}% \ifx\tkzutil@empty\tkz@fct@used - \FPeval\tkz@fx{\tkzFctLast} - \else + \FPeval\tkz@fx{\tkzFctLast} + \else \edef\tkz@fct{\csname tkzFct\tkz@fct@used\endcsname} - \FPeval\tkz@fx{\tkz@fct} - \fi + \FPeval\tkz@fx{\tkz@fct} + \fi \tkzDefPoint(\x,\tkz@fx){tkzPointResult}% - \iftkz@draw + \iftkz@draw \tkzDrawPoint(tkzPointResult) \fi -\ifx\tkzutil@empty\tkz@fct@ref +\ifx\tkzutil@empty\tkz@fct@ref \else \tkzGetPoint{\tkz@fct@ref} \fi @@ -172,16 +174,16 @@ % tangente \tkzDrawTangentLine %<---------------------------------------------------------------------------> \pgfkeys{/@tkztan/.cd, - with/.store in = \tkz@fct@used, - kr/.store in = \tkz@tan@kr, - kl/.store in = \tkz@tan@kl, - draw/.is if = tkz@draw, - draw/.default = true, - draw = false, - with = {}, - kr = 1, - kl = 1, - /@tkztan/.search also = {/tikz}, + with/.store in = \tkz@fct@used, + kr/.store in = \tkz@tan@kr, + kl/.store in = \tkz@tan@kl, + draw/.is if = tkz@draw, + draw/.default = true, + draw = false, + with = {}, + kr = 1, + kl = 1, + /@tkztan/.search also = {/tikz}, }% %<---------------------------------------------------------------------------> \def\tkzDrawTangentLine{\pgfutil@ifnextchar[{\tkz@DrawTangentLine}{% @@ -236,19 +238,19 @@ %<---------------------------------------------------------------------------> \pgfkeys{% /tkzarea/.cd, - domain/.code args={#1:#2} {\FPeval\tkz@min{(#1)} - \FPeval\tkz@max{(#2)}}, - opacity/.store in = \tkz@fct@opacity, - id/.store in = \tkz@fct@id, - color/.store in = \tkz@fct@color, - samples/.store in = \tkz@fct@samples, - domain = -5:5, - color = \tkz@otherlinecolor, - samples = 200, - id = tkzfonct, - opacity = .5, - /tkzarea/.search also = {/tikz} - } + domain/.code args={#1:#2} {\FPeval\tkz@min{(#1)} + \FPeval\tkz@max{(#2)}}, + opacity/.store in = \tkz@fct@opacity, + id/.store in = \tkz@fct@id, + color/.store in = \tkz@fct@color, + samples/.store in = \tkz@fct@samples, + domain = -5:5, + color = \tkz@otherlinecolor, + samples = 200, + id = tkzfonct, + opacity = .5, + /tkzarea/.search also = {/tikz} + } \def\tkzArea{\pgfutil@ifnextchar[{\catcode`\:=12 \tkz@aire}{\tkz@aire[]}} \def\tkz@aire[#1]{% \begingroup @@ -282,22 +284,22 @@ % tkzAreafg %<---------------------------------------------------------------------------> \pgfkeys{/@tkzareafg/.cd, - domain/.code args ={#1:#2} {\FPeval\tkz@min{(#1)} - \FPeval\tkz@max{(#2)}}, - between/.code args ={#1 and #2}{\def\tkzfct@below{#1} - \def\tkzfct@above{#2}}, - opacity/.store in = \tkz@fct@opacity, - id/.store in = \tkz@fct@id, - color/.store in = \tkz@fct@color, - samples/.store in = \tkz@fct@samples, - domain = -5:5, - between = a and b, - color = lightgray, - samples = 200, - id = tkzfonct, - opacity = .5, + domain/.code args ={#1:#2} {\FPeval\tkz@min{(#1)} + \FPeval\tkz@max{(#2)}}, + between/.code args ={#1 and #2}{\def\tkzfct@below{#1} + \def\tkzfct@above{#2}}, + opacity/.store in = \tkz@fct@opacity, + id/.store in = \tkz@fct@id, + color/.store in = \tkz@fct@color, + samples/.store in = \tkz@fct@samples, + domain = -5:5, + between = a and b, + color = lightgray, + samples = 200, + id = tkzfonct, + opacity = .5, /@tkzareafg/.search also = {/tikz} - } + } \def\tkzAreafg{\pgfutil@ifnextchar[{\tkz@airefg}{\tkz@airefg[]}} \def\tkz@airefg[#1]{% @@ -340,10 +342,10 @@ \def\tkz@fctp[#1]#2#3{% \begingroup \pgfkeys{/@tkzfct/.cd, - domain = \tkz@pamin:\tkz@pamax, - samples = 200, - fp = true, - id = tkzfct} + domain = \tkz@pamin:\tkz@pamax, + samples = 200, + fp = true, + id = tkzfct} \pgfqkeys{/@tkzfct}{#1} \iftkz@init@NO% \FPdiv{\tkz@x@delta}{\tkz@init@xorigine}{\tkz@init@xstep}% @@ -374,11 +376,11 @@ \def\tkz@FctPolar[#1]#2{% \begingroup \pgfkeys{/@tkzfct/.cd, - domain = \tkz@pomin:\tkz@pomax, - fp = true, - samples = 200, - id = tkzfctpolar - } + domain = \tkz@pomin:\tkz@pomax, + fp = true, + samples = 200, + id = tkzfctpolar + } \pgfqkeys{/@tkzfct}{#1} \iftkz@init@NO% \FPdiv{\tkz@x@delta}{\tkz@init@xorigine}{\tkz@init@xstep}% @@ -403,11 +405,11 @@ % tkzDrawRiemannSum %<---------------------------------------------------------------------------> \pgfkeys{/@tkzriemann/.cd, - interval/.code args={#1:#2} {\FPeval\tkz@min{(#1)} - \FPeval\tkz@max{(#2)}}, - number/.store in = \tkz@fct@nb, - opacity/.store in = \tkz@fct@opacity, - color/.store in = \tkz@fct@color, + interval/.code args={#1:#2} {\FPeval\tkz@min{(#1)} + \FPeval\tkz@max{(#2)}}, + number/.store in = \tkz@fct@nb, + opacity/.store in = \tkz@fct@opacity, + color/.store in = \tkz@fct@color, /@tkzriemann/.search also = {/tikz}, } \def\tkzDrawRiemannSum{\pgfutil@ifnextchar[{% @@ -415,10 +417,10 @@ \def\tkz@DrawRiemannSum[#1]{% \begingroup \pgfkeys{/@tkzriemann/.cd, - interval = 1:2, - number = 10, - opacity = 0.5, - line width = 1pt + interval = 1:2, + number = 10, + opacity = 0.5, + line width = 1pt } \pgfqkeys{/@tkzriemann}{#1} \iftkz@init@NO% @@ -437,9 +439,9 @@ \FPeval\tkz@fx{\tkzFcta} \FPadd\tkz@next{\x}{\tkz@delta} \draw[ color=\tkz@fct@color, - opacity=\tkz@fct@opacity, - /@tkzriemann/.cd,#1] (\x ,0 ) rectangle (\tkz@next, - \tkz@fx/\tkz@init@ystep ); + opacity=\tkz@fct@opacity, + /@tkzriemann/.cd,#1] (\x ,0 ) rectangle (\tkz@next, + \tkz@fx/\tkz@init@ystep ); } \end{scope} \endgroup @@ -448,23 +450,23 @@ % tkzDrawRiemannSumInf %<---------------------------------------------------------------------------> \pgfkeys{/@tkzriemann/.cd, - interval/.code args={#1:#2} {\FPeval\tkz@min{(#1)} - \FPeval\tkz@max{(#2)}}, - number/.store in = \tkz@fct@nb, - opacity/.store in = \tkz@fct@opacity, - color/.store in = \tkz@fct@color, - /@tkzriemann/.search also = {/tikz}, - } + interval/.code args={#1:#2} {\FPeval\tkz@min{(#1)} + \FPeval\tkz@max{(#2)}}, + number/.store in = \tkz@fct@nb, + opacity/.store in = \tkz@fct@opacity, + color/.store in = \tkz@fct@color, + /@tkzriemann/.search also = {/tikz}, + } \def\tkzDrawRiemannSumInf{\pgfutil@ifnextchar[{% \catcode`\:=12 \tkz@DrawRiemannSumInf}{\tkz@DrawRiemannSumInf[]}} \def\tkz@DrawRiemannSumInf[#1]{% \begingroup \pgfkeys{/@tkzriemann/.cd, - interval = 1:2, - number = 10, - opacity = 0.5, - line width = 1pt - } + interval = 1:2, + number = 10, + opacity = 0.5, + line width = 1pt + } \pgfqkeys{/@tkzriemann}{#1} \iftkz@init@NO% \FPdiv{\tkz@x@delta}{\tkz@init@xorigine}{\tkz@init@xstep}% @@ -505,11 +507,11 @@ \def\tkz@DrawRiemannSumSup[#1]{% \begingroup \pgfkeys{/@tkzriemann/.cd, - interval = 1:2, - number = 10, - opacity = 0.5, - line width = 1pt - } + interval = 1:2, + number = 10, + opacity = 0.5, + line width = 1pt + } \pgfqkeys{/@tkzriemann}{#1} \iftkz@init@NO% \FPdiv{\tkz@x@delta}{\tkz@init@xorigine}{\tkz@init@xstep}% @@ -550,11 +552,11 @@ \def\tkz@DrawRiemannSumMid[#1]{% \begingroup \pgfkeys{/@tkzriemann/.cd, - interval = 1:2, - number = 10, - opacity = 0.5, - line width = 1pt - } + interval = 1:2, + number = 10, + opacity = 0.5, + line width = 1pt + } \pgfqkeys{/@tkzriemann}{#1} \iftkz@init@NO% \FPdiv{\tkz@x@delta}{\tkz@init@xorigine}{\tkz@init@xstep}% @@ -590,14 +592,14 @@ \def\tkz@ComT{v} % need \pgfkeys{/@tkzxh/.cd, - posgrad/.store in = \tkz@tkzXh@posgrad, - left/.store in = \tkz@tkzXh@left, - right/.store in = \tkz@tkzXh@right, - color/.store in = \tkz@tkzXh@color, - posgrad = {below=6 pt}, - color = \tkz@mainlinecolor, - left = {}, - right = {}, + posgrad/.store in = \tkz@tkzXh@posgrad, + left/.store in = \tkz@tkzXh@left, + right/.store in = \tkz@tkzXh@right, + color/.store in = \tkz@tkzXh@color, + posgrad = {below=6 pt}, + color = \tkz@mainlinecolor, + left = {}, + right = {}, } \def\tkzXH{\pgfutil@ifnextchar[{\tkz@xh}{\tkz@xh[]}} \def\tkz@xh[#1]#2{% @@ -635,11 +637,11 @@ % % \def\tkz@Tan[#1]#2(#3)#{ % \pgfkeys{/@tkztan/.cd, -% draw = false, -% with = {}, -% kr = 1, -% kl = 1 -% } +% draw = false, +% with = {}, +% kr = 1, +% kl = 1 +% } % \pgfqkeys{/@tkztan}{#1} % \global\edef\tkz@opttan{#1} % \FPeval\x{(#3)}% |