├── doc-zh-cn ├── main.pdf ├── chap12 │ └── TKZdoc-fct-symbol.tex ├── chap05 │ └── TKZdoc-fct-label.tex ├── chap19 │ └── TKZdoc-fct-liste.tex ├── couverture.tex ├── chap17 │ └── TKZdoc-fct-fppgf.tex ├── tkz-doc.cfg ├── tikzrput.sty ├── chap08 │ └── TKZdoc-fct-riemann.tex ├── chap14 │ └── TKZdoc-fct-interpolation.tex ├── chap00 │ └── TKZdoc-fct-why.tex ├── chap13 │ └── TKZdoc-fct-example.tex ├── chap15 │ └── TKZdoc-fct-VDW.tex ├── chap11 │ └── TKZdoc-fct-polar.tex ├── chap10 │ └── TKZdoc-fct-param.tex ├── chap18 │ └── TKZdoc-fct-faq.tex ├── chap09 │ └── TKZdoc-fct-asymptote.tex ├── chap16 │ └── TKZdoc-fct-bac.tex ├── chap04 │ └── TKZdoc-fct-point.tex ├── chap03 │ └── TKZdoc-fct-fonctions.tex ├── chap07 │ └── TKZdoc-fct-area.tex ├── pgfornament.sty ├── chap02 │ └── TKZdoc-fct-installation.tex ├── main.tex ├── chap06 │ └── TKZdoc-fct-tangent.tex └── tkz-doc-zh.cls ├── doc-fr └── TKZdoc-fct.pdf ├── examples ├── Makefile ├── latex │ ├── tkzFct-10-7-0.tex │ ├── tkzFct-10-3-0.tex │ ├── tkzFct-10-5-0.tex │ ├── tkzFct-3-3-0.tex │ ├── tkzFct-11-1-0.tex │ ├── tkzFct-12-4-0.tex │ ├── tkzFct-4-2-0.tex │ ├── tkzFct-3-4-0.tex │ ├── tkzFct-12-6-0.tex │ ├── tkzFct-10-4-0.tex │ ├── tkzFct-16-2-0.tex │ ├── tkzFct-12-2-0.tex │ ├── tkzFct-12-5-0.tex │ ├── tkzFct-11-2-0.tex │ ├── tkzFct-12-1-0.tex │ ├── tkzFct-8-6-0.tex │ ├── tkzFct-4-3-0.tex │ ├── tkzFct-11-3-0.tex │ ├── tkzFct-7-10-2.tex │ ├── tkzFct-11-5-0.tex │ ├── tkzFct-1-0-0.tex │ ├── tkzFct-8-7-0.tex │ ├── tkzFct-4-4-0.tex │ ├── tkzFct-9-2-0.tex │ ├── tkzFct-9-4-0.tex │ ├── tkzFct-11-6-0.tex │ ├── tkzFct-11-7-0.tex │ ├── tkzFct-5-3-0.tex │ ├── tkzFct-5-4-0.tex │ ├── tkzFct-11-4-0.tex │ ├── tkzFct-8-8-0.tex │ ├── tkzFct-14-7-1.tex │ ├── tkzFct-4-6-0.tex │ ├── tkzFct-5-1-0.tex │ ├── tkzFct-9-1-0.tex │ ├── tkzFct-10-2-0.tex │ ├── tkzFct-5-2-0.tex │ ├── tkzFct-13-0-0.tex │ ├── tkzFct-12-3-0.tex │ ├── tkzFct-4-7-0.tex │ ├── tkzFct-10-6-0.tex │ ├── tkzFct-7-3-0.tex │ ├── tkzFct-7-6-0.tex │ ├── tkzFct-9-3-0.tex │ ├── tkzFct-4-8-0.tex │ ├── tkzFct-6-1-0.tex │ ├── tkzFct-4-5-0.tex │ ├── tkzFct-5-5-0.tex │ ├── tkzFct-8-3-0.tex │ ├── tkzFct-8-10-0.tex │ ├── tkzFct-8-9-0.tex │ ├── tkzFct-14-3-0.tex │ ├── tkzFct-7-5-0.tex │ ├── tkzFct-15-0-3.tex │ ├── tkzFct-15-0-4.tex │ ├── tkzFct-7-7-0.tex │ ├── tkzFct-8-4-0.tex │ ├── tkzFct-7-9-1.tex │ ├── tkzFct-14-7-2.tex │ ├── tkzFct-14-7-3.tex │ ├── tkzFct-7-8-0.tex │ ├── tkzFct-14-7-4.tex │ ├── tkzFct-14-5-0.tex │ ├── tkzFct-8-2-0.tex │ ├── tkzFct-16-1-0.tex │ ├── tkzFct-7-2-0.tex │ ├── tkzFct-10-8-0.tex │ ├── tkzFct-7-4-0.tex │ ├── tkzFct-14-8-2.tex │ ├── tkzFct-14-8-1.tex │ ├── tkzFct-14-1-0.tex │ ├── tkzFct-5-6-0.tex │ ├── tkzFct-8-11-0.tex │ ├── tkzFct-14-2-0.tex │ ├── tkzFct-14-4-0.tex │ └── tkzFct-14-6-1.tex └── tkzfctpreamble.ltx ├── README.md └── .gitignore /doc-zh-cn/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/registor/tkz-fct-doc-zh-cn/HEAD/doc-zh-cn/main.pdf -------------------------------------------------------------------------------- /doc-fr/TKZdoc-fct.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/registor/tkz-fct-doc-zh-cn/HEAD/doc-fr/TKZdoc-fct.pdf -------------------------------------------------------------------------------- /examples/Makefile: -------------------------------------------------------------------------------- 1 | all: doc 2 | 3 | doc: 4 | for datei in $$(ls *tex | cut -d \. -f 1) ; do make $$datei.pdf ; done 5 | 6 | %.pdf: %.tex 7 | pdflatex --shell-escape $*.tex -------------------------------------------------------------------------------- /examples/latex/tkzFct-10-7-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit 12 | \tkzAxeXY 13 | \tkzHLines[color = green]{1,2,...,10} 14 | \end{tikzpicture} 15 | 16 | \end{document} 17 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-10-3-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit[xmax=5,ymax=5] 12 | \tkzAxeXY 13 | \tkzVLines[color = green]{1,2,...,4} 14 | \end{tikzpicture} 15 | 16 | \end{document} 17 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-10-5-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit[xmax=80,xstep=20,ymax=2] 12 | \tkzAxeXY 13 | \tkzHLine[color=red]{exp(1)-1} 14 | \end{tikzpicture} 15 | 16 | \end{document} 17 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-3-3-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit[xmin=-5,xmax=5,ymax=2] 12 | \tkzGrid 13 | \tkzAxeXY 14 | \end{tikzpicture} 15 | 16 | \end{document} 17 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-11-1-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit[ymax=2.25,ystep=.5] \tkzGrid 12 | \tkzAxeXY 13 | \tkzFctPar[samples=400,domain=0:2*pi]{(t-sin(t))}{(1-cos(t))} 14 | \end{tikzpicture} 15 | 16 | \end{document} 17 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-12-4-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=4] 11 | \tkzInit [xmin=-5,xmax=5,ymin=-5,ymax=5,xstep=1,ystep=1] 12 | \tkzFctPolar[domain=0:2*pi,samples=400]{ 1-sin(t) } 13 | \end{tikzpicture} 14 | 15 | \end{document} 16 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-4-2-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1] 11 | \tkzInit[xmax=5,ymax=2] 12 | \tkzGrid[sub] 13 | \tkzAxeXY 14 | \tkzFct[samples=400,domain=.5:5]{1/x} 15 | \end{tikzpicture} 16 | 17 | \end{document} 18 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-3-4-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit[xmin=-5,xmax=5,ymax=2] 12 | \tkzGrid 13 | \tkzAxeXY 14 | \tkzFct[color=red]{2*x**2/(x**2+1)} 15 | \end{tikzpicture} 16 | 17 | \end{document} 18 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-12-6-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2.5] 11 | \tkzInit [xmin=-5,xmax=5,ymin=-5,ymax=5,xstep=1,ystep=1] 12 | \tkzFctPolar[domain=0:2*pi,samples=400]{1.6*cos(2*t)-3*cos(t) } 13 | \end{tikzpicture} 14 | 15 | \end{document} 16 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-10-4-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit[xmin=-7,xmax=7,ymin=-1,ymax=1] 12 | \tkzAxeY[gradsize=\scriptstyle] 13 | \tkzAxeX[trig=2] 14 | \foreach\v in {-2,-1,1,2} 15 | {\tkzVLine[color=red]{\v*\FPpi}} 16 | \end{tikzpicture} 17 | 18 | \end{document} 19 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-16-2-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit[xmin=-0.2,xmax=0.2,xstep=.1, 12 | ymin=-12,ymax=6,ystep=2] 13 | \tkzGrid 14 | \tkzAxeXY 15 | \tkzFct[domain = -.1:.2]% 16 | {-5+x*(0.5+4*x*(x*(-2+x*1)))} 17 | \end{tikzpicture} 18 | 19 | \end{document} 20 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-12-2-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit [xmin=-1,xmax=1, 12 | ymin=-1,ymax=1, 13 | xstep=.2,ystep=.2] 14 | \tkzDrawX \tkzDrawY 15 | \tkzFctPolar[domain=0:2*pi]{cos(2*t)} 16 | \end{tikzpicture} 17 | 18 | \end{document} 19 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-12-5-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2.5] 11 | \tkzInit [xmin=-5,xmax=5,ymin=-5,ymax=5,xstep=1,ystep=1] 12 | \tkzFctPolar[domain=0:2*pi,samples=1000]% 13 | { (1+.9*cos(8*t))*(1+.1*cos(24*t))*(1+.1*cos(200*t))*(1+sin(t)) } 14 | \end{tikzpicture} 15 | 16 | \end{document} 17 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-11-2-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit[xmin=-50,xmax=50,xstep=10, 12 | ymin=-50,ymax=50,ystep=10] 13 | \tkzGrid 14 | \tkzAxeXY 15 | \tkzFctPar[smooth,samples=200,domain=0:50]{t*sin(t)}{t*cos(t)} 16 | \end{tikzpicture} 17 | 18 | \end{document} 19 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-12-1-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=0.75] 11 | \tkzInit [xmin=-0.5,xmax=0.5, 12 | ymin=-0.5,ymax=0.5, 13 | xstep=0.1,ystep=.1] 14 | \tkzDrawX \tkzDrawY 15 | \tkzFctPolar[domain=-2*pi:2*pi]{cos(t)*sin(t)} 16 | \end{tikzpicture} 17 | 18 | \end{document} 19 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-8-6-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.5] 11 | \tkzInit[xmax=5,ymax=5] 12 | \tkzGrid \tkzAxeXY 13 | \tkzFct[domain = 0:5]{x} 14 | \tkzFct[domain = 1:5]{log(x)} 15 | \tkzDrawAreafg[color = orange!50,domain = 1:5] 16 | \end{tikzpicture} 17 | 18 | \end{document} 19 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-4-3-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit[xmax= 110,xstep=10, 12 | ymax=6,ystep=1] 13 | \tkzDrawX[label={\textit{Age}},below= -18pt] 14 | \tkzLabelX 15 | \tkzDrawY[label={\textit{litres}}] 16 | \tkzFct[domain = 0.1:100 ]{50/\x} 17 | \end{tikzpicture} 18 | 19 | \end{document} 20 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-11-3-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.5] 11 | \tkzInit[xmin=-2,xmax=10,xstep=2,ymin=-10,ymax=4,ystep=2] 12 | \tkzGrid[sub] 13 | \tkzAxeX[step=2] 14 | \tkzAxeY[step=2] 15 | \tkzFctPar[samples=400,domain=-pi:pi]{exp(t)*sin(t)}{exp(t)*cos(t)} 16 | \end{tikzpicture} 17 | 18 | \end{document} 19 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-7-10-2.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1] 11 | \tkzInit[xmax=1,xstep=0.1,ymin=0.0,ymax=1,ystep=0.1] 12 | \tkzGrid \tkzAxeXY 13 | \tkzFct[domain = 0.00001:1]{(\x**\x)} 14 | \tkzDrawTangentLine[draw,color = red, kr = 0.2,kl = 0.2]({1/exp(1)}) 15 | \end{tikzpicture} 16 | 17 | \end{document} 18 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-11-5-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=4] 11 | \tkzInit[xmin=-1,xmax=1,ymin=-2,ymax=1] 12 | \tkzClip 13 | \tkzFctPar[samples=500,smooth,domain=-pi:pi, 14 | ball color=red,shading=ball]% 15 | {(sin(t))**3}{cos(t)-(cos(t))**4} 16 | \end{tikzpicture} 17 | 18 | \end{document} 19 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-1-0-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=.5] 11 | \tkzInit[xmax=100,xstep=10, 12 | ymax=1000000, 13 | ystep=100000] 14 | \tkzAxeX[right] 15 | \tkzAxeY[above] 16 | \tkzGrid 17 | \tkzFct[color=red, 18 | domain=0:100]{\x**3} 19 | \end{tikzpicture} 20 | 21 | \end{document} 22 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-8-7-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=.8] 11 | \tkzInit[xmax=5,ymax=5] 12 | \tkzGrid 13 | \tkzAxeXY 14 | \tkzFct[domain = 0:5]{x} 15 | \tkzFct[domain = 1:5]{log(x)} 16 | \tkzDrawAreafg[between= a and b,pattern=north west lines,domain = 1:5] 17 | \end{tikzpicture} 18 | 19 | \end{document} 20 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-4-4-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.5] 11 | \tkzInit[xmax=700,xstep=100,ymax=1200,ystep=400] 12 | \tkzGrid(0,0)(700,1200) \tkzAxeXY 13 | \tkzFct[color=red,samples=100,line width=0.8pt,domain =0:700]% 14 | {(1./90000)*\x*\x*\x-(1./100)*\x*\x+(113./36)*\x} 15 | \end{tikzpicture} 16 | 17 | \end{document} 18 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-9-2-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.75] 11 | \tkzInit[xmin=-3,xmax=6,ymin=-2,ymax=14,ystep=2] 12 | \tkzDrawX \tkzDrawY 13 | \tkzFct[line width=2pt,color = red, domain =-3:6]{(-\x-2)*(\x-5)} 14 | \tkzDrawRiemannSumInf[fill=green!40,opacity=.5,interval=-1:5,number=10] 15 | \end{tikzpicture} 16 | 17 | \end{document} 18 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-9-4-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.75] 11 | \tkzInit[xmin=-3,xmax=6,ymin=-2,ymax=14,ystep=2] 12 | \tkzDrawX \tkzDrawY 13 | \tkzFct[line width=2pt,color = red, domain =-3:6]{(-\x-2)*(\x-5)} 14 | \tkzDrawRiemannSumMid[fill=blue!40,opacity=.5,interval=-1:5,number=10] 15 | \end{tikzpicture} 16 | 17 | \end{document} 18 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-11-6-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.5] 11 | \tkzInit[xmin=-.4,xmax=.4,xstep=.1,ymin=0,ymax=.7,ystep=.1] 12 | \tkzClip 13 | \tkzFctPar[samples=2000,smooth,domain=-1:1, 14 | ball color=red,shading=ball]% 15 | {sin(t)*cos(t)*log(abs(t))}{sqrt(abs(t))*cos(t)} 16 | \end{tikzpicture} 17 | 18 | \end{document} 19 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-11-7-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.75] 11 | \tkzInit[xmin=-20,xmax=20,xstep=5,ymin=-25,ymax=15,ystep=5] 12 | \tkzClip 13 | \tkzFctPar[samples=400,smooth,domain=0:6.28, 14 | ball color=red,shading=ball]% 15 | {16*(sin(t))**3}{13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t)} 16 | \end{tikzpicture} 17 | 18 | \end{document} 19 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-5-3-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit[xmin=-2,xmax=2,xstep=1, 12 | ymin=-8,ymax=24,ystep=8] 13 | \tkzGrid 14 | \tkzAxeXY 15 | \tkzFct[domain =-1.5:1]{3.0-1.3125*x**5-2.5*x**3} 16 | \tkzDefPointByFct[draw,ref=A](.5) 17 | \tkzLabelPoint[above right](A){$a$} 18 | \end{tikzpicture} 19 | 20 | \end{document} 21 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-5-4-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[xscale=3,yscale=2] 11 | \tkzInit[xmin=-2,xmax=2,xstep=1, 12 | ymin=-8,ymax=24,ystep=8] 13 | \tkzGrid 14 | \tkzAxeXY 15 | \global\edef\tkzFctLast{3.0-1.3125*x^5-2.5*x^3} 16 | \foreach \va in {-1.5,-1.4,...,1}{% 17 | \tkzDefPointByFct[draw](\va)} 18 | \end{tikzpicture} 19 | 20 | \end{document} 21 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-11-4-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit[xmin=-1,xmax=1,xstep=.2, 12 | ymin=-1,ymax=1,ystep=.2] 13 | \tkzFctPar[color=red, 14 | line width=2pt, 15 | fill=orange, 16 | opacity=.4, 17 | samples=400, 18 | domain=0:2*pi]{(cos(t))**3}{(sin(t))**3} 19 | \end{tikzpicture} 20 | 21 | \end{document} 22 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-8-8-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit[ymin=-1,xmax=5,ymax=3] 12 | \tkzGrid 13 | \tkzAxeXY 14 | \tkzFct[domain = 0.5:5]{1/x}% courbe a 15 | \tkzFct[domain = 1:5]{log(x)}% courbe b 16 | \tkzDrawAreafg[between=b and a, 17 | color=magenta!50, 18 | domain = 1:4] 19 | \end{tikzpicture} 20 | 21 | \end{document} 22 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-7-1.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzTab% 12 | { $v$ /1,% 13 | $g'(v)$ /1,% 14 | $g(v)$ /3% 15 | }% 16 | { $b$ ,% 17 | $3b$ ,% 18 | $+\infty$% 19 | }% 20 | {0,$+$,$0$,$-$,t} 21 | {-/ $0$ /,% 22 | +/$\dfrac{8}{27b}$ /,% 23 | -/ $0$ /}% 24 | \end{tikzpicture} 25 | 26 | \end{document} 27 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-4-6-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[] 11 | \tkzInit[ymax=20,ystep=5] 12 | \tkzAxeXY 13 | \tkzFct[color=red,domain=0:10,samples=2]{2*x+5} 14 | \tkzFct[color=blue,domain=0:10,samples=2]{-x+15} 15 | \tkzFct[color=green,domain=0:10,samples=2]{7} % 7/5=1 16 | \tkzFct[color=purple,domain=0:10,samples=2]{7.}%7.0/5 =1.2 17 | \end{tikzpicture} 18 | 19 | \end{document} 20 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-5-1-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit[xmin=-2,xmax=2,xstep=1, 12 | ymin=-8,ymax=24,ystep=8] 13 | \tkzGrid \tkzAxeXY 14 | \tkzFct[domain =-1.5:1]{3.0-1.3125*x**5-2.5*x**3} 15 | \tkzDefPointByFct(.5) \tkzGetPoint{A}\tkzDrawPoint(A) 16 | \tkzLabelPoint[above right](A){$A_0$} 17 | \end{tikzpicture} 18 | 19 | \end{document} 20 | -------------------------------------------------------------------------------- /examples/tkzfctpreamble.ltx: -------------------------------------------------------------------------------- 1 | % 2 | % tkzfctpreamble (juin 2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Copyright (C) 2010 Alain Matthes 6 | % 7 | \documentclass{scrartcl} 8 | \usepackage[usenames,dvipsnames,svgnames]{xcolor} 9 | \usepackage{amsmath,tkz-tab,tkz-euclide,tkz-fct} 10 | \usetkzobj{all} 11 | 12 | \definecolor{bistre}{rgb}{.75,.50,.30} 13 | \definecolor{Maroon}{rgb}{0.5,0.0,0.0} 14 | \definecolor{fondpaille}{cmyk}{0,0,0.1,0} 15 | \pagecolor{fondpaille} 16 | \color{Maroon} 17 | \tkzSetUpColors[background=fondpaille,text=Maroon] 18 | 19 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-9-1-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=3.5] 11 | \tkzInit[xmax=3,ymax=1.75] 12 | \tkzAxeXY 13 | \tkzGrid(0,0)(3,2) 14 | \tkzFct[color = red, domain =1/3:3]{0.125*(3*x-1)+0.375*(3*x-1)/(x*x)} 15 | \tkzDrawRiemannSum[fill=green!40,opacity=.2,color=green, 16 | line width=1pt,interval=1./2:exp(1),number=10] 17 | \end{tikzpicture} 18 | 19 | \end{document} 20 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-10-2-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2] 11 | \tkzInit[xmax=3,ymax=2] 12 | \tkzAxeXY 13 | \tkzVLine[color = blue, 14 | style = dashed, 15 | line width = 1pt]{2} 16 | \tkzVLine[color = red, 17 | style = dashed, 18 | line width = 1pt]{1./3} 19 | \end{tikzpicture} 20 | 21 | \end{document} 22 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-5-2-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit[xmin=-2,xmax=2,xstep=1, 12 | ymin=-8,ymax=24,ystep=8] 13 | \tkzGrid 14 | \tkzAxeXY 15 | \tkzFct[domain =-1.5:1]{3.0-1.3125*x**5-2.5*x**3} 16 | \tkzDefPointByFct(.5) 17 | \tkzDrawPoint(tkzPointResult) 18 | % ou bien \tkzDefPointByFct[draw](.5) 19 | \end{tikzpicture} 20 | 21 | \end{document} 22 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-13-0-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit[xmin=-1,xmax=6,ymin=0,ymax=10,xstep=1,ystep=1] 12 | \tkzGrid[color=gray] 13 | \tkzAxeXY 14 | \tkzFct[{-[},color=red,domain =-1:2,samples=2]{8-1.5*\x} 15 | \tkzFct[{[-]},color=blue,domain =2:3,samples=2]{4} 16 | \tkzFct[{]-},color=green!50!black,domain =3:6,samples=2]{2*\x-4} 17 | \end{tikzpicture} 18 | 19 | \end{document} 20 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-12-3-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=3] 11 | \tkzInit[xmin=-5,xmax=5,ymin=-5,ymax=5] 12 | \tkzFctPolar[domain = -pi:pi, 13 | samples = 800, 14 | ball color = red, 15 | shading = ball]% 16 | {2-2*sin(t)+sin(t)*sqrt(abs(cos(t)))/(sin(t)+1.4)} 17 | \end{tikzpicture} 18 | 19 | \end{document} 20 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-4-7-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit[xmin=4,xmax=18,xstep=2, 12 | ymin=20,ymax=90,ystep=10] 13 | \tkzFct[domain = 5:18]% 14 | {(\x-4)*exp(-0.25*\x+5)} 15 | \tkzGrid(4,20)(18,90) 16 | \tkzAxeXY 17 | \tkzGrid[sub, 18 | subxstep=0.5, 19 | subystep=2, 20 | color=brown](6,60)(12,90) 21 | \end{tikzpicture} 22 | 23 | \end{document} 24 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-10-6-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2.5] 11 | \tkzInit[xmax=5,ymin=0.5,ymax=1.5,ystep=0.5] 12 | \tkzGrid 13 | \tkzAxeXY 14 | \tkzFct[domain = 0:10]{x*exp(-x)+1} 15 | \tkzHLine[color=red,style=solid,line width=1.2pt]{1} 16 | \tkzDrawTangentLine[draw,color=blue](1) 17 | \tkzText[draw,fill = brown!20](2,0.75){$f(x)=x \text{e}^{-x}+1$} 18 | \end{tikzpicture} 19 | 20 | \end{document} 21 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-7-3-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.5] 11 | \tkzInit[xmin=-3,xmax=4,ymin=-4,ymax=2] 12 | \tkzGrid \tkzDrawXY \tkzClip 13 | \tkzFct[domain = -2.15:3.2]{(-x*x)+2*x} 14 | \tkzDefPointByFct[draw](2) 15 | \tkzDrawTangentLine[kl=0,draw](-1) 16 | \tkzDrawTangentLine[draw](1) 17 | \tkzDrawTangentLine[kr=0,draw](3) 18 | \tkzRep 19 | \end{tikzpicture} 20 | 21 | \end{document} 22 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-7-6-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2.75] 11 | \tkzInit[xmin=-2,xmax=3,ymax=3] 12 | \tkzGrid[color=orange](-2,0)(3,3) 13 | \tkzAxeX 14 | \tkzAxeY 15 | \tkzFct[color = red ,domain = -1:2]{(((x+1)*x)*x)**0.5} 16 | \tkzDrawTangentLine(0) 17 | \tkzText[draw,color = red,fill = orange!20](2,1){$f(x)=\sqrt{x^3+x^2}$} 18 | \end{tikzpicture} 19 | 20 | \end{document} 21 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-9-3-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.75] 11 | \tkzInit[xmin=-3,xmax=6,ymin=-2,ymax=14,ystep=2] 12 | \tkzDrawX \tkzDrawY 13 | \tkzFct[line width=2pt,color = red, domain =-3:6]{(-\x-2)*(\x-5)} 14 | \tkzDrawRiemannSumSup[fill=blue!40,opacity=.5,interval=-1:5,number=10] 15 | \tkzDrawRiemannSumInf[fill=green!40,opacity=.5,interval=-1:5,number=10] 16 | \end{tikzpicture} 17 | 18 | \end{document} 19 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-4-8-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2] 11 | \tkzInit[xmin=-3,xmax=3, ymin=-1,ymax=3] 12 | \tkzGrid[sub,subxstep=.5,subystep=.5] 13 | \tkzAxeXY 14 | \tkzFct[domain = -3:2]{(2-x)*exp(x)} 15 | \tkzText(-2,1.25){$\mathcal{C}_{f}$} 16 | \tkzDefPoint(2,0){A} \tkzDrawPoint(A) \tkzLabelPoints(A) 17 | \end{tikzpicture} 18 | 19 | \end{document} 20 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-6-1-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit[xmin=0,xmax=10, 12 | ymin=0,ymax=1.2,ystep=0.2] 13 | \tkzGrid 14 | \tkzAxeXY 15 | \tkzClip 16 | \tkzFct[thick,color=red,domain=0.55:10]{(\x*\x+\x-1)/(\x**3)} 17 | \tkzText(3,-0.3){\textbf{Courbe de} $\mathbf{f}$} 18 | \tkzDefPointByFct(3) 19 | \tkzText[above right,text=red](tkzPointResult){${\mathcal{C}}_f$} 20 | \end{tikzpicture} 21 | 22 | \end{document} 23 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-4-5-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=0.4] 11 | \tkzInit[xmax=30,ymax=90,ystep=6] 12 | \tkzAxeX[nograd,noticks,poslabel=right,label=$t$] 13 | \tkzAxeY[nograd,noticks,poslabel=above,label=$P$] 14 | \tkzFct[line width=1pt,color=red,dashed,domain=0:30]{80.0} 15 | \tkzFct[line width=1pt,color=blue,domain=0:30]{80/(1.0+4.0*exp(-0.21*x))} 16 | \tkzText[above,color=red](20,80){$P=80$} 17 | \end{tikzpicture} 18 | 19 | \end{document} 20 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-5-5-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.6] 11 | \tkzInit[xmin = 0, xmax = 800, 12 | ymin = 0, ymax = 2000, 13 | xstep = 100,ystep = 400] 14 | \tkzGrid 15 | \tkzAxeXY 16 | \tkzFct[color = blue, 17 | domain = 0:800]% 18 | {(1./90000)*\x*\x*\x-(1./100)*\x*\x+(113./36)*\x} 19 | \foreach \va in {0,450,800}{% 20 | \tkzDefPointByFct[draw](\va)} 21 | \end{tikzpicture} 22 | 23 | \end{document} 24 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-8-3-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.75] 11 | \tkzInit[xmin=0,xmax=800,xstep=100, 12 | ymin=0,ymax=2000,ystep=400] 13 | \tkzGrid 14 | \tkzAxeXY 15 | \tkzFct[domain = 0:800]{(1./90000)*\x*\x*\x-(1./100)*\x*\x+(113./36)*\x} 16 | \tkzDefPoint(450,400){a} 17 | \tkzDrawPoint(a) 18 | \tkzDrawArea[color=orange!50, domain =0:450] 19 | \tkzDrawArea[color=orange!80, domain =450:800] 20 | \end{tikzpicture} 21 | 22 | \end{document} 23 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-8-10-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2.5] 11 | \tkzInit[xmin=-1,xmax=4,ymin=0,ymax=5] 12 | \tkzGrid 13 | \tkzAxeXY 14 | \tkzFct[domain = -.5:4]{ 4*x-x**2+4/(x**2+1)**2} 15 | \tkzFct[domain = -.5:4]{x-1+4/(x**2+1)**2} 16 | \tkzDrawAreafg[color=green,domain = 1:4] 17 | \tkzDrawAreafg[pattern=north west lines,domain = -.5:1] 18 | \tkzRep 19 | \tkzText(2.5,4.5){$C_f$} 20 | \tkzText(2.5,1){$C_g$} 21 | \end{tikzpicture}% 22 | 23 | \end{document} 24 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-8-9-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit[xmax=1,ymax=1,xstep=0.1,ystep=0.1] 12 | \tkzGrid 13 | \tkzAxeXY 14 | \tkzFct[color = red,domain = 0:1]{(exp(\x)-1)/(exp(1)-1)} 15 | \tkzFct[color = blue,domain = 0:1]{\x*\x*\x} 16 | \tkzFct[color = green,domain = 0:1]{\x} 17 | \tkzDrawAreafg[between = c and b,color=purple!40,domain = 0:1] 18 | \tkzDrawAreafg[between = c and a,color=gray!60,domain = 0:1] 19 | \end{tikzpicture} 20 | 21 | \end{document} 22 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-3-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit[xmin=-6,xmax=4,ymin=-5,ymax=6] 12 | \tkzGrid 13 | \tkzAxeXY 14 | \tkzFct[color=red,thick,domain=-6:2.1785]{(-x*x+x+2)*exp(x)} 15 | \tkzSetUpPoint[size=6] 16 | \tkzDrawTangentLine[draw,kl=2](0) 17 | \tkzDefPoint(2,0){b} \tkzDrawPoint(b) 18 | \tkzDefPoint(-1,0){c} \tkzDrawPoint(c) 19 | \tkzText(2,4){($\mathcal{C}$)} 20 | \tkzText(-2,-3){($\mathcal{T}$)} 21 | \end{tikzpicture} 22 | 23 | \end{document} 24 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-7-5-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2] 11 | \tkzInit[xmin=-5,xmax=2,ymin=-1, ymax=3] 12 | \tkzDrawX 13 | \tkzDrawY 14 | \tkzText[draw,color = red,fill = orange!20]( 1.5,1.5){$y = xe^x$} 15 | \tkzFct[color = red, domain = -5:1]{x*exp(x)}% 16 | \tkzDrawTangentLine[color=blue,kr=2,kl=2](-2) 17 | \tkzDrawTangentLine[color=green,kr=2,kl=2](-1) 18 | \tkzDrawTangentLine[color=blue](0) 19 | \tkzDrawTangentLine[color=blue,kr=0](1) 20 | \end{tikzpicture} 21 | 22 | \end{document} 23 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-15-0-3.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[xscale=2.25,yscale=1] 11 | \tkzInit[xmin=-2,xmax=3,ymin=-1,ymax=6] 12 | \tkzDrawX 13 | \tkzDrawY 14 | \tkzFct[samples=100,domain = -1:2.2]{x+exp(x-1)} 15 | \tkzDefPoint(1,2){pt1} 16 | \tkzDrawPoint(pt1) 17 | \tkzPointShowCoord[xlabel=$1$,ylabel=$2$](pt1) 18 | \tkzDefPoint(2,4.71828){pt2} 19 | \tkzDrawPoint(pt2) 20 | \tkzPointShowCoord[xlabel=$2$,ylabel=$\text{e}+2$](pt2) 21 | \tkzRep 22 | \end{tikzpicture} 23 | 24 | \end{document} 25 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-15-0-4.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[xscale=2.25,yscale=1] 11 | \tkzInit[xmin=-2,xmax=3,ymin=-1,ymax=6] 12 | \tkzDrawX 13 | \tkzDrawY 14 | \tkzFct[samples=100,domain =-1:2.2]{x*x/2+exp(x-1)} 15 | \tkzDefPoint(1,1.5){pt1} 16 | \tkzDrawPoint(pt1) 17 | \tkzPointShowCoord[xlabel=$1$,ylabel=$3/2$](pt1) 18 | \tkzDefPoint(2,4.71828){pt2} 19 | \tkzDrawPoint(pt2) 20 | \tkzPointShowCoord[xlabel=$2$,ylabel=$\text{e}+2$](pt2) 21 | \tkzRep 22 | \end{tikzpicture} 23 | 24 | \end{document} 25 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-7-7-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit[xmax=1,ymax=1,xstep=0.1,ystep=0.1] 12 | \tkzGrid(0,0)(1,1) 13 | \tkzAxeXY 14 | \tkzFct[color = red,thick, domain =0:1]{(exp(\x)-1)/(exp(1)-1)} 15 | \tkzSetUpPoint[size=12] 16 | \tkzDrawTangentLine[draw, kl = 0, kr = 0.4](0) 17 | \tkzDrawTangentLine[draw, kl = 0.4,kr = 0 ](1) 18 | \tkzText[draw,color = red,fill = orange!20](0.5,0.6)% 19 | {$f(x)=\dfrac{\text{e}^x-1}{\text{e}-1}$} 20 | \end{tikzpicture} 21 | 22 | \end{document} 23 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-8-4-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2] 11 | \tkzInit[xmin=-3,xmax=4,ymin=-2,ymax=4] 12 | \tkzGrid(-3,-2)(4,4) 13 | \tkzDrawXY 14 | \tkzFct[domain = -2.15:3.2]{(2+\x)*exp(-\x)} 15 | \tkzDrawArea[pattern=north west lines,domain =-2:2] 16 | \tkzDrawTangentLine[draw,color=blue](0) 17 | \tkzDrawTangentLine[draw,color=blue](-1) 18 | \tkzDefPointByFct(2) \tkzGetPoint{C} 19 | \tkzDefPoint(2,0){B} 20 | \tkzDrawPoints(B,C) \tkzLabelPoints[above right](B,C) 21 | \tkzRep 22 | \end{tikzpicture} 23 | 24 | \end{document} 25 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-7-9-1.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2] 11 | \tikzstyle{tan style}=[-] 12 | \tkzInit[xmin=-5,xmax=2,ymin=-1,ymax=3] 13 | \tkzDrawXY 14 | \tkzText[draw,color = red, fill = orange!20](1.5,1.5){$y = xe^x$} 15 | \global\edef\tkzFctLast{x*exp(x)}% c'est la ligne importante 16 | \foreach \v in {-4,-3.8,...,0}{% 17 | \tkzDrawTangentLine[color=blue,line width=.4pt,kl=1](\v)} 18 | \foreach \v in {0.6,0.8,1}{% 19 | \tkzDrawTangentLine[color=blue,line width=.4pt,kr=0,kl=.75](\v)} 20 | \end{tikzpicture} 21 | 22 | \end{document} 23 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-7-2.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[xscale=2,yscale=2.5] 11 | \tkzInit[xmin=0,xmax=6,ymax=0.5,ystep=0.1] 12 | \tkzDrawX[label=$v$] 13 | \tkzDrawY[label=$g(v)$] 14 | \tkzGrid(0,0)(6,0.5) 15 | \tkzFct[color = red,domain =1:6]{(2*(x-1)*(x-1))/(x*x*x)} 16 | \tkzDrawTangentLine[color=blue,draw](3) 17 | \tkzDefPointByFct(1) 18 | \tkzText[draw, fill = brown!30](4,0.1){$g(v)=2\dfrac{(v-1)^2}{v^3}$} 19 | \end{tikzpicture} 20 | 21 | \end{document} 22 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-7-3.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.2] 11 | \tkzInit[xmin=0,xmax=2,xstep=0.2,ymax=1,ystep=0.1] 12 | \tkzAxeXY 13 | \tkzGrid(0,0)(2,1) 14 | \tkzFct[color = red,domain =1/3:2]{(2*(\x-1./3)*(\x-1./3))/(\x*\x*\x)} 15 | \tkzDrawTangentLine[draw,color=blue,kr=.5,kl=.5](1) 16 | \tkzDefPointByFct(1) 17 | \tkzText[draw,fill = brown!30](1.2,0.3)% 18 | {$g(v)=2\dfrac{\left(v-\dfrac{1}{3}\right)^2}{v^3}$} 19 | \end{tikzpicture} 20 | 21 | \end{document} 22 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-7-8-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2] 11 | \tikzstyle{tan style}=[-] 12 | \tkzInit[xmin=-5,xmax=2,ymin=-1,ymax=3] 13 | \tkzDrawXY 14 | \tkzText[draw,color = red, fill = orange!20](1.5,1.5){$y = xe^x$} 15 | \tkzFct[line width = 0.01 pt,color = red, domain = -5:1]{x*exp(x)} 16 | \foreach \x in {-4,-3.8,...,0}{% 17 | \tkzDrawTangentLine[color=blue,line width=.4pt,kr=1,kl=0.5](\x)} 18 | \foreach \x in {0.6,0.8,1}{% 19 | \tkzDrawTangentLine[color=blue,line width=.4pt, kr=0,kl=0.5](\x)} 20 | \end{tikzpicture} 21 | 22 | \end{document} 23 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-7-4.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.2] 11 | \tkzInit[xmin=0,xmax=10,ymax=.35,ystep=0.05]; 12 | \tkzAxeXY 13 | \tkzGrid(0,0)(10,.35) 14 | \tkzFct[color = red, 15 | domain =1.185:10]{(2*(\x-32./27)*(\x-32./27))/(\x*\x*\x)} 16 | \tkzDrawTangentLine[draw,color=blue,kr=2,kl=2](3.555) 17 | \tkzText[draw,fill = brown!30](5,0.3)% 18 | {$g(v)=2\dfrac{\left(v-\dfrac{32}{27}\right)^2}{v^3}$} 19 | \end{tikzpicture} 20 | 21 | \end{document} 22 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-5-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=.8] 11 | \tkzInit[xmin=5,xmax=40,ymin=0,ymax=350,xstep=2.5,ystep=25] 12 | \tkzAxeX[label=$q$] 13 | \tkzAxeY[label=$C(q)$] \tkzGrid 14 | \tkzFct[domain=5:40]{0.1*\x**2+2*\x+60} 15 | \foreach \vv in {5,10,...,40}{% 16 | \tkzDefPointByFct(\vv) 17 | \tkzDrawPoint(tkzPointResult)} 18 | \tkzFct[domain=5:40]{(108*log(\x)-158)} 19 | \tkzText(37.5,280){$C$} 20 | \tkzText(37.5,220){$R$} 21 | \tkzDefSetOfPoints{% 22 | 5/15,10/90,15/135,20/170,25/190,30/200,35/230,40/240} 23 | \tkzDrawSetOfPoints[mark = x,mark size=3pt] 24 | \end{tikzpicture} 25 | 26 | \end{document} 27 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-8-2-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=2] 11 | \tkzInit[xmin=0,xmax=3,xstep=1, 12 | ymin=-2,ymax=2,ystep=1] 13 | \tkzGrid 14 | \tkzAxeXY 15 | \tkzFct[domain= 0.4:3]{1./x} 16 | \tkzDefPointByFct(1) 17 | \tkzGetPoint{A} 18 | \tkzDefPointByFct(2) 19 | \tkzGetPoint{B} 20 | \tkzLabelPoints[above right](A,B) 21 | \tkzDrawArea[color=blue!30, 22 | domain = 1:2] 23 | \tkzFct[domain = 0.5:3]{log(x)} 24 | \tkzDrawArea[color=red!30, 25 | domain = 1:2] 26 | \tkzPointShowCoord(A) 27 | \tkzPointShowCoord(B) 28 | \tkzDrawPoints(A,B) 29 | \end{tikzpicture} 30 | 31 | \end{document} 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tkz-fct-doc-zh-cn 2 | tkz-fct二维函数曲线绘图宏包使用手册中文翻译,欢迎大家批评指正。 3 | 4 | #### 介绍 5 | 计划将[tkz-fct二维函数曲线绘图宏包使用手册](https://github.com/tkz-sty/tkz-fct)翻译成中文,以方便后期查阅和使用。 6 | 7 | #### 说明 8 | 1. 为保持与原说明手册格式一致,仅在原`tkz-doc.cls`文档类中添加了`ctex`宏包的调用,并更名为`tkz-doc-zh.cls`。 9 | 2. 为便于组织和管理文档,将原文件结构用`subfiles`宏包分文件夹进行了管理,在每个文件夹中可以单独编译各章节。 10 | 3. 仅在TeXLive2020+Ubuntu 20.04下用`latexmk`+` xelatex`进行了编译,不保证其它发行版和操作平台的正确编译。 11 | 12 | ### 贡献 13 | 由于对原手册是用法文写的,我并不懂法文,本次翻译主要借助"百度在线翻译",结合对手册中示例代码的理解翻译的,受能力所限,无保证翻译的准确性和合理性。另外,由于时间和精力有限,暂未对翻译内容进行校对和修订,如果您有任何改进意见或者功能需求,欢迎提交 [issue](https://github.com/registor/tkz-fct-doc-zh-cn/issues) 或 [pull request](https://github.com/registor/tkz-fct-doc-zh-cn/pulls)。 14 | 15 | ### 许可证 16 | 17 | 本模板的发布遵守 [LaTeX Project Public License](http://www.latex-project.org/lppl.txt)(版本 1.3c 或更高)。 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-16-1-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \def\Asmall{0.7 } \def\Abig{3 } \def\B{20}%Herbert Voss 12 | \path[fill=blue!40!black,domain=-pi:pi,samples=500,smooth,variable=\t]% 13 | plot({\Abig*cos(\t r)+\Asmall*cos(\B*\t r)},% 14 | {0.5*\Abig*sin(\t r)+0.5*\Asmall*sin(\B*\t r)}); 15 | \def\Asmall{0.7 } \def\Abig{3 } \def\B{10} 16 | \path[shift={(1,1)},fill=blue!40!black,% 17 | domain=-pi:pi,samples=500,smooth,variable=\t]% 18 | plot({\Abig*cos(\t r)+\Asmall*cos(\B*\t r)},% 19 | {0.5*\Abig*sin(\t r)+0.5*\Asmall*sin(\B*\t r)}); 20 | \end{tikzpicture} 21 | 22 | \end{document} 23 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-7-2-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[xscale=1.5] 11 | \tikzset{tan style/.style={-}} 12 | \tkzInit[xmin=0,xmax=800,xstep=100, 13 | ymin=0,ymax=1800,ystep=400] 14 | \tkzGrid[color=brown,sub,subxstep=50,subystep=200](0,0)(800,1800) 15 | \tkzAxeXY 16 | \tkzFct[color=red,samples=100,domain = 0:800]% 17 | {(1./90000)*\x*\x*\x-(1./100)*\x*\x+(113./36)*\x} 18 | \tkzDrawTangentLine[color=blue,kr=300,kl=450,coord](450) 19 | \tkzText[draw, color = black,% 20 | fill = brown!50, opacity = 0.8](300,1200)% 21 | {$f(x)=\dfrac{1}{90000}x^3 -\dfrac{1}{{100}}x^2 +\dfrac{113}{36}x$} 22 | \end{tikzpicture} 23 | 24 | \end{document} 25 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-10-8-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1.25] 11 | \tkzInit 12 | \tkzGrid 13 | \tkzAxeXY 14 | \tkzFct[color=red,domain=1.001:1.9]{1+1/(log(x-1)**2)} 15 | \tkzFct[color=red,domain = 2.1:10]{1+1/(log(x-1)**2)} 16 | \tkzHLine[line width=1pt,color=red]{1} 17 | \tkzVLine[line width=1pt,color=blue]{2} 18 | \tkzDefPoint(1,1){A} 19 | \tkzDrawPoint[fill=white,color=Maroon,size=10](A) 20 | \tkzDefPointByFct[draw,with=b]({1+exp(1)}) 21 | \tkzLabelPoint[above right](tkzPointResult){$(1+\text{e}~;~2)$} 22 | \tkzText[draw,color = black,fill = brown!20](6,6)% 23 | {$f(x)=\dfrac{1}{\ln^2 (x-1)}+1$} 24 | \end{tikzpicture} 25 | 26 | \end{document} 27 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-7-4-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=4] 11 | \tkzInit[xmax=3,ymax=2] 12 | \tkzAxeXY 13 | \tkzGrid(0,0)(3,2) 14 | \tkzFct[color = red, domain = 1/3:3]{0.125*(3*x-1)+0.375*(3*x-1)/(x*x)} 15 | \tkzFct[color = blue, domain = 1/3:3]{0.125*(3*x-1)} 16 | \tkzDrawTangentLine[with=a, 17 | color=blue](1) 18 | \tkzText[draw, 19 | color= red, 20 | fill=brown!50](1,1.5)% 21 | {$f(x)=\frac{1}{8}(3x-1)+\frac{3}{8}\left(\frac{3x-1}{x^2}\right)$} 22 | \tkzText[draw, 23 | color= green!50!black, 24 | fill=brown!50](2,0.3)% 25 | {$g(x)=\frac{1}{8}(3x-1)$} 26 | \end{tikzpicture} 27 | 28 | \end{document} 29 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-8-2.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[xscale=4,yscale=1.5] 11 | \tkzInit[xmin=0,xmax=3,ymax=3,ymin=-4] 12 | \tkzGrid(0,-4)(3,3) 13 | \tkzAxeXY 14 | \tkzClip 15 | \tkzVLine[color=red,style=dashed]{1/3} 16 | \tkzFct[color=red,domain = 0.35:3]{-3/(x*x) +4/(3*x-1)} 17 | \tkzFct[color=blue,domain = 0.35:3]{-3/(x*x) +27/(4*(3*x-1))} 18 | \tkzFct[color=orange,domain = 0.35:3]{-3/(x*x) +8/(3*x-1)} 19 | \tkzFct[color=green,domain = 0.35:3]{-3/(x*x) +7/(3*x-1)} 20 | \tkzText[draw,fill = white,text=Maroon](2,-2)% 21 | {$f(x)=-\dfrac{3}{x^2}+\dfrac{8\alpha}{3x-1}$ \hspace{.5cm}% 22 | avec $\alpha \in% 23 | \left\{\dfrac{1}{2}~;~\dfrac{27}{32}~;~\dfrac{7}{8}~;~1\right\}$} 24 | \end{tikzpicture} 25 | 26 | \end{document} 27 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-8-1.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=4] 11 | \tkzInit[xmax=3,ymax=2]; 12 | \tkzAxeXY 13 | \tkzGrid(0,0)(3,2) 14 | \tkzFct[color = red,domain =1/3:3]{0.125*(3*\x-1)+0.375*(3*\x-1)/(\x*\x)} 15 | \tkzDefPointByFct[draw](2) 16 | \tkzDefPointByFct[draw](3) 17 | \tkzDrawTangentLine[draw,color=blue](1) 18 | \tkzFct[color = green,domain =1/3:3]{0.125*(3*x-1)} 19 | \tkzSetUpPoint[size=8,fill=orange] 20 | \tkzDefPointByFct[draw](3) 21 | \tkzDefPointByFct[draw](1/3) 22 | \tkzDefPoint(1,1){f} 23 | \tkzDrawPoint(f) 24 | \tkzText[draw,fill = white,text=red](1,1.5)% 25 | {$f(x)=\dfrac{1}{8}(3x-1)+\dfrac{3}{8}\left(\dfrac{3x-1}{x^2}\right)$} 26 | \tkzText[draw,fill = white,text=green](2,0.4){$g(x) = \dfrac{3x-1}{8}$} 27 | \end{tikzpicture} 28 | 29 | \end{document} 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Auxiliary files 2 | *.aux 3 | *.auxlock 4 | *.bak 5 | *.bbl 6 | *.bcf 7 | *.blg 8 | *.dpth 9 | *.fdb_latexmk 10 | *.fls 11 | *.glg 12 | *.glo 13 | *.gls 14 | *.hd 15 | *.idx 16 | *.ilg 17 | *.ind 18 | *.lof 19 | *.log 20 | *.lot 21 | *.md5 22 | *.out 23 | *.run.xml 24 | *.sav 25 | *.synctex.gz 26 | *.synctex(busy) 27 | *.thm 28 | *.toc 29 | 30 | # Generated files (binary) 31 | *.dvi 32 | *.xdv 33 | *.pdf 34 | !doc-zh-cn/main.pdf 35 | !doc-fr/*.pdf 36 | 37 | # Generated files (gnuplot) 38 | *.gnuplot 39 | *.table 40 | 41 | # GitHub Pages 42 | docs/_site/ 43 | docs/.sass-cache/ 44 | docs/images/font-samples/ 45 | docs/.jekyll-metadata 46 | docs/Gemfile.lock 47 | 48 | # Folders 49 | .vs/ 50 | .vscode/ 51 | build/ 52 | logo/ 53 | release/ 54 | support/ 55 | TDS/ 56 | temp/ 57 | thesis/ 58 | tools/ 59 | 60 | # Other 61 | .DS_Store 62 | *.bat 63 | *.json 64 | *.txt 65 | docs/tex/images/ 66 | source/*.md 67 | source/*.sh 68 | source/*.tex 69 | test/*.sh 70 | test/latexmkrc 71 | test/dtxtest/ 72 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-1-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=3] 11 | \tkzInit[xmin=0,xmax=4,ymin=-1.5,ymax=1.5] 12 | \tkzAxeY[label=$f(x)$] 13 | \tkzDefPoint(1,0){x} \tkzDrawPoint[color=blue,size=0.6pt](x) 14 | \shade[top color=gray!80,bottom color=gray!20] (1,0)% 15 | plot[id=ln,domain=1:2.718] function{log(x)} |-(1,0); 16 | \draw[color=blue] plot[id=ln,domain=0.2:4,samples=200]function{log(x)}; 17 | \tkzAxeX 18 | \tkzText[draw,color= black,fill=brown!50](2,-1)% 19 | {$\mathcal{A} = \int_1^{\text{e}}\ln(x)\text{d}x =% 20 | \big[x\ln(x)\big]_{1}^{\text{e}} = \text{e}$} 21 | \tkzText[draw,color= black,fill=brown!50](2,0.3){$\mathcal{A}$} 22 | \end{tikzpicture} 23 | 24 | \end{document} 25 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-5-6-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=4] 11 | \tkzInit[xmax=3,ymax=2] 12 | \tkzAxeX 13 | \tkzAxeY 14 | \tkzGrid(0,0)(3,2) 15 | \tkzFct[color = red,domain = 1./3:3]{0.125*(3*x-1)+0.375*(3*x-1)/(x*x)} 16 | \tkzFct[color = green,domain = 1./3:3]{0.125*(3*x-1)} 17 | \tkzSetUpPoint[shape=circle, size = 10, color=black, fill=lightgray] 18 | \tkzDefPointByFct[draw,with = a](1) 19 | \tkzDefPointByFct[draw,with = a](2) 20 | \tkzDefPointByFct[draw,with = a](3) 21 | \tkzDefPointByFct[draw,with = b](3) 22 | \tkzDefPointByFct[draw,with = b](1/3) 23 | \tkzText[draw,color= red,fill=red!20](1,1.5) % 24 | {$f(x)=\frac{1}{8}(3x-1)+\frac{3}{8}% 25 | \left(\frac{3x-1}{x^2}\right)$} 26 | \tkzText[draw,color= green!50!black,fill=green!20]% 27 | (2,0.3){$g(x)=\frac{1}{8}(3x-1)$} 28 | \end{tikzpicture} 29 | 30 | \end{document} 31 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-8-11-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=.75] 11 | \tkzInit[xmax=20,ymax=12] 12 | \tkzGrid[color=orange,sub](0,0)(20,12) 13 | \tkzAxeXY 14 | \tkzFct[samples=400,domain =0:8]{(32-4*x)**(0.5)} % a 15 | \tkzFct[samples=400,domain =0:18]{(72-4*x)**(0.5)} % b 16 | \tkzFct[samples=400,domain =0:20]{(112-4*x)**(0.5)} % c 17 | \tkzFct[samples=400,domain =2:20]{(152-4*x)**(0.5)} % d 18 | \tkzFct[samples=400,domain =12:20]{(192-4*x)**(0.5)}% e 19 | \def\tkzFctgnuf{0} % f 20 | \def\tkzFctgnug{12}% g 21 | \tkzDrawAreafg[between= b and a,color=gray!80,domain = 0:8] 22 | \tkzDrawAreafg[between= b and f,color=gray!80,domain = 8:18] 23 | \tkzDrawAreafg[between= d and c,color=gray!50,domain = 2:20] 24 | \tkzDrawAreafg[between= g and c,color=gray!50,domain = 0:2] 25 | \tkzDrawAreafg[between= g and e,color=gray!20,domain =12:20] 26 | \end{tikzpicture}% 27 | 28 | \end{document} 29 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-2-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=1] 11 | \tkzInit[xmax=1,ymax=1,xstep=0.1,ystep=0.1] 12 | \tkzGrid(0,0)(1,1) 13 | \tkzAxeXY 14 | \tkzFct[color = red,domain = 0:1]{(exp(\x)-1)/(exp(1)-1)} 15 | \tkzDrawTangentLine[kl=0,kr=0.4,color=red](0) 16 | \tkzDrawTangentLine[kl=0.2,kr=0,color=red](1) 17 | \tkzText[draw,color = red,fill = brown!30](0.4,0.6)% 18 | {$f(x)=\dfrac{\text{e}^x-1}{\text{e}-1}$} 19 | \tkzFct[color = blue,domain = 0:1]{\x*\x*\x} 20 | \tkzDrawTangentLine[kl=0,kr=0.4,color=blue](0) 21 | \tkzDrawTangentLine[kl=0.2,kr=0,color=blue](1) 22 | \tkzText[draw,color = blue,fill = brown!30](0.8,0.1){$g(x)=x^3$} 23 | \tkzFct[color = orange,style = dashed,domain = 0:1]{\x} 24 | \tkzDrawAreafg[between=c and b,color=blue!40,domain = 0:1] 25 | \tkzDrawAreafg[between=c and a,color=red!60,domain = 0:1] 26 | \end{tikzpicture} 27 | 28 | \end{document} 29 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-4-0.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture}[scale=0.8] 11 | \tkzInit[xmax=14,ymax=12] 12 | \draw[thin,->] (0,0) -- (14,0) node[below left] {}; 13 | \draw[thin,->] (0,0) -- (0,12) node[below left] {}; 14 | \foreach \x/\xtext in {0/0,2/10,4/20,6/30,8/40,10/50,12/60,14/70}% 15 | {\draw[shift={(\x,0)}] node[below] {$\xtext$ };} 16 | \foreach \y/\z in {0/0,3/1,6/2,9/3,12/4}% 17 | {\draw[shift={(0,\y)}] node[left] {$10^{\z}$};} 18 | \foreach \x in {1,2,...,14}{\tkzVLine[gray,thin]{\x}} 19 | \foreach \y in {3,6,...,12}{\tkzHLine[gray,thin]{\y}} 20 | \foreach \y in {0,3,...,9}{ 21 | \foreach \z in {0.903,1.431,1.806,2.097,2.334,2.535,2.709,2.863}% 22 | {\tkzHLine[thin,gray,shift={(0,\y)}] {\z}}} 23 | \tkzDefPoint(0,6.90){a} 24 | \tkzDefPoint(10,9.30){b} 25 | \tkzDrawPoints(a,b) 26 | \tkzLabelPoint(a){$M_{1}$} 27 | \tkzLabelPoint(b){$M_{11}$} 28 | \end{tikzpicture} 29 | 30 | \end{document} 31 | -------------------------------------------------------------------------------- /doc-zh-cn/chap12/TKZdoc-fct-symbol.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Symboles} 4 | \section{标记符号} 5 | % Certains ajoutent aux courbes des symboles afin de donner des indications supplémentaires au lecteur. Voici quelques exemples possibles~: 6 | 可以通过为曲线添加不同标记符号以区分不同函数曲线,如: 7 | 8 | \begin{tikzpicture} 9 | \draw[thick,(-)](0,0)--(2,2); 10 | \draw[thick,o-o](2,0)--(4,2); 11 | \draw[thick,)-(](4,0)--(6,2); 12 | \draw[thick,*-*](6,0)--(8,2); 13 | \end{tikzpicture} 14 | 15 | \newcommand{\cred}[1]{{\color{red}#1}} 16 | \newcommand{\cgreen}[1]{{\color{green!50!black}#1}} 17 | \newcommand{\cblue}[1]{{\color{blue}#1}} 18 | 19 | % L'exemple suivant est de \tkzname{Simon Schläpfer}~: 20 | 一个\tkzname{Simon Schläpfer}的例子: 21 | 22 | 可以分别标记分段函数不同的定义域函数曲线。 23 | \[ 24 | y=\left\{\begin{array}{ll} 25 | \cred{8-1.5x}&,\text{if }x<2\\ 26 | \cblue{4}&,\text{if }2 \leq x \leq 3\\ 27 | \cgreen{2x-4}&,\text{if } x>3 28 | \end{array} 29 | \right. 30 | \] 31 | 32 | \begin{center} 33 | \begin{tkzexample}[vbox] 34 | \begin{tikzpicture} 35 | \tkzInit[xmin=-1,xmax=6,ymin=0,ymax=10,xstep=1,ystep=1] 36 | \tkzGrid[color=gray] 37 | \tkzAxeXY 38 | \tkzFct[{-[},color=red,domain =-1:2,samples=2]{8-1.5*\x} 39 | \tkzFct[{[-]},color=blue,domain =2:3,samples=2]{4} 40 | \tkzFct[{]-},color=green!50!black,domain =3:6,samples=2]{2*\x-4} 41 | \end{tikzpicture} 42 | \end{tkzexample} 43 | 44 | \end{center} 45 | 46 | 47 | \end{document} 48 | \endinput 49 | -------------------------------------------------------------------------------- /examples/latex/tkzFct-14-6-1.tex: -------------------------------------------------------------------------------- 1 | % 2 | % tkz-euclide (14/01/2011) 3 | % 4 | % Coding (utf8) Creator (TeX) Producer (pdfeTeX) 5 | % Author Alain Matthes 6 | \input{tkzfctpreamble.ltx} 7 | 8 | \begin{document} 9 | 10 | \begin{tikzpicture} 11 | \tkzInit[xmin=-1,xmax=1,ymin=-1.8,ymax=1.2,xstep=0.1,ystep=0.2] 12 | \tkzGrid 13 | \tkzAxeXY 14 | \tkzFct[samples = 400, line width=4pt, color = red,opacity=.5](-1---1){1/(1+8*\x*\x)} 15 | \tkzFct[smooth,samples = 400, line width=1pt, color = blue,domain =-1:1]% 16 | {1.0+(((((((((((((((((((( 17 | 8140.04642)*\x 18 | +0.01544)*\x 19 | -32356.67279)*\x 20 | -0.05562)*\x 21 | +54061.87086)*\x 22 | +0.08097)*\x 23 | -49850.83249)*\x 24 | -0.05934)*\x 25 | +28118.29594)*\x 26 | +0.02540)*\x 27 | -10240.01777)*\x 28 | -0.00580)*\x 29 | +2516.04640)*\x 30 | +0.00071)*\x 31 | -444.23476)*\x 32 | -0.00004)*\x 33 | +62.60245)*\x 34 | +0.00000)*\x 35 | -7.99142)*\x 36 | -0.00000)*\x} 37 | \tkzSetUpPoint[size=16,color=black,fill=yellow] 38 | \foreach \v in {-1,-0.8,---.,1}{\tkzDefPointByFct[draw](\v)} 39 | \end{tikzpicture} 40 | 41 | \end{document} 42 | -------------------------------------------------------------------------------- /doc-zh-cn/chap05/TKZdoc-fct-label.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Labels} 4 | \section{标注} 5 | 6 | % Ce qui est souhaitable, c'est de pouvoir nommer les courbes. Prenons comme exemple, la fonction $f$ définie par : 7 | 可以在绘制函数曲线后,为函数曲线添加标注,如函数$f$定义为: 8 | 9 | \[ 10 | f(x)=\dfrac{x^2+1}{x^3} \text{其中}\ x>0\ 11 | \] 12 | 13 | % Il est assez aisé de mettre un titre en utilisant la macro \tkzcname{tkzText} du package \tkzname{tkz-base}. Les coordonnées utilisées font référence aux unités des axes du repère. Pour placer un texte le long de la courbe, le plus simple est choisir un point de la courbe, puis d'utiliser celui-ci pour afficher le texte. 14 | 可以使用\tkzname{tkz-base}宏包的\tkzcname{tkzText}命令添加标注, 15 | 可以直接指定标注坐标。 16 | 如果需要沿曲线添加标注,则最简单的方法是通过函数曲线定义一点,然后用该点为标注定位。 17 | 18 | \begin{tkzltxexample}[num] 19 | \tkzDefPointByFct(3) 20 | \tkzText[above right](tkzPointResult){${\mathcal{C}}_f$} 21 | \end{tkzltxexample} 22 | 23 | % La première ligne détermine un point de la courbe. Ce point est rangé dans \tkzname{tkzPointResult}. Il suffit d'utiliser \tkzcname{tkzText} avec ce point comme argument comme le montre la seconde ligne. Les options de \TIKZ\ permettent d'affiner le résultat. 24 | 第1句代码使用函数定义了一个点,可以使用\tkzname{tkzPointResult}得到该点。 25 | 第2句代码使用定义的点为标注定位,当然,\TIKZ{}能够对结果进行优化。 26 | 27 | \subsection{添加标注示例} 28 | 29 | \begin{center} 30 | \begin{tkzexample}[vbox] 31 | \begin{tikzpicture} 32 | \tkzInit[xmin=0,xmax=10, 33 | ymin=-0.5,ymax=1.2,ystep=0.2] 34 | \tkzGrid 35 | \tkzAxeXY 36 | \tkzClip 37 | \tkzFct[thick,color=red,domain=0.55:10]{(\x*\x+\x-1)/(\x**3)} 38 | \tkzText(3,-0.3){\textbf{曲线} $\mathbf{f}$} 39 | \tkzDefPointByFct(3) 40 | \tkzText[above right,text=red](tkzPointResult){${\mathcal{C}}_f$} 41 | \end{tikzpicture} 42 | \end{tkzexample} 43 | \end{center} 44 | 45 | %<---------------------------------------------------------------------------> 46 | \end{document} 47 | -------------------------------------------------------------------------------- /doc-zh-cn/chap19/TKZdoc-fct-liste.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Liste de toutes les macros} 4 | \section{命令列表} 5 | 6 | % \subsection{Liste de toutes les macros fournies par ce package} 7 | \subsection{\tkzname{tkz-fct}宏包提供的所有命令} 8 | 9 | \begin{itemize} 10 | \item \tkzhname{\hyperlink{tfct}{tkzFct}}[samples=200,domain=-5:5,color=black,id=tkzfct]\var{gnuplot语法函数表达式} 11 | \item \tkzhname{\hyperlink{tptfct}{tkzDefPointByFct}}[draw=false]\parg{点名称} --> tkzPointResult 12 | \item \tkzhname{\hyperlink{tdtl}{tkzDrawTangentLine}}[draw=false,color=black,kr=1,kl=1,style=solid,with=a]\parg{点名称} 13 | \item \tkzhname{\hyperlink{tda}{tkzDrawArea}}[domain=-5:5,color=lightgray,opacity=.5] 14 | \item \tkzhname{\hyperlink{tda}{tkzArea}}[domain=-5:5,color = lightgray,opacity=.5] 15 | \item \tkzhname{\hyperlink{tdafg}{tkzDrawAreafg}}[domain=-5:5,between= a and b] 16 | \item \tkzhname{\hyperlink{tdafg}{tkzAreafg}}[domain=-5:5,between= a and b] 17 | \item \tkzhname{\hyperlink{tfpa}{tkzFctPar}}[samples=200,domain=-5:5, 18 | line width=1pt,id=tkzfctpar]{$x(t)$}{$y(t)$} 19 | \item \tkzhname{\hyperlink{tfpo}{tkzFctPolar}}[samples=200,domain=0:2*pi, 20 | line width=1pt,id=tkzfctpolar]{$\rho(t)$} 21 | \item \tkzhname{\hyperlink{tdrs}{tkzDrawRiemannSum}}[interval=1:2,number=10,fill=gray] 22 | \item \tkzhname{\hyperlink{tdrsi}{tkzDrawRiemannSumInf}} [interval=1:2,opacity=.5,fill=gray] 23 | \item \tkzhname{\hyperlink{tdrss}{tkzDrawRiemannSumSup}} [interval=1:2,number=10,fill=gray] 24 | \item \tkzhname{\hyperlink{tdrsm}{tkzDrawRiemannSumMid}}[interval=1:2,opacity=1,fill=gray] 25 | \end{itemize} 26 | 27 | \subsection{\tkzname{tkz-base}宏包提供的命令} 28 | 29 | \begin{itemize} 30 | \item \tkzcname{tkzInit}[xmin=0,xmax=10,xstep=1,ymin=0,ymax=10,ystep=1] 31 | \item \tkzcname{tkzAxeX} 32 | \item \tkzcname{tkzDrawX} 33 | \item \tkzcname{tkzLabelX} 34 | \item \tkzcname{tkzAxeY} 35 | \item \tkzcname{tkzDrawY} 36 | \item \tkzcname{tkzLabelY} 37 | \item \tkzcname{tkzGrid} 38 | \item \tkzcname{tkzClip} 39 | \item \tkzcname{tkzDefPoint} 40 | \item \tkzcname{tkzDrawPoint} 41 | \item \tkzcname{tkzPointShowCoord} 42 | \item \tkzcname{tkzLabelPoint} 43 | \end{itemize} 44 | \end{document} 45 | \endinput 46 | -------------------------------------------------------------------------------- /doc-zh-cn/couverture.tex: -------------------------------------------------------------------------------- 1 | %<--------- Couverture des documentations -------------------------------- 2 | 3 | %<------------------ Make Title ------------------------------------------ 4 | 5 | \renewcommand\maketitle{% 6 | \null 7 | \AddToShipoutPicture*{% 8 | \setlength\unitlength{1mm} 9 | \put(0,0){% 10 | \makebox(0,0)[lb]{% 11 | \color{myblue!10}\rule{\paperwidth}{\paperheight}% 12 | }% 13 | }% 14 | \put(0,0){% 15 | \makebox(0,0)[lb]{% 16 | \color{myblue}\rule{40mm}{\paperheight}% 17 | }% 18 | }% 19 | \put(20,270){% 270 en portrait 180 20 | \rotatebox{90}{% 21 | \makebox(0,0)[r]{% 22 | \fontsize{30}{30}\color{myblue!50!white}% 23 | \bfseries 24 | \selectfont{\@title\ \tkzversionofpack}\hfill% 25 | }% 26 | }% 27 | }% 28 | \put(60,60){% 29 | \begin{pgfpicture} 30 | \pgfsys@transformxyscale{.5}{.5} 31 | \pgfmathdeclarerandomlist{color}{{myblue}{DarkBlue}{SteelBlue}{blue}{MidnightBlue}} 32 | \foreach \a in {1,...,5}{% 33 | \pgfmathrandominteger{\x}{1}{300}% 34 | \pgfmathrandominteger{\y}{1}{200}% 35 | \pgfmathrandominteger{\r}{20}{100}% 36 | \pgfmathrandominteger{\s}{5}{95}% 37 | \pgfmathrandominteger{\o}{50}{80}% 38 | \pgfmathrandomitem{\c}{color}% 39 | \pgfdeclareradialshading{ballshading}{% 40 | \pgfpoint{-10bp}{10bp}}% 41 | {% 42 | color(0bp)=(\c!15!white); 43 | color(9bp)=(\c!75!white); 44 | color(18bp)=(\c!70!black); 45 | color(25bp)=(\c!50!black); 46 | color(50bp)=(black)% 47 | }% 48 | \pgfsetfillopacity{\o/100}% 49 | \pgfpathcircle{\pgfpoint{+\x pt}{+\y pt}}{+\r pt} 50 | \pgfshadepath{ballshading}{\s}% 51 | \pgfusepath{}% 52 | }% 53 | \end{pgfpicture}} 54 | % \put(80,150){ 55 | % \begin{tikzpicture}[scale=.75,rotate=60] 56 | % \tkzDefPoints{00/0/A,12/0/B,6/12*sind(60)/C} 57 | % \foreach \density in {20,30,...,240}{% 58 | % \tkzDrawPolygon[fill=teal!\density](A,B,C) 59 | % \pgfnodealias{X}{A} 60 | % \tkzDefPointWith[linear,K=.15](A,B) \tkzGetPoint{A} 61 | % \tkzDefPointWith[linear,K=.15](B,C) \tkzGetPoint{B} 62 | % \tkzDefPointWith[linear,K=.15](C,X) \tkzGetPoint{C} 63 | % } 64 | % \end{tikzpicture}% 65 | % } 66 | \put(60,250){% 60,250 en portait 120,180 67 | \makebox(0,0)[l]{% 68 | \begin{tikzpicture} 69 | \nodeshadowedone(2,-1.25){\fontsize{60}{60} 70 | \selectfont{\tkznamecollection}} 71 | \end{tikzpicture} 72 | }% 73 | }% 74 | \put(120,50){% 75 | \makebox(0,0)[l]{% 76 | \fontsize{17}{21} 77 | \textcolor{sectioncolor}{\selectfont{著:\tkzauthorofpack}}% 78 | }% 79 | }% 80 | \put(120,40){% 81 | \makebox(0,0)[l]{% 82 | \fontsize{17}{21} 83 | \textcolor{sectioncolor}{\selectfont{译:\tkzauthoroftran(\tkzadressoftran)}}% 84 | }% 85 | }% 86 | \put(120,25){% 87 | \makebox(0,0)[l]{% 88 | \textcolor{sectioncolor}{\url{\tkzurlauthorcom}}% 89 | }% 90 | }% 91 | \put(120,30){% 92 | \makebox(0,0)[l]{% 93 | \textcolor{sectioncolor}{\today \ \ Documentation V.\tkzversionofdoc}}% 94 | }% 95 | }% 96 | \setcounter{footnote}{0}% 97 | }% 98 | %<----------------------- End Couverture ----------------------------> 99 | -------------------------------------------------------------------------------- /doc-zh-cn/chap17/TKZdoc-fct-fppgf.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Utilisation \tkzname{pgfmath} et de \tkzname{fp.sty} } 4 | \section{\tkzname{pgfmath}和\tkzname{fp.sty}} 5 | %---------------------------------------------------------------------------> 6 | % \subsection{\tkzname{pgfmath}} 7 | \subsection{\tkzname{pgfmath}} 8 | 9 | % On peut faire maintenant beaucoup de tracés sans gnuplot, voici à titre d'exemple et d'après une idée d'Herbert Voss (le membre le plus actif de la communauté Pstricks) un exemple de courbes obtenues avec seulement Tikz. 10 | 即便是没有gnuplot,也可以绘制图形,下面是\tkzname{Herbert Voss}(Pstricks社区最活跃的成员)仅使用\TIKZ{}绘图的一种方法。 11 | 12 | \begin{center} 13 | \begin{tkzexample}[] 14 | \begin{tikzpicture} 15 | \def\Asmall{0.7 } \def\Abig{3 } \def\B{20}%Herbert Voss 16 | \path[fill=blue!40!black,domain=-pi:pi,samples=500,smooth,variable=\t]% 17 | plot({\Abig*cos(\t r)+\Asmall*cos(\B*\t r)},% 18 | {0.5*\Abig*sin(\t r)+0.5*\Asmall*sin(\B*\t r)}); 19 | \def\Asmall{0.7 } \def\Abig{3 } \def\B{10} 20 | \path[shift={(1,1)},fill=blue!40!black,% 21 | domain=-pi:pi,samples=500,smooth,variable=\t]% 22 | plot({\Abig*cos(\t r)+\Asmall*cos(\B*\t r)},% 23 | {0.5*\Abig*sin(\t r)+0.5*\Asmall*sin(\B*\t r)}); 24 | \end{tikzpicture} 25 | \end{tkzexample} 26 | \end{center} 27 | 28 | % \subsection{\tkzname{fp.sty}} 29 | \subsection{\tkzname{fp.sty}} 30 | 31 | % Le principal problème de \tkzname{fp.sty} se produit lors de l'évaluation par exemple de $(-4)^2$ ce qui peut se traduire avec fp par~: 32 | \tkzname{fp.sty}的主要问题是可能会造成计算错误,如:$(-4)^2$, 33 | % 在代码中,可以先计算出该值,再在后续代码中使用该计算结果。 34 | 35 | \begin{tkzltxexample}[] 36 | \begin{tikzpicture} 37 | \FPeval\result{(-4)^2} 38 | \end{tikzpicture} 39 | \end{tkzltxexample} 40 | 41 | % ce qui donne une erreur car fp utilise les logarithmes pour faire cette évaluation. \tkzname{tkz-fct.sty} modifie la macro \tkzcname{FP@pow} pour éviter cette erreur 42 | 由于使用对数的方式进行计算,因此,这可能会造成错误。 43 | 为此,\tkzname{tkz-fct.sty}宏包通过修改\tkzname{FP@pow}宏以避免这个错误。 44 | 45 | % Pour calculer les pentes des tangentes et pour placer des points sur les courbes, mon module traduit l'expression donnée pour gnuplot et la stocke dans une commande \tkzcname{tkzFcta}, pour être utilisée ensuite avec les macros \tkzcname{tkzDefPointByFct}\ et \tkzcname{tkzDrawTangentLine}. 46 | 当需要计算切线的斜率并在函数曲线上布置点时,该宏包通过转换表达式为\tkzname{gnuplot}提供数据, 47 | 并将结果保存在\tkzname{tkzFcta}宏中, 48 | 在后续代码中,可以使用\tkzcname{tkzDefPointByFct} 和 \tkzcname{tkzDrawTangentLine}命令使用这些数据。 49 | 50 | % mais si vous voulez placer un point de ce graphe ayant pour abscisse $x=2$, il est alors préférable de choisir la première méthode. 51 | 不过,如果需要在该图中放置一个$x=2$的点,建议使用第一种方法比较合理。 52 | 53 | % Sinon pour une fonction polynômiale, il sera nécessaire pour utiliser les macros relatives aux images et aux tangentes de mettre le polynôme sous la forme d'Horner. 54 | % Ainsi avec \tkzcname{tkzFct}, l'argument $x^4-2x^3+4x-5$ peut être écrit : |-5+x*(0.5+4*x*(x*(-2+x*1)))|. 55 | 否则,对于多项式函数,在使用与图像切线相关的命令时,需要将多项式表示为\tkzname{Horner}的形式。 56 | 在使用\tkzcname{tkzFct}命令时,需要将$x^4-2x^3+4x-5$改写成: 57 | |-5+x*(0.5+4*x*(x*(-2+x*1)))|.\ 58 | 59 | % Voici ce qu'il faut donc faire : 60 | 因此,需要做的是: 61 | 62 | \begin{center} 63 | \begin{tkzexample}[] 64 | \begin{tikzpicture} 65 | \tkzInit[xmin=-0.2,xmax=0.2,xstep=.1, 66 | ymin=-12,ymax=6,ystep=2] 67 | \tkzGrid 68 | \tkzAxeXY 69 | \tkzFct[domain = -.1:.2]% 70 | {-5+x*(0.5+4*x*(x*(-2+x*1)))} 71 | \end{tikzpicture} 72 | \end{tkzexample} 73 | \end{center} 74 | 75 | \end{document} 76 | \endinput 77 | -------------------------------------------------------------------------------- /doc-zh-cn/tkz-doc.cfg: -------------------------------------------------------------------------------- 1 | % Copyright 2020 Alain Matthes 2 | % This work may be distributed and/or modified under the 3 | % conditions of the LaTeX Project Public License, either version 1.3 4 | % of this license or (at your option) any later version. 5 | % The latest version of this license is in 6 | % http://www.latex-project.org/lppl.txt 7 | % and version 1.3 or later is part of all distributions of LaTeX 8 | % version 2005/12/01 or later. 9 | % 10 | % This work has the LPPL maintenance status “maintained”. 11 | % 12 | % The Current Maintainer of this work is Alain Matthes. 13 | 14 | % original tkz-doc.cfg 15 | % 16 | % If you modify this original file, YOUR CHANGES WILL BE LOST when it is 17 | % updated. Instead, put your changes in the entire copy of tkz-base.cfg 18 | % and save the file in a directory part of your TEXINPUTS environment 19 | % variable. 20 | %=============================================================================== 21 | 22 | \def\fileversion{1.43c} 23 | \def\filedate{2020/04/10} 24 | \typeout{2020/04/10 1.43c tkz-doc.cfg} 25 | 26 | % ============= colors ========================================================= 27 | 28 | % \definecolor [⟨type⟩]{⟨name⟩}{⟨model-list⟩}{⟨spec-list⟩} 29 | % \providecolor [⟨type⟩]{⟨name⟩}{⟨model-list⟩}{⟨spec-list⟩} 30 | % \colorlet [⟨type⟩]{⟨name⟩}[⟨num model⟩]{⟨color⟩} 31 | \definecolor{myblue}{RGB}{020,120,180} 32 | \definecolor{fondpaille}{cmyk}{0,0,0.1,0} 33 | \definecolor{bistre}{rgb}{.75,.50,.30} 34 | \definecolor{textcolor}{RGB}{0, 0, 0} 35 | \providecolor{bistre}{rgb}{.75,.50,.30} 36 | \definecolor{mygray}{gray}{0.1} 37 | 38 | \colorlet{sectioncolor}{MidnightBlue} 39 | \colorlet{titlecolorbox}{gray!10} 40 | \colorlet{pdflinkcolor}{myblue} 41 | \colorlet{pdfurlcolor}{MidnightBlue} 42 | \colorlet{pdffilecolor}{Peach} 43 | \colorlet{stringcolor}{myblue!40!black!100} 44 | \colorlet{commencolor}{blue!0!black!100} 45 | 46 | \colorlet{graphicbackground}{white} 47 | \colorlet{codebackground}{lightgray!30} 48 | \colorlet{codeonlybackground}{lightgray!30} 49 | \colorlet{numbackground}{white} 50 | \colorlet{textcodecolor}{darkgray} 51 | \colorlet{numcolor}{black} 52 | 53 | \definecolor{Salmon}{RGB}{178,51,51} 54 | \definecolor{BrickRed}{RGB}{233,49,16} 55 | \definecolor{TealBlue}{RGB}{16,83,165} 56 | \definecolor{ForestGreen}{RGB}{10,112,43} 57 | \definecolor{Tangerine}{RGB}{244,176,108} 58 | \definecolor{DarkBrown}{RGB}{130,65,0} 59 | \definecolor{blueGrey}{rgb}{0.4,0.48,0.53} 60 | \def\tkzred{\color{red}} 61 | \def\tkzblue{\color{blue}} 62 | %--------------- mots importants et macros --------------------------------- 63 | \newcommand*{\BS}{\texttt{\char92}} 64 | \newcommand*{\tkz}{T{\em k}Z} 65 | \newcommand*{\PGF}{\tkzname{PGF}} 66 | \newcommand*{\TIKZ}{Ti\textsl{k}Z} 67 | \newcommand*{\pdf}{\textsc{pdf}} 68 | \newcommand*{\pgfname}{\textsc{pgf}} 69 | \newcommand*{\tikzname}{Ti{\em k}Z} 70 | \newcommand*{\tkzdft}[1]{{\texttt{#1}}} 71 | \newcommand*{\tkzAttention}[3]{\ \\\llap{\textcolor{#3}{#1\hskip #2}}} 72 | \newcommand*{\tkzHand}{\ \\\llap{\textcolor{red}{\lefthand\hskip1em}}} 73 | \newcommand*{\tkzBomb}{\ \\\llap{\textcolor{red}{\bomb\hskip1em}}} 74 | \newcommand*{\tkzTwoBomb}{\ \\\llap{\textcolor{red}{\bomb\ \bomb\hskip1em}}} 75 | \newcommand*{\tkzname}[1]{\textbf{\texttt{\textcolor{black}{#1}}}} 76 | \newcommand*{\tkzimp}[1]{\textbf{#1}} 77 | \newcommand*{\tkzHandBomb}{\ \\\llap{\textcolor{red}{\lefthand\ \bomb\hskip1em}}} 78 | \providecommand\LaTeX{L\kern-.36em\raise.3ex\hbox{\sc a}\kern-.15em\TeX} 79 | \providecommand\LATEX{\LaTeX} 80 | \renewcommand\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\spacefactor1000} 81 | \providecommand\TEX{\TeX} 82 | %------------------------------------------------------------------------------- 83 | \def\tkz@background@color{white} 84 | \def\tkz@text@color{black} 85 | \global\edef\tkz@suc@bkc{\tkz@background@color} 86 | \global\edef\tkz@suc@txt{\tkz@text@color} 87 | %------------------------------------------------------------------------------- 88 | \endinput 89 | -------------------------------------------------------------------------------- /doc-zh-cn/tikzrput.sty: -------------------------------------------------------------------------------- 1 | % pgflibraryam.code.tex (utf8 encoding) 2 | % Copyright 2020 Alain Matthes 3 | % This work may be distributed and/or modified under the 4 | % conditions of the LaTeX Project Public License, either version 1.3 5 | % of this license or (at your option) any later version. 6 | % The latest version of this license is in 7 | % http://www.latex-project.org/lppl.txt 8 | % and version 1.3 or later is part of all distributions of LaTeX 9 | % version 2005/12/01 or later. 10 | % 11 | % This work has the LPPL maintenance status “maintained”. 12 | % 13 | % The Current Maintainer of this work is Alain Matthes. 14 | 15 | \typeout{2020/04/06 1.1 pgflibraryam.code.tex} 16 | \NeedsTeXFormat{LaTeX2e}% 17 | \RequirePackage{tikz,iftex}% 18 | \ProvidesPackage{tikzrput}[2020/05/28 v1.2 rput for tikz]% 19 | \edef\tikzrputPtVirCode{\the\catcode`\;} 20 | \edef\tikzrputAtCode{\the\catcode`\@} 21 | \edef\tikzrputTwoPtCode{\the\catcode`\:} 22 | \catcode`\;=12\relax 23 | \catcode`\:=12\relax 24 | \catcode`\@=11\relax 25 | 26 | \newif\ifrput@polar\rput@polarfalse 27 | \def\rput@empty{} 28 | 29 | \def\rput@parsecoordinate#1{% 30 | \rput@getseparator#1,\@nil 31 | \ifrput@polar 32 | \rput@getfrompolar#1\@nil 33 | \fi 34 | }% 35 | \def\rput@getseparator#1,#2\@nil{% 36 | \ifx\rput@empty#2\rput@empty% 37 | \rput@polartrue 38 | \else 39 | \rput@polarfalse 40 | \fi 41 | }% 42 | \def\rput@getfrompolar#1;#2\@nil{% 43 | \def\pos@rput{#1:#2}% 44 | }% 45 | 46 | \def\rput@pos@ {\def\rput@anchor{center}} 47 | \def\rput@pos@B {\def\rput@anchor{base}} 48 | \def\rput@pos@Br {\def\rput@anchor{base east}} 49 | \def\rput@pos@Bl {\def\rput@anchor{base west}} 50 | \def\rput@pos@tr {\def\rput@anchor{north east}} 51 | \def\rput@pos@tl {\def\rput@anchor{north west}} 52 | \def\rput@pos@br {\def\rput@anchor{south east}} 53 | \def\rput@pos@bl {\def\rput@anchor{south west}} 54 | \def\rput@pos@t {\def\rput@anchor{north}} 55 | \def\rput@pos@b {\def\rput@anchor{south}} 56 | \def\rput@pos@r {\def\rput@anchor{east}} 57 | \def\rput@pos@l {\def\rput@anchor{west}} 58 | \let\rput@pos@mc\rput@pos@ 59 | \let\rput@pos@rB\rput@pos@Br 60 | \let\rput@pos@lB\rput@pos@Bl 61 | \let\rput@pos@rt\rput@pos@tr 62 | \let\rput@pos@lt\rput@pos@tl 63 | \let\rput@pos@rb\rput@pos@br 64 | \let\rput@pos@lb\rput@pos@bl 65 | \newbox\mybox 66 | \ifpdf% Pablo 04/2020 67 | \pgfutil@ifundefined{rput}{% 68 | \tikzset{rput style/.style={}} 69 | \def\rput{\pgfutil@ifnextchar[{\rput@i}{% 70 | \global\edef\opt@rput{}\rput@ii}}% 71 | \def\rput@i[#1]{\global\edef\opt@rput{#1}\rput@ii}% 72 | \def\rput@ii{\pgfutil@ifnextchar({% 73 | \def\angle@rput{0}\rput@iv}{\rput@iii}}% 74 | \def\rput@iii#1{% 75 | \ifx\rput@empty#1\rput@empty\def\angle@rput{0}\else% 76 | \def\angle@rput{#1}\fi% 77 | \pgfutil@ifnextchar({\rput@iv}{\rput@iv(0,0)}}%, 78 | \def\rput@iv(#1){\def\pos@rput{#1}% 79 | \rput@parsecoordinate{#1}% 80 | \rput@v}% 81 | \def\rput@v#1{% 82 | \sbox\mybox{% 83 | \pgfinterruptpicture#1\endpgfinterruptpicture}% 84 | \begingroup 85 | \tikzifinpicture{% 86 | \let\begin@my@tikz@env\scope 87 | \let\end@my@tikz@env\endscope 88 | }{% 89 | \let\begin@my@tikz@env\tikzpicture 90 | \let\end@my@tikz@env\endtikzpicture 91 | }% 92 | \@nameuse{rput@pos@\opt@rput}% 93 | \begin{pgfinterruptboundingbox}% 94 | \begin@my@tikz@env[overlay] 95 | \path (0,0)--(\pos@rput); 96 | \protected@edef\rput@temp{% 97 | \noexpand\node[inner sep = 0pt, 98 | anchor = \rput@anchor, 99 | rotate = \angle@rput, 100 | rput style]}% 101 | \rput@temp at (\pos@rput){\box\mybox}; 102 | \end@my@tikz@env 103 | \end{pgfinterruptboundingbox}% 104 | \endgroup 105 | \ignorespaces 106 | }% 107 | }{% 108 | }% 109 | \fi 110 | \catcode`\;=\tikzrputPtVirCode\relax 111 | \catcode`\@=\tikzrputAtCode\relax 112 | \catcode`\:=\tikzrputTwoPtCode\relax 113 | \endinput 114 | -------------------------------------------------------------------------------- /doc-zh-cn/chap08/TKZdoc-fct-riemann.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Sommes de Riemann} 4 | \section{黎曼和} 5 | \hypertarget{tdrs}{} 6 | 7 | % \begin{NewMacroBox}{tkzDrawRiemannSum}{\oarg{local options}\marg{$f(t)$}} 8 | % Cette macro permet de représenter les rectangles intervenant dans une somme de Riemann. Les options sont celles de \TIKZ, plus 9 | % 10 | % \begin{tabular}{lll} 11 | % \toprule 12 | % options & défaut & définition \\ 13 | % \midrule 14 | % \TOline{iterval}{1:2}{l'intervalle sur lequel est appliqué la méthode} 15 | % \TOline{number}{10}{nombre de sous-intervalles utilisés} 16 | % \bottomrule 17 | % \end{tabular} 18 | % 19 | % Possible est de réunir les quatres macros et de choisir la méthode avec une option. 20 | % \end{NewMacroBox} 21 | \begin{NewMacroBox}{tkzDrawRiemannSum}{\oarg{命令选项}\marg{$f(t)$}} 22 | 该命令用于绘制函数的黎曼和矩形,可以使用所有有效\TIKZ{}选项。 23 | 24 | \begin{tabular}{lll} 25 | \toprule 26 | 选项 & 默认值 & 含义 \\ 27 | \midrule 28 | \TOline{interval}{1:2}{区间长度} 29 | \TOline{number}{10}{子间隔数} 30 | \bottomrule 31 | \end{tabular} 32 | 33 | 可以组合使用四个相关命令,并为其设置相同选项。 34 | \end{NewMacroBox} 35 | 36 | \subsection{求黎曼和} 37 | 38 | \begin{tkzexample}[vbox] 39 | \begin{tikzpicture}[scale=3.5] 40 | \tkzInit[xmax=3,ymax=1.75] 41 | \tkzAxeXY 42 | \tkzGrid(0,0)(3,2) 43 | \tkzFct[color = red, domain =1/3:3]{0.125*(3*x-1)+0.375*(3*x-1)/(x*x)} 44 | \tkzDrawRiemannSum[fill=green!40,opacity=.2,color=green, 45 | line width=1pt,interval=1./2:exp(1),number=10] 46 | \end{tikzpicture} 47 | \end{tkzexample} 48 | 49 | \newpage 50 | \hypertarget{tdrsi}{} 51 | 52 | % \begin{NewMacroBox}{tkzDrawRiemannSumInf}{\oarg{local options}} 53 | % C'est une variante de la macro précédente mais les rectangles sont toujours sous la courbe. 54 | % \end{NewMacroBox} 55 | \begin{NewMacroBox}{tkzDrawRiemannSumInf}{\oarg{命令选项}} 56 | 是第1个命令的变体,但分割矩形始终位于函数曲线下方。 57 | \end{NewMacroBox} 58 | 59 | \subsection{\tkzcname{tkzDrawRiemannSumInf}命令示例} 60 | 61 | \begin{tkzexample}[vbox] 62 | \begin{tikzpicture}[scale=1.75] 63 | \tkzInit[xmin=-3,xmax=6,ymin=-2,ymax=14,ystep=2] 64 | \tkzDrawX \tkzDrawY 65 | \tkzFct[line width=2pt,color = red, domain =-3:6]{(-\x-2)*(\x-5)} 66 | \tkzDrawRiemannSumInf[fill=green!40,opacity=.5,interval=-1:5,number=10] 67 | \end{tikzpicture} 68 | \end{tkzexample} 69 | 70 | \newpage 71 | \hypertarget{tdrss}{} 72 | % \begin{NewMacroBox}{tkzDrawRiemannSumSup}{\oarg{local options}} 73 | % C'est une variante de la macro précédente mais les rectangles sont toujours au-dessus de la courbe. 74 | % \end{NewMacroBox} 75 | \begin{NewMacroBox}{tkzDrawRiemannSumSup}{\oarg{命令选项}} 76 | 第1个命令的变体,但分割矩形始终位于函数曲线上方。 77 | \end{NewMacroBox} 78 | 79 | % \subsection{Somme de Riemann Inf et Sup} 80 | \subsection{\tkzcname{tkzDrawRiemannSumSup}命令示例} 81 | \begin{tkzexample}[vbox] 82 | \begin{tikzpicture}[scale=1.75] 83 | \tkzInit[xmin=-3,xmax=6,ymin=-2,ymax=14,ystep=2] 84 | \tkzDrawX \tkzDrawY 85 | \tkzFct[line width=2pt,color = red, domain =-3:6]{(-\x-2)*(\x-5)} 86 | \tkzDrawRiemannSumSup[fill=blue!40,opacity=.5,interval=-1:5,number=10] 87 | \tkzDrawRiemannSumInf[fill=green!40,opacity=.5,interval=-1:5,number=10] 88 | \end{tikzpicture} 89 | \end{tkzexample} 90 | 91 | 92 | \newpage 93 | \hypertarget{tdrsm}{} 94 | % \begin{NewMacroBox}{tkzDrawRiemannSumMid}{\oarg{local options}} 95 | % C'est une variante de la macro précédente mais les rectangles sont à cheval sur la courbe. 96 | % \end{NewMacroBox} 97 | \begin{NewMacroBox}{tkzDrawRiemannSumMid}{\oarg{命令选项}} 98 | 第1个命令的变体,但分割矩形始终位于函数曲线。 99 | \end{NewMacroBox} 100 | 101 | % \subsection{Somme de Riemann Mid} 102 | \subsection{\tkzcname{tkzDrawRiemannSumMid}命令示例} 103 | 104 | \begin{tkzexample}[vbox] 105 | \begin{tikzpicture}[scale=1.75] 106 | \tkzInit[xmin=-3,xmax=6,ymin=-2,ymax=14,ystep=2] 107 | \tkzDrawX \tkzDrawY 108 | \tkzFct[line width=2pt,color = red, domain =-3:6]{(-\x-2)*(\x-5)} 109 | \tkzDrawRiemannSumMid[fill=blue!40,opacity=.5,interval=-1:5,number=10] 110 | \end{tikzpicture} 111 | \end{tkzexample} 112 | 113 | \end{document} 114 | \endinput 115 | -------------------------------------------------------------------------------- /doc-zh-cn/chap14/TKZdoc-fct-interpolation.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \subsection{Interpolation} 4 | \section{插值函数} 5 | 6 | % Il s'agit ici de trouver un polynôme d'interpolation sur l'intervalle $[-1~;~1]$ de la fonction $f$ définie par : 7 | 例如,需要在$[-1~;~1]$得到如下多项式$f$的插值逼近: 8 | \[ 9 | f(x)=\frac{1}{1+8x^2} 10 | \] 11 | 12 | % Le polynôme d'interpolation est celui obtenu par la méthode de \tkzimp{Lagrange} : 13 | 则可以使用拉格朗日多项式进行插值逼近: 14 | 15 | \begin{equation*} 16 | \begin{split} 17 | P(x) = &1.000000000-0.0000000072x-7.991424876x^2+0.000001079x^3+62.60245358x^4\\ 18 | & -0.00004253x^5-444.2347594x^6+0.0007118x^7+ 2516.046396x^8 -0.005795x^9\\ &-10240.01777x^{10} +0.025404x^{11}+28118.29594x^{12} -0.05934x^{13} -49850.83249x^{14} \\ 19 | & +0.08097x^{15}+54061.87086x^{16} -0.055620x^{17} -32356.67279x^{18} +0.015440x^{19}\\ 20 | &+8140.046421x^{20}\\ 21 | \end{split} 22 | \end{equation*} 23 | 24 | % Ayant utilisé vingt et un points, le polynôme est de degré $20$. Celui-ci est écrit en utilisant la méthode de \tkzimp{Horner}. Dans un premier temps, on demande à gnuplot de tracer la courbe de f en rouge, enfin on trace le polynôme d'interpolation en bleu. Les points utilisés sont en jaune. 25 | 根据\tkzimp{Horner}的定义,在此,使用21个点进行插值,并将多项式的度定义为$20$。 26 | 下面的函数曲线中,红色曲线是用\tkzname{gnuplot}绘制的函数$f$, 27 | 蓝色是插值函数,黄色为插值点。 28 | 29 | \subsection{Le code} 30 | \begin{tkzexample}[code only] 31 | \begin{tikzpicture} 32 | \tkzInit[xmin=-1,xmax=1,ymin=-1.8,ymax=1.2,xstep=0.1,ystep=0.2] 33 | \tkzGrid 34 | \tkzAxeXY 35 | \tkzFct[samples = 400, line width=4pt, color = red,opacity=.5](-1---1){1/(1+8*\x*\x)} 36 | \tkzFct[smooth,samples = 400, line width=1pt, color = blue,domain =-1:1]% 37 | {1.0+(((((((((((((((((((( 38 | 8140.04642)*\x 39 | +0.01544)*\x 40 | -32356.67279)*\x 41 | -0.05562)*\x 42 | +54061.87086)*\x 43 | +0.08097)*\x 44 | -49850.83249)*\x 45 | -0.05934)*\x 46 | +28118.29594)*\x 47 | +0.02540)*\x 48 | -10240.01777)*\x 49 | -0.00580)*\x 50 | +2516.04640)*\x 51 | +0.00071)*\x 52 | -444.23476)*\x 53 | -0.00004)*\x 54 | +62.60245)*\x 55 | +0.00000)*\x 56 | -7.99142)*\x 57 | -0.00000)*\x} 58 | \tkzSetUpPoint[size=16,color=black,fill=yellow] 59 | \foreach \v in {-1,-0.8,---.,1}{\tkzDefPointByFct[draw](\v)} 60 | \end{tikzpicture} 61 | \end{tkzexample} 62 | 63 | % Le résultat est sur la page suivante où on peut constater le phénomène de \tkzimp{Runge}. 64 | 注意结果图像中的\tkzimp{龙格}现象。 65 | \subsection{插值曲线} 66 | 67 | \begin{sidewaysfigure}[htbp] 68 | \centering 69 | \begin{tikzpicture}[scale=.75] 70 | \tkzInit[xmin=-1,xmax=1,ymin=-1.8,ymax=1.2,xstep=0.1,ystep=0.2] 71 | \tkzGrid 72 | \tkzAxeXY 73 | \tkzFct[samples = 400, line width=4pt, color = red,opacity=.5,domain =-1:1]% 74 | {1/(1+8*\x*\x)} 75 | \tkzFct[samples = 400, line width=1pt, color = blue,domain =-1:1]% 76 | {1.0+ 77 | (((((((((((((((((((( 78 | 8140.04642)*\x 79 | +0.01544)*\x 80 | -32356.67279)*\x 81 | -0.05562)*\x 82 | +54061.87086)*\x 83 | +0.08097)*\x 84 | -49850.83249)*\x 85 | -0.05934)*\x 86 | +28118.29594)*\x 87 | +0.02540)*\x 88 | -10240.01777)*\x 89 | -0.00580)*\x 90 | +2516.04640)*\x 91 | +0.00071)*\x 92 | -444.23476)*\x 93 | -0.00004)*\x 94 | +62.60245)*\x 95 | +0.00000)*\x 96 | -7.99142)*\x 97 | -0.00000)*\x} 98 | \tkzSetUpPoint[size=8,color=black,fill=yellow] 99 | \foreach \v in {-1,-0.8,---.,1}% 100 | {\tkzDefPointByFct[draw](\v)} 101 | \end{tikzpicture} 102 | \caption{Interpolation : $\dfrac{1}{1+8x^2}$} 103 | \end{sidewaysfigure} 104 | 105 | \end{document} 106 | \endinput 107 | 108 | -------------------------------------------------------------------------------- /doc-zh-cn/chap00/TKZdoc-fct-why.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Fonctionnement} 4 | \section{概述} 5 | 6 | % \TIKZ\ apporte différentes possibilités pour obtenir les représentations graphiques des fonctions. J'ai privilégié l'utilisation de \tkzname{gnuplot}, car je trouve \tkzname{pgfmath} trop lent et les résultats trop imprécis. 7 | \TIKZ{}为绘制函数曲线提供了多种方式, 8 | 但其\tkzname{pgfmath}库太慢,且结果精确不高, 9 | 因此,使用\tkzname{gnuplot}工具绘制函数曲线是一个更为合理的选择。 10 | 11 | % Avec \TIKZ\ et \tkzname{gnuplot}, on obtient la représentation d'une fonction à l'aide de 12 | 在\TIKZ{}中,使用\tkzname{gnuplot}工具\footnote{gnuplot是一个交互式命令行绘图工具, 13 | 需要提前安装该软件。}绘制函数曲线的基本语法是: 14 | 15 | \begin{tkzltxexample}[] 16 | \draw[options] plot function {gnuplot函数表达式}; 17 | \end{tkzltxexample} 18 | 19 | % Dans cette nouvelle version de \tkzname{tkz-fct}, la macro \tkzcname{tkzFct} reprend le code précédent avec les mêmes options que celles de \TIKZ. Parmi les options, les plus importantes sont \tkzname{domain} et \tkzname{samples}. 20 | 在新版\tkzname{tkz-fct}宏包中,用\tkzcname{tkzFct}命令及\TIKZ{}选项进行绘图。 21 | 其中,最重要选项是\tkzname{domain}和\tkzname{samples}。 22 | 23 | % La macro \tkzcname{tkzFct} remplace \tkzcname{draw plot function} mais exécute deux tâches supplémentaires, en plus du tracé. Tout d'abord, l'expression de la fonction est sauvegardée avec la syntaxe de \tkzname{gnuplot} et également sauvegardée avec la syntaxe de \tkzname{fp} pour une utilisation ultérieure. Cela permet, sans avoir à redonner l'expression, de placer par exemple, des points sur la courbe (les images sont calculées à l'aide de \tkzname{fp}), ou bien encore, de tracer des tangentes. 24 | 本宏包使用\tkzcname{tkzFct}命令代替了\tkzcname{draw plot function}, 25 | 同时,还实现了两个重要的操作。 26 | 首先是用\tkzname{gnuplot}语法保存函数表达式, 27 | 同时,也用\tkzname{fp}保存该函数表达式,以方便后续使用。 28 | 这使得可以在不返回表达式的情况下,在曲线上布置点(通过\tkzname{fp}计算), 29 | 或者绘制切线。 30 | 31 | % Ensuite, et c'est le plus important, \tkzcname{tkzFct} tient compte des unités utilisées pour l'axe des abscisses et celui des ordonnées. Ces unités sont définies en utilisant la macro \tkzcname{tkzInit} du package \tkzname{tkz-base} avec les options \tkzname{xstep} et \tkzname{ystep}. 32 | 当然,最重要的是,\tkzcname{tkzFct}命令能独立使用横坐标和纵坐标步长单位, 33 | 其步长单位由\tkzname{tzk-base}宏包的\tkzcname{tkzInit}命令, 34 | 通过\tkzname{xstep}和\tkzname{ystep}选项进行设置。 35 | 36 | % La macro \tkzcname{tkzFct} intercepte les valeurs données à l'option \tkzname{domain} et évidemment l'expression mathématique de la fonction; 37 | \tkzcname{tkzFct}命令可以使用\tkzname{domain}选项和函数表达式。 38 | % si \tkzname{xstep} et \tkzname{ystep} diffèrent de 1 alors il est tenu compte de ces valeurs pour le domaine, ainsi que pour les calculs d'images. Lorsque \tkzname{xstep} diffère de 1 alors l'expression donnée, doit utiliser uniquement \tkzcname{x} comme variable, c'est ainsi qu'il est possible d'ajuster les valeurs. Cela permet d'éviter des débordements dans les calculs. 39 | 如果\tkzname{xstep}和\tkzname{ystep}的步长为1, 40 | 则直接使用值域范围和计算结果绘制图像。 41 | 如果\tkzname{xstep}的步长不为1, 42 | 则表达式中的自变量须使用\tkzcname{x}宏表示, 43 | 这能有效避免计算中的数据溢出问题。 44 | 45 | % Par exemple, soit à tracer le graphe de la fonction $f$ définie par : 46 | 例如,有如下函数$f$: 47 | 48 | \[ 49 | f(x)=x^3 \text{其中} 0\leq x\leq 100 50 | \] 51 | 52 | % Les valeurs de $f(x)$ sont comprises entre 0 et $\numprint{1000000}$. En choisissant \tkzname{xstep=10} et \tkzname{ystep=100000}, les axes auront environ $10$ cm de longueur (sans mise à l'échelle). 53 | $f(x)$的值域在$0$到$\numprint{1000000}$之间, 54 | 令\tkzname{xstep=10}和\tkzname{ystep=100000}, 55 | 则坐标轴长度为$10$ cm(无缩放). 56 | 57 | % Les valeurs du domaine seront comprises entre $0$ et $10$, mais l'expression donnée à \tkzname{gnuplot}, comportera des \tkzcname{x} équivalents à $x \times 10$, enfin, la valeur finale sera divisée par \tkzname{ystep=100000}. Les valeurs de $f(x)$ resteront ainsi comprises entre $0$ et $10$. 58 | 这将可以将值域限定在$0$到$10$之间, 59 | 但\tkzname{gnuplot}表达式中的\tkzcname{x}则相当于$x \times 10$。 60 | 将计算结果除以\tkzname{ystep=100000}, 61 | 可以使$f(x)$的结果不变,仍在$0$到$10$之间。 62 | 63 | \begin{tkzexample}[latex=10cm,small] 64 | \begin{tikzpicture}[scale=.5] 65 | \tkzInit[xmax=100,xstep=10, 66 | ymax=1000000, 67 | ystep=100000] 68 | \tkzDrawX[right] 69 | \tkzDrawY[above] 70 | \tkzLabelX[below=6pt] 71 | \tkzLabelY[left=6pt] 72 | \tkzGrid 73 | \tkzFct[color=red, 74 | domain=0:100]{\x**3} 75 | \end{tikzpicture} 76 | \end{tkzexample} 77 | 78 | \end{document} 79 | \endinput 80 | -------------------------------------------------------------------------------- /doc-zh-cn/chap13/TKZdoc-fct-example.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Quelques exemples} 4 | \section{部分实例} 5 | 6 | % \subsection{Variante intermédiaire : \TIKZ\ + \tkzname{tkz-fct}} 7 | \subsection{\TIKZ\ + \tkzname{tkz-fct}实例} 8 | % Les codes de \TIKZ\ et de \tkzname{tkz-fct} peuvent se compléter. Ainsi les axes et les textes sont gérés par \tkzname{tkz-fct} mais la courbe est laissée à \TIKZ\ et \tkzname{gnuplot}. 9 | \TIKZ\ 和\tkzname{tkz-fct}可以互为补充,因此,可以用\tkzname{tkz-fct}处理坐标轴和文本, 10 | 而用\TIKZ\ 和 \tkzname{gnuplot}绘图。 11 | 12 | \bigskip 13 | 14 | \begin{center} 15 | \begin{tkzexample}[] 16 | \begin{tikzpicture}[scale=3] 17 | \tkzInit[xmin=0,xmax=4,ymin=-1.5,ymax=1.5] 18 | \tkzAxeY[label=$f(x)$] 19 | \tkzDefPoint(1,0){x} \tkzDrawPoint[color=blue,size=0.6pt](x) 20 | \shade[top color=gray!80,bottom color=gray!20] (1,0)% 21 | plot[id=ln,domain=1:2.718] function{log(x)} |-(1,0); 22 | \draw[color=blue] plot[id=ln,domain=0.2:4,samples=200]function{log(x)}; 23 | \tkzAxeX 24 | \tkzText[draw,color= black,fill=brown!50](2,-1)% 25 | {$\mathcal{A} = \int_1^{\text{e}}\ln(x)\text{d}x =% 26 | \big[x\ln(x)\big]_{1}^{\text{e}} = \text{e}$} 27 | \tkzText[draw,color= black,fill=brown!50](2,0.3){$\mathcal{A}$} 28 | \end{tikzpicture} 29 | \end{tkzexample} 30 | \end{center} 31 | 32 | \newpage 33 | \subsection{\tkzname{Lorentz}曲线} 34 | 35 | $f(x)=\dfrac{\text{e}^x-1}{\text{e}-1}$ et $g(x)=x^3$ 36 | 37 | 38 | \begin{center} 39 | \begin{tkzexample}[vbox] 40 | \begin{tikzpicture}[scale=1] 41 | \tkzInit[xmax=1,ymax=1,xstep=0.1,ystep=0.1] 42 | \tkzGrid(0,0)(1,1) 43 | \tkzAxeXY 44 | \tkzFct[color = red,domain = 0:1]{(exp(\x)-1)/(exp(1)-1)} 45 | \tkzDrawTangentLine[kl=0,kr=0.4,color=red](0) 46 | \tkzDrawTangentLine[kl=0.2,kr=0,color=red](1) 47 | \tkzText[draw,color = red,fill = brown!30](0.4,0.6)% 48 | {$f(x)=\dfrac{\text{e}^x-1}{\text{e}-1}$} 49 | \tkzFct[color = blue,domain = 0:1]{\x*\x*\x} 50 | \tkzDrawTangentLine[kl=0,kr=0.4,color=blue](0) 51 | \tkzDrawTangentLine[kl=0.2,kr=0,color=blue](1) 52 | \tkzText[draw,color = blue,fill = brown!30](0.8,0.1){$g(x)=x^3$} 53 | \tkzFct[color = orange,style = dashed,domain = 0:1]{\x} 54 | \tkzDrawAreafg[between=c and b,color=blue!40,domain = 0:1] 55 | \tkzDrawAreafg[between=c and a,color=red!60,domain = 0:1] 56 | \end{tikzpicture} 57 | \end{tkzexample} 58 | \end{center} 59 | 60 | 61 | \newpage 62 | \subsection{指数曲线} 63 | $f(x) = (-x^2+x+2)\exp(x)$ 64 | 65 | \begin{center} 66 | \begin{tkzexample}[small] 67 | \begin{tikzpicture}[scale=1.25] 68 | \tkzInit[xmin=-6,xmax=4,ymin=-5,ymax=6] 69 | \tkzGrid 70 | \tkzAxeXY 71 | \tkzFct[color=red,thick,domain=-6:2.1785]{(-x*x+x+2)*exp(x)} 72 | \tkzSetUpPoint[size=6] 73 | \tkzDrawTangentLine[draw,kl=2](0) 74 | \tkzDefPoint(2,0){b} \tkzDrawPoint(b) 75 | \tkzDefPoint(-1,0){c} \tkzDrawPoint(c) 76 | \tkzText(2,4){($\mathcal{C}$)} 77 | \tkzText(-2,-3){($\mathcal{T}$)} 78 | \end{tikzpicture} 79 | \end{tkzexample} 80 | \end{center} 81 | 82 | 83 | \subsection{对数坐标} 84 | \begin{tkzexample}[vbox] 85 | \begin{tikzpicture}[scale=0.8] 86 | \tkzInit[xmax=14,ymax=12] 87 | \draw[thin,->] (0,0) -- (14,0) node[below left] {}; 88 | \draw[thin,->] (0,0) -- (0,12) node[below left] {}; 89 | \foreach \x/\xtext in {0/0,2/10,4/20,6/30,8/40,10/50,12/60,14/70}% 90 | {\draw[shift={(\x,0)}] node[below] {$\xtext$ };} 91 | \foreach \y/\z in {0/0,3/1,6/2,9/3,12/4}% 92 | {\draw[shift={(0,\y)}] node[left] {$10^{\z}$};} 93 | \foreach \x in {1,2,...,14}{\tkzVLine[gray,thin]{\x}} 94 | \foreach \y in {3,6,...,12}{\tkzHLine[gray,thin]{\y}} 95 | \foreach \y in {0,3,...,9}{ 96 | \foreach \z in {0.903,1.431,1.806,2.097,2.334,2.535,2.709,2.863}% 97 | {\tkzHLine[thin,gray,shift={(0,\y)}] {\z}}} 98 | \tkzDefPoint(0,6.90){a} 99 | \tkzDefPoint(10,9.30){b} 100 | \tkzDrawPoints(a,b) 101 | \tkzLabelPoint(a){$M_{1}$} 102 | \tkzLabelPoint(b){$M_{11}$} 103 | \end{tikzpicture} 104 | \end{tkzexample} 105 | 106 | \subsection{两条函数曲线} 107 | \begin{tkzexample}[vbox] 108 | \begin{tikzpicture}[scale=.8] 109 | \tkzInit[xmin=5,xmax=40,ymin=0,ymax=350,xstep=2.5,ystep=25] 110 | \tkzDrawX[label=$q$] 111 | \tkzDrawY[label=$C(q)$] 112 | \tkzLabelXY 113 | \tkzGrid[color=orange] 114 | \tkzFct[domain=5:40]{0.1*\x**2+2*\x+60} 115 | \foreach \vv in {5,10,...,40}{% 116 | \tkzDefPointByFct(\vv) 117 | \tkzDrawPoint(tkzPointResult)} 118 | \tkzFct[domain=5:40]{(108*log(\x)-158)} 119 | \tkzText(37.5,285){$C$} 120 | \tkzText(37.5,220){$R$} 121 | \tkzDefSetOfPoints{% 122 | 5/15,10/90,15/135,20/170,25/190,30/200,35/230,40/240} 123 | \tkzDrawSetOfPoints[mark = x,mark size=3pt] 124 | \end{tikzpicture} 125 | \end{tkzexample} 126 | 127 | \end{document} 128 | \endinput 129 | -------------------------------------------------------------------------------- /doc-zh-cn/chap15/TKZdoc-fct-VDW.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \subsection{Courbes de \tkzname{Van der Waals}} 4 | \section{\tkzname{Van der Waals}曲线} 5 | 6 | \bigskip 7 | % Soient $v$ le volume d'une masse fluide et $p$ sa pression. 8 | % $b$ et $k$ sont deux nombres réels strictement positifs. On souhaite étudier une formule exprimant la dépendance de ces variables proposée par Van~der~Waals. 9 | 令$v$表示体积,$p$表示压力。 10 | 设$b$和$k$是两个正实数,Van~der~Waals提出了用于表示这些参量之间关系的函数: 11 | \[ 12 | p(v)= \frac{-3}{v^2} + \dfrac{3k}{v-b} 13 | \] 14 | 15 | 其定义域为:$I=\big[b~;~+\infty\big]$ 16 | 17 | \subsection{参数关系表} 18 | \begin{center} 19 | 20 | \begin{tkzexample}[] 21 | \begin{tikzpicture} 22 | \tkzTab% 23 | { $v$ /1,% 24 | $g'(v)$ /1,% 25 | $g(v)$ /3% 26 | }% 27 | { $b$ ,% 28 | $3b$ ,% 29 | $+\infty$% 30 | }% 31 | {0,$+$,$0$,$-$,t} 32 | {-/ $0$ /,% 33 | +/$\dfrac{8}{27b}$ /,% 34 | -/ $0$ /}% 35 | \end{tikzpicture} 36 | \end{tkzexample} 37 | \end{center} 38 | 39 | 40 | 41 | \newpage 42 | 43 | % \subsubsection{i Première courbe avec \emph{b}=1} 44 | \subsection{\emph{b}=1的第一曲线} 45 | % Quelques courbes pour $r\leq\ v \leq\ 6$ 46 | $r\leq\ v \leq\ 6$之间的曲线。 47 | 48 | 49 | 50 | \medskip 51 | \begin{center} 52 | \begin{tkzexample}[] 53 | \begin{tikzpicture}[xscale=2,yscale=2.5] 54 | \tkzInit[xmin=0,xmax=6,ymax=0.5,ystep=0.1] 55 | \tkzDrawX[label=$v$] 56 | \tkzDrawY[label=$g(v)$] 57 | \tkzGrid(0,0)(6,0.5) 58 | \tkzFct[color = red,domain =1:6]{(2*(x-1)*(x-1))/(x*x*x)} 59 | \tkzDrawTangentLine[color=blue,draw](3) 60 | \tkzDefPointByFct(1) 61 | \tkzText[draw, fill = brown!30](4,0.1){$g(v)=2\dfrac{(v-1)^2}{v^3}$} 62 | \end{tikzpicture} 63 | \end{tkzexample} 64 | \end{center} 65 | 66 | 67 | \newpage 68 | \subsection{\emph{b}=1/3的第二曲线 } 69 | 70 | 71 | \medskip 72 | \begin{center} 73 | \begin{tkzexample}[] 74 | \begin{tikzpicture}[scale=1.2] 75 | \tkzInit[xmin=0,xmax=2,xstep=0.2,ymax=1,ystep=0.1] 76 | \tkzAxeXY 77 | \tkzGrid(0,0)(2,1) 78 | \tkzFct[color = red,domain =1/3:2]{(2*(\x-1./3)*(\x-1./3))/(\x*\x*\x)} 79 | \tkzDrawTangentLine[draw,color=blue,kr=.5,kl=.5](1) 80 | \tkzDefPointByFct(1) 81 | \tkzText[draw,fill = brown!30](1.2,0.3)% 82 | {$g(v)=2\dfrac{\left(v-\dfrac{1}{3}\right)^2}{v^3}$} 83 | \end{tikzpicture} 84 | \end{tkzexample} 85 | \end{center} 86 | 87 | 88 | \newpage 89 | \subsection{\emph{b}=32/27的第3曲线 } 90 | 91 | 92 | \medskip 93 | \begin{center} 94 | \begin{tkzexample}[] 95 | \begin{tikzpicture}[scale=1.2] 96 | \tkzInit[xmin=0,xmax=10,ymax=.35,ystep=0.05]; 97 | \tkzAxeXY 98 | \tkzGrid(0,0)(10,.35) 99 | \tkzFct[color = red, 100 | domain =1.185:10]{(2*(\x-32./27)*(\x-32./27))/(\x*\x*\x)} 101 | \tkzDrawTangentLine[draw,color=blue,kr=2,kl=2](3.555) 102 | \tkzText[draw,fill = brown!30](5,0.3)% 103 | {$g(v)=2\dfrac{\left(v-\dfrac{32}{27}\right)^2}{v^3}$} 104 | \end{tikzpicture} 105 | \end{tkzexample} 106 | \end{center} 107 | 108 | 109 | 110 | 111 | \newpage 112 | \subsection{临界值} 113 | \subsubsection{\tkzname{Van der Walls}曲线 } 114 | %<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> 115 | 116 | 117 | \begin{tkzexample}[] 118 | \begin{tikzpicture}[scale=4] 119 | \tkzInit[xmax=3,ymax=2]; 120 | \tkzAxeXY 121 | \tkzGrid(0,0)(3,2) 122 | \tkzFct[color = red,domain =1/3:3]{0.125*(3*\x-1)+0.375*(3*\x-1)/(\x*\x)} 123 | \tkzDefPointByFct[draw](2) 124 | \tkzDefPointByFct[draw](3) 125 | \tkzDrawTangentLine[draw,color=blue](1) 126 | \tkzFct[color = green,domain =1/3:3]{0.125*(3*x-1)} 127 | \tkzSetUpPoint[size=8,fill=orange] 128 | \tkzDefPointByFct[draw](3) 129 | \tkzDefPointByFct[draw](1/3) 130 | \tkzDefPoint(1,1){f} 131 | \tkzDrawPoint(f) 132 | \tkzText[draw,fill = white,text=red](1,1.5)% 133 | {$f(x)=\dfrac{1}{8}(3x-1)+\dfrac{3}{8}\left(\dfrac{3x-1}{x^2}\right)$} 134 | \tkzText[draw,fill = white,text=green](2,0.4){$g(x) = \dfrac{3x-1}{8}$} 135 | \end{tikzpicture} 136 | \end{tkzexample} 137 | 138 | \newpage 139 | % \subsubsection{Courbes de \tkzname{Van der Walls} (suite)} 140 | \subsubsection{\tkzname{Van der Walls} 曲线(续)} 141 | 142 | 143 | \begin{tkzexample}[] 144 | \begin{tikzpicture}[xscale=4,yscale=1.5] 145 | \tkzInit[xmin=0,xmax=3,ymax=3,ymin=-4] 146 | \tkzGrid(0,-4)(3,3) 147 | \tkzAxeXY 148 | \tkzClip 149 | \tkzVLine[color=red,style=dashed]{1/3} 150 | \tkzFct[color=red,domain = 0.35:3]{-3/(x*x) +4/(3*x-1)} 151 | \tkzFct[color=blue,domain = 0.35:3]{-3/(x*x) +27/(4*(3*x-1))} 152 | \tkzFct[color=orange,domain = 0.35:3]{-3/(x*x) +8/(3*x-1)} 153 | \tkzFct[color=green,domain = 0.35:3]{-3/(x*x) +7/(3*x-1)} 154 | \tkzText[draw,fill = white,text=Maroon](2,-2)% 155 | {$f(x)=-\dfrac{3}{x^2}+\dfrac{8\alpha}{3x-1}$ \hspace{.5cm}% 156 | avec $\alpha \in% 157 | \left\{\dfrac{1}{2}~;~\dfrac{27}{32}~;~\dfrac{7}{8}~;~1\right\}$} 158 | \end{tikzpicture} 159 | \end{tkzexample} 160 | 161 | \end{document} 162 | \endinput 163 | -------------------------------------------------------------------------------- /doc-zh-cn/chap11/TKZdoc-fct-polar.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Courbes en coordonnées polaires} 4 | \section{极坐标曲线} 5 | 6 | \hypertarget{tfpo}{} 7 | % \begin{NewMacroBox}{tkzFctPolar}{\oarg{local options}\marg{$f(t)$}} 8 | % \emph{$f(t)$ est une expression utilisant la syntaxe de \tkzname{gnuplot}. } 9 | % 10 | % \medskip 11 | % \begin{tabular}{lll} 12 | % \toprule 13 | % options & exemple & explication \\ 14 | % \midrule 15 | % \TAline{$x(t)$,$y(t)$}{\tkzcname{tkzFctPar[0:1]}\{\tkzcname{t**3}\}\{\tkzcname{t**2}\}}{$x(t)=t^3$,$y(t)=t^2$ } 16 | % \bottomrule 17 | % \end{tabular} 18 | % 19 | % Les options sont celles de \TIKZ. 20 | % 21 | % \begin{tabular}{lll} 22 | % \toprule 23 | % options & défaut & définition \\ 24 | % \midrule 25 | % \TOline{domain}{0:2*pi}{domaine de la fonction} 26 | % \TOline{samples}{200}{nombre de points utilisés} 27 | % \TOline{id} {tkzfonct}{permet d'identifier les noms des fichiers auxiliaires} 28 | % \TOline{color}{black}{couleur de la ligne} 29 | % \TOline{line width} {0.4pt}{épaisseur de la ligne} 30 | % \TOline{style} {solid}{style de la ligne} 31 | % \bottomrule 32 | % \end{tabular} 33 | % 34 | % \medskip 35 | % \emph{ \tkzname{gnuplot} définit $\pi$ avec \tkzname{pi} et \tkzname{fp.sty} avec \tkzcname{FPpi}. Les valeurs qui déterminent le domaine sont évaluées par \tkzname{fp.sty}. Il est possible d'utiliser soit \tkzname{pi}, soit \tkzcname{FPpi}.} 36 | % \end{NewMacroBox} 37 | \begin{NewMacroBox}{tkzFctPolar}{\oarg{命令选项}\marg{$f(t)$}} 38 | \emph{用\tkzname{gnuplot}语法表示$f(t)$。} 39 | 40 | \medskip 41 | \begin{tabular}{lll} 42 | \toprule 43 | 参数 & 样例 & 说明 \\ 44 | \midrule 45 | \TAline{$x(t)$,$y(t)$}{\tkzcname{tkzFctPar[0:1]}\{\tkzcname{t**3}\}\{\tkzcname{t**2}\}}{$x(t)=t^3$,$y(t)=t^2$ } 46 | \bottomrule 47 | \end{tabular} 48 | 49 | 可以使用所有有效\TIKZ{}选项。 50 | 51 | \begin{tabular}{lll} 52 | \toprule 53 | 选项 & 默认值 & 含义 \\ 54 | \midrule 55 | \TOline{domain}{0:2*pi}{定义域} 56 | \TOline{samples}{200}{采样点数} 57 | \TOline{id} {tkzfonct}{函数id} 58 | \TOline{color}{black}{颜色} 59 | \TOline{line width} {0.4pt}{线宽} 60 | \TOline{style} {solid}{线型} 61 | \bottomrule 62 | \end{tabular} 63 | 64 | \medskip 65 | \emph{ 66 | \tkzname{gnuplot}中定义了\tkzname{pi}用于表示$\pi$, 67 | \tkzname{fp.sty}中定义了\tkzcname{FPpi}用于表示$\pi$, 68 | 值域由\tkzname{fp.sty}确定。 69 | 在代码中,既可以用\tkzname{pi},也可以用\tkzcname{FPpi}。} 70 | \end{NewMacroBox} 71 | 72 | 73 | \subsection{极坐标函数曲线示例1} 74 | 75 | $ \rho(t)= \cos(t)*\sin(t) $ 76 | 77 | \begin{tkzexample}[latex=8cm] 78 | \begin{tikzpicture}[scale=0.75] 79 | \tkzInit [xmin=-0.5,xmax=0.5, 80 | ymin=-0.5,ymax=0.5, 81 | xstep=0.1,ystep=.1] 82 | \tkzDrawX \tkzDrawY 83 | \tkzFctPolar[domain=-2*pi:2*pi]{cos(t)*sin(t)} 84 | \end{tikzpicture} 85 | \end{tkzexample} 86 | 87 | \newpage 88 | \subsection{极坐标函数曲线示例2} 89 | $ \rho(t)= \cos(2*t) $ 90 | 91 | \begin{center} 92 | \begin{tkzexample}[] 93 | \begin{tikzpicture}[scale=1.25] 94 | \tkzInit [xmin=-1,xmax=1, 95 | ymin=-1,ymax=1, 96 | xstep=.2,ystep=.2] 97 | \tkzDrawX \tkzDrawY 98 | \tkzFctPolar[domain=0:2*pi]{cos(2*t)} 99 | \end{tikzpicture} 100 | \end{tkzexample} 101 | \end{center} 102 | 103 | 104 | \newpage 105 | \subsection{极坐标心形} 106 | % From Mathworld : \url{http://mathworld.wolfram.com/HeartCurve.html} 107 | 来自: \url{http://mathworld.wolfram.com/HeartCurve.html} 108 | 109 | $\rho(t)= 2-2*\sin(t)+\sin(t)*\sqrt(|\cos(t)|)/(\sin(t)+1.4 $ 110 | 111 | \vspace{2cm} 112 | \begin{center} 113 | \begin{tkzexample}[] 114 | \begin{tikzpicture}[scale=3] 115 | \tkzInit[xmin=-5,xmax=5,ymin=-5,ymax=5] 116 | \tkzFctPolar[domain = -pi:pi, 117 | samples = 800, 118 | ball color = red, 119 | shading = ball]% 120 | {2-2*sin(t)+sin(t)*sqrt(abs(cos(t)))/(sin(t)+1.4)} 121 | \end{tikzpicture} 122 | \end{tkzexample} 123 | \end{center} 124 | 125 | \subsection{极坐标函数曲线示例4} 126 | $\rho(t)= 1-sin(t)$ 127 | 128 | \vspace{2cm} 129 | \begin{center} 130 | \begin{tkzexample}[vbox] 131 | \begin{tikzpicture}[scale=4] 132 | \tkzInit [xmin=-5,xmax=5,ymin=-5,ymax=5,xstep=1,ystep=1] 133 | \tkzFctPolar[domain=0:2*pi,samples=400]{ 1-sin(t) } 134 | \end{tikzpicture} 135 | \end{tkzexample} 136 | \end{center} 137 | 138 | 139 | \newpage 140 | \subsection{极坐标大麻曲线} 141 | 来自: \url{http://mathworld.wolfram.com/CannabisCurve.html} 142 | 143 | $ \rho(t)=(1+.9*\cos(8*t))*(1+.1*\cos(24*t))*(1+.1*\cos(200*t))*(1+\sin(t)) $ 144 | 145 | \begin{center} 146 | \begin{tkzexample}[vbox] 147 | \begin{tikzpicture}[scale=2.5] 148 | \tkzInit [xmin=-5,xmax=5,ymin=-5,ymax=5,xstep=1,ystep=1] 149 | \tkzFctPolar[domain=0:2*pi,samples=1000]% 150 | { (1+.9*cos(8*t))*(1+.1*cos(24*t))*(1+.1*cos(200*t))*(1+sin(t)) } 151 | \end{tikzpicture} 152 | \end{tkzexample} 153 | \end{center} 154 | 155 | 156 | \newpage 157 | % \subsection{Scarabaeus Curve} 158 | \subsection{斯卡贝斯曲线} 159 | % From mathworld : \url{http://mathworld.wolfram.com/Scarabaeus.html} 160 | 来自: \url{http://mathworld.wolfram.com/Scarabaeus.html} 161 | 162 | $\rho(t)=1.6*\cos(2*t)-3*\cos(t) $ 163 | 164 | \vspace{2cm} 165 | \begin{center} 166 | \begin{tkzexample}[] 167 | \begin{tikzpicture}[scale=2.5] 168 | \tkzInit [xmin=-5,xmax=5,ymin=-5,ymax=5,xstep=1,ystep=1] 169 | \tkzFctPolar[domain=0:2*pi,samples=400]{1.6*cos(2*t)-3*cos(t) } 170 | \end{tikzpicture} 171 | \end{tkzexample} 172 | \end{center} 173 | 174 | 175 | \end{document} 176 | \endinput 177 | 178 | -------------------------------------------------------------------------------- /doc-zh-cn/chap10/TKZdoc-fct-param.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Courbes avec équations paramétrées} 4 | \section{参数曲线} 5 | \hypertarget{tfpa}{} 6 | % \begin{NewMacroBox}{tkzFctPar}{\oarg{local options}\marg{$x(t)$}\marg{$y(t)$}} 7 | % \emph{$x(t)$ et $y(t)$ sont des expressions utilisant la syntaxe de \tkzname{gnuplot}. La variable est $t$.} 8 | % 9 | % \medskip 10 | % \begin{tabular}{lll} 11 | % \toprule 12 | % options & exemple & explication \\ 13 | % \midrule 14 | % \TAline{$x(t)$,$y(t)$}{\tkzcname{tkzFctPar[0:1]}\{\tkzcname{t**3}\}\{\tkzcname{t**2}\}}{$x(t)=t^3$,$y(t)=t^2$ } 15 | % \bottomrule 16 | % \end{tabular} 17 | % 18 | % Les options sont celles de \TIKZ. 19 | % 20 | % \begin{tabular}{lll} 21 | % \toprule 22 | % options & défaut & définition \\ 23 | % \midrule 24 | % \TOline{domain}{-5:5}{domaine de la fonction} 25 | % \TOline{samples}{200}{nombre de points utilisés} 26 | % \TOline{id} {tkzfonct}{permet d'identifier les noms des fichiers auxiliaires} 27 | % \TOline{color}{black}{couleur de la ligne} 28 | % \TOline{line width} {0.4pt}{épaisseur de la ligne} 29 | % \TOline{style} {solid}{style de la ligne} 30 | % \bottomrule 31 | % \end{tabular} 32 | % \end{NewMacroBox} 33 | \begin{NewMacroBox}{tkzFctPar}{\oarg{命令选项}\marg{$x(t)$}\marg{$y(t)$}} 34 | \emph{用\tkzname{gnuplot}语法表示$x(t)$和$y(t)$函数,$t$是参数方程自变量。} 35 | 36 | \medskip 37 | \begin{tabular}{lll} 38 | \toprule 39 | 选项 & 样例 & 说明 \\ 40 | \midrule 41 | \TAline{$x(t)$,$y(t)$}{\tkzcname{tkzFctPar[0:1]}\{\tkzcname{t**3}\}\{\tkzcname{t**2}\}}{$x(t)=t^3$,$y(t)=t^2$ } 42 | \bottomrule 43 | \end{tabular} 44 | 45 | 可以使用所有有效\TIKZ{}选项。 46 | 47 | \begin{tabular}{lll} 48 | \toprule 49 | 选项 & 默认值 & 含义 \\ 50 | \midrule 51 | \TOline{domain}{-5:5}{定义域} 52 | \TOline{samples}{200}{采样点数} 53 | \TOline{id} {tkzfonct}{函数id} 54 | \TOline{color}{black}{颜色} 55 | \TOline{line width} {0.4pt}{线宽} 56 | \TOline{style} {solid}{线型} 57 | \bottomrule 58 | \end{tabular} 59 | \end{NewMacroBox} 60 | 61 | \subsection{参数曲线示例1} 62 | 63 | \begin{align*} 64 | x(t) &=t- \sin(t)\\ 65 | y(t) &=1-\cos(t)\\ 66 | \end{align*} 67 | 68 | \begin{center} 69 | \begin{tkzexample}[] 70 | \begin{tikzpicture} 71 | \tkzInit[ymax=2.25,ystep=.5] \tkzGrid 72 | \tkzAxeXY 73 | \tkzFctPar[samples=400,domain=0:2*pi]{(t-sin(t))}{(1-cos(t))} 74 | \end{tikzpicture} 75 | \end{tkzexample} 76 | \end{center} 77 | 78 | 79 | \newpage 80 | \subsection{参数曲线示例2} 81 | 82 | \begin{align*} 83 | x(t) &=t\times \sin(t)\\ 84 | y(t) &=t\times \cos(t)\\ 85 | \end{align*} 86 | 87 | \begin{center} 88 | \begin{tkzexample}[vbox] 89 | \begin{tikzpicture}[scale=1.25] 90 | \tkzInit[xmin=-50,xmax=50,xstep=10, 91 | ymin=-50,ymax=50,ystep=10] 92 | \tkzGrid 93 | \tkzAxeXY 94 | \tkzFctPar[smooth,samples=200,domain=0:50]{t*sin(t)}{t*cos(t)} 95 | \end{tikzpicture} 96 | \end{tkzexample} 97 | \end{center} 98 | 99 | 100 | \newpage 101 | \subsection{参数曲线示例3} 102 | \begin{align*} 103 | x(t) &=\exp(t)\times \sin(t)\\ 104 | y(t) &=\exp(t)\times \cos(t)\\ 105 | \end{align*} 106 | 107 | \begin{center} 108 | \begin{tkzexample}[vbox] 109 | \begin{tikzpicture}[scale=1.5] 110 | \tkzInit[xmin=-2,xmax=10,xstep=2,ymin=-10,ymax=4,ystep=2] 111 | \tkzGrid[sub] 112 | \tkzAxeX[step=2] 113 | \tkzAxeY[step=2] 114 | \tkzFctPar[samples=400,domain=-pi:pi]{exp(t)*sin(t)}{exp(t)*cos(t)} 115 | \end{tikzpicture} 116 | \end{tkzexample} 117 | \end{center} 118 | 119 | 120 | \newpage 121 | 122 | \subsection{参数曲线示例4} 123 | \begin{align*} 124 | x(t) &=\cos^3(t)\\ 125 | y(t) &=\sin^3(t)\\ 126 | \end{align*} 127 | 128 | \begin{center} 129 | \begin{tkzexample}[vbox] 130 | \begin{tikzpicture}[scale=1.25] 131 | \tkzInit[xmin=-1,xmax=1,xstep=.2, 132 | ymin=-1,ymax=1,ystep=.2] 133 | \tkzFctPar[color=red, 134 | line width=2pt, 135 | fill=orange, 136 | opacity=.4, 137 | samples=400, 138 | domain=0:2*pi]{(cos(t))**3}{(sin(t))**3} 139 | \end{tikzpicture} 140 | \end{tkzexample} 141 | \end{center} 142 | 143 | 144 | \newpage 145 | \subsection{参数曲线示例5} 146 | % Saint Valentin version 1 147 | 心形曲线V1 148 | \begin{align*} 149 | x(t) &=\sin^3(t)\\ 150 | y(t) &=\cos(t)-\cos^4(t)\\ 151 | \end{align*} 152 | 153 | 154 | \begin{center} 155 | \begin{tkzexample}[vbox] 156 | \begin{tikzpicture}[scale=4] 157 | \tkzInit[xmin=-1,xmax=1,ymin=-2,ymax=1] 158 | \tkzClip 159 | \tkzFctPar[samples=500,smooth,domain=-pi:pi, 160 | ball color=red,shading=ball]% 161 | {(sin(t))**3}{cos(t)-(cos(t))**4} 162 | \end{tikzpicture} 163 | \end{tkzexample} 164 | \end{center} 165 | 166 | 167 | \newpage 168 | \subsection{参数曲线示例6} 169 | % Saint Valentin version 2 from \url{http://mathworld.wolfram.com/HeartCurve.html} 170 | 心形曲线V2,来自\url{http://mathworld.wolfram.com/HeartCurve.html} 171 | 172 | \begin{align*} 173 | x(t) &=\sin(t)\cos(t)\log(|t|)\\ 174 | y(t) &=\sqrt{(|t|)\cos(t)}\\ 175 | \end{align*} 176 | 177 | 178 | \begin{center} 179 | \begin{tkzexample}[vbox] 180 | \begin{tikzpicture}[scale=1.5] 181 | \tkzInit[xmin=-.4,xmax=.4,xstep=.1,ymin=0,ymax=.7,ystep=.1] 182 | \tkzClip 183 | \tkzFctPar[samples=2000,smooth,domain=-1:1, 184 | ball color=red,shading=ball]% 185 | {sin(t)*cos(t)*log(abs(t))}{sqrt(abs(t))*cos(t)} 186 | \end{tikzpicture} 187 | \end{tkzexample} 188 | \end{center} 189 | 190 | 191 | \newpage 192 | \subsection{参数曲线示例7} 193 | % Saint Valentin version 3 from \url{http://en.wikipedia.org/wiki/Heart_(symbol)} 194 | 心形曲线V3,来自\url{http://en.wikipedia.org/wiki/Heart_(symbol)} 195 | 196 | \begin{align*} 197 | x(t) &=16\sin^3(t)\\ 198 | y(t) &=13\cos(t)-5\cos(2t)-2cos(3t)-cos(4t)\\ 199 | \end{align*} 200 | 201 | 202 | \begin{tkzexample}[vbox] 203 | \begin{tikzpicture}[scale=1.75] 204 | \tkzInit[xmin=-20,xmax=20,xstep=5,ymin=-25,ymax=15,ystep=5] 205 | \tkzClip 206 | \tkzFctPar[samples=400,smooth,domain=0:6.28, 207 | ball color=red,shading=ball]% 208 | {16*(sin(t))**3}{13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t)} 209 | \end{tikzpicture} 210 | \end{tkzexample} 211 | 212 | \end{document} 213 | \endinput 214 | 215 | -------------------------------------------------------------------------------- /doc-zh-cn/chap18/TKZdoc-fct-faq.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Quelques remarques} 4 | \section{注意事项} 5 | 6 | \begin{enumerate} 7 | % \item Modification avec les anciennes versions~: 8 | \item 版本修订: 9 | \begin{itemize} 10 | % \item \tkzcname{tkzTan} est devenu \tkzcname{tkzDrawTangentLine} 11 | \item 将\tkzcname{tkzTan}命令改为\tkzcname{tkzDrawTangentLine}命令 12 | % \item Désormais le domaine est donné comme avec \TIKZ\ et ce n'est plus 13 | % \parg{$x_a..x_b$} 14 | \item 现在,在\TIKZ{}中使用定义域,而不再使用\parg{$x_a..x_b$}的表示形式 15 | % \item \tkzcname{tkzFctPt} est devenu \tkzcname{tkzDefPointByFct} 16 | \item 将\tkzcname{tkzFctPt}命令改为\tkzcname{tkzDefPointByFct}命令 17 | \end{itemize} 18 | 19 | % \item Quand \tkzname{xstep} est différent de 1, la variable doit être \tkzcname{x}. 20 | \item 当\tkzname{xstep}不为1时,必须在函数表达式中使用\tkzcname{x}. 21 | % \item Quand une fonction est passée en argument à la macro \tkzcname{tkzFct}, elle est stockée avec la syntaxe de \tkzname{gnuplot} dans la macro \tkzcname{tkzFctgnua}. \tkzname{tkzFctgnu} est un préfixe, « a » est la référence associée à la fonction, la fonction suivante dans le même environnement \tkzname{tikzpicture} sera référencée « b » et ainsi de suite... 22 | \item 当函数表达式作为一个参数传递给\tkzcname{tkzFct}命令时, 23 | 它与\tkzname{tkzFctgnua}命令中的\tkzname{gnuplot}同时存储。 24 | \tkzcname{tkzFctgnu}命令使用\enquote{a}实现对该函数的引用, 25 | 在同一\tkzname{tikzpicture}环境中,也可以使用\enquote{b}\dots{} 26 | 这样的方式按顺序引用定义的函数。 27 | 28 | % Elle est aussi stockée avec la syntaxe de \tkzname{fp.sty} dans la macro \tkzcname{tkzFcta} avec le préfixe \tkzname{tkzFcta}. 29 | 同时,还按\tkzname{fp.sty}语法在将前缀\tkzname{tkzFcta}存储在命令\tkzcname{tkzFcta}中。 30 | 31 | % La dernière macro utilisée est également sauvegardée sous les deux syntaxes avec \tkzcname{tkzFctgnuLast} et \tkzcname{tkzFctLast}. 32 | 最后,所使用的宏将按\tkzcname{tkzFctgnuLast}和\tkzcname{tkzFctLast}两种语法保存。 33 | 34 | % \item Attention dans \tkzname{gnuplot} un quotient doit être entré sous la forme 1./3, car 1/3 donne le quotient d'une division euclidienne (ici 0). 35 | \item 注意\tkzname{gnuplot}的除法必须用小数点按1./3的形式计算,1/3将会按整数的方式计算,其结果为0 36 | \item gnuplot的问题: 37 | \begin{itemize} 38 | \item 如果未能创建xxx.table文件,可能的原因有: 39 | \begin{itemize} 40 | % \item soit que \TEX\ ne trouve pas \tkzname{gnuplot}, c'est en général un problème de « PATH », 41 | \item \TEX{}找不到\tkzname{gnuplot},这多是由\enquote{PATH}环境变量设置错误引起的。 42 | % \item soit \TEX\ n'autorise pas le lancement de \tkzname{gnuplot} alors c'est que l'option \tkzname{shell-escape} n'est pas autorisé. 43 | \item \TEX{}无法启动\tkzname{gnuplot},这主要是因为未使用\tkzname{-shell-escape}编译参数引起的。 44 | \end{itemize} 45 | 46 | 还有一种可能是xxx.gnuplot文件错误,此时,只需用文本编辑器打开它,就可以编辑其\tkzname{gnuplot}命令。 47 | 值得注意的是:\tkzname{gnuplot}在4.2版后,其语法发生了变化(4.4或4.5后会推出新语法)。 48 | 若使用旧版本,其创建表格命令是:\tkzname{set table}。 49 | 50 | 51 | % \item $\pi$ est, avec \tkzname{gnuplot}, défini par \tkzname{pi} 52 | % \item $\pi$ est, avec \tkzname{fp.sty} défini par \tkzcname{FPpi}. 53 | % \item (set) samples =2 est suffisant pour tracer une droite. 54 | \item 在\tkzname{gnuplot}定义了\tkzname{pi}用于表示$\pi$ 55 | \item 在\tkzname{fp.sty}定义了\tkzcname{FPpi}用于表示$\pi$。 56 | \item 对于直线,应设置采样点数为2(samples=2)。 57 | \end{itemize} 58 | 59 | % \item La puissance $a^b$ est notée $a \wedge b$ avec fp et pgfmath mais $a**b$ avec gnuplot. 60 | \item 幂运算$a^b$在fp和pgfmath中表示为$a \wedge b$, 61 | 在gnuplot中表示为$a**b$。 62 | 63 | % \item \tkzname{tkz-fct} modife FP@pow (code modifié de Christian Tellechea 2009) afin d'autoriser les puissances entières de nombres négatifs. 64 | \item \tkzname{tkz-fct}修改了FP@pow(Christian Tellechea 2009的修订代码),从而允许计算负数的整次幂。 65 | 66 | 67 | % \item ({1/exp(1)}) est correct mais (1/exp(1)) donne une erreur 68 | \item (\{1/exp(1)\})是正确的,但(1/exp(1))是错误的。 69 | \end{enumerate} 70 | 71 | % \subsection{Fonctions de \tkzname{gnuplot}} 72 | \subsection{\tkzname{gnuplot}的函数} 73 | 74 | \begin{tabular}{lll} 75 | \toprule 76 | gnuplot&fp&Description \\ 77 | + & + & addition\\ 78 | - & - & soustraction\\ 79 | * & * & multiplication\\ 80 | / & / & division\\ 81 | ** & \upp & exponentiation\\ 82 | \% & absente & modulo \\ 83 | pi & pi & constante 3.1415 \\ 84 | abs(x) & abs & Valeur absolue \\ 85 | cos(x) & cos & Arc -cosinus \\ 86 | sin(x) & sin & Arc -cosinus \\ 87 | tan(x) & tan & Arc -cosinus \\ 88 | acos(x) & arccos & Arc -cosinus \\ 89 | asin(x) & arcsin & Arc-sinus \\ 90 | atan(x) & arctan & Arc-tangente \\ 91 | atan2(y,x) & absente & Arc-tangente \\ 92 | \midrule 93 | cosh(x) & absente & Cosinus hyperbolique \\ 94 | sinh(x) & absente & Sinus hyperbolique \\ 95 | acosh(x) & absente & Arc-cosinus hyperbolique \\ 96 | asinh(x) & absente & Arc-sinus hyperbolique \\ 97 | atanh(x) & absente & Arc-tangente hyperbolique \\ 98 | \midrule 99 | besj0(x) & absente & Bessel j0 \\ 100 | besj1(x) & absente & Bessel j1 \\ 101 | besy0(x) & absente & Bessel y0 \\ 102 | besy1(x) & absente & Bessel y1 \\ 103 | \midrule 104 | ceil(x) & absente & Le plus petit entier plus grand que \\ 105 | floor(x) & absente & Plus grand entier plus petit que \\ 106 | absente & trunc(x,n) & troncature $n$ nombre de décimales \\ 107 | absente & round(x,n) & arrondi $n$ nombre de décimales \\ 108 | exp(x) & exp & Exponentielle \\ 109 | log(x) & ln & Logarithme népérien (base e) \\ 110 | log10(x) & absente & Logarithme base 10 \\ 111 | norm(x) & absente & Distribution normale \\ 112 | rand(x) & random & Générateur de nombre pseudo-aléatoire \\ 113 | sgn(x) & absente & Signe \\ 114 | sqrt(x) & absente & Racine carrée \\ 115 | tanh(x) & absente & Tangente hyperbolique \\ 116 | \bottomrule 117 | \end{tabular} 118 | \end{document} 119 | \endinput 120 | -------------------------------------------------------------------------------- /doc-zh-cn/chap09/TKZdoc-fct-asymptote.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Droites particulières} 4 | \section{特殊直线} 5 | % \subsection{ Tracer une ligne verticale } 6 | \subsection{垂线} 7 | % \begin{NewMacroBox}{tkzVLine}{\oarg{local options}\marg{decimal number}} 8 | % Attention, la syntaxe est celle de \tkzname{fp} car on n'utilise pas \tkzname{gnuplot} pour tracer une droite. 9 | % 10 | % \begin{tabular}{lll} 11 | % \toprule 12 | % arguments & exemple & définition \\ 13 | % \midrule 14 | % \TAline{decimal number}{\tkzcname{tkzVLine\{1\}}}{Trace la droite $x=1$} 15 | % \bottomrule 16 | % \end{tabular} 17 | % 18 | % \medskip 19 | % \begin{tabular}{lll} 20 | % \toprule 21 | % options & défaut & définition \\ 22 | % \midrule 23 | % \TOline{color }{|black| }{ couleur du trait} 24 | % \TOline{line width}{|0.6pt| }{ épaisseur du point} 25 | % \TOline{style }{|solid|}{ style du trait } 26 | % \bottomrule 27 | % \end{tabular} 28 | % 29 | % \emph{voir les options les lignes dans \TIKZ} 30 | % \end{NewMacroBox} 31 | \begin{NewMacroBox}{tkzVLine}{\oarg{命令选项}\marg{横坐标}} 32 | 由于无法使用\tkzname{gnuplot}绘制直线,该命令需要使用\tkzname{fp}语法定义函数。 33 | 34 | \begin{tabular}{lll} 35 | \toprule 36 | 参数 & 样例 & 含义 \\ 37 | \midrule 38 | \TAline{横坐标}{\tkzcname{tkzVLine\{1\}}}{垂线:$x=1$} 39 | \bottomrule 40 | \end{tabular} 41 | 42 | \medskip 43 | \begin{tabular}{lll} 44 | \toprule 45 | 选项 & 默认值 & 含义 \\ 46 | \midrule 47 | \TOline{color }{|black| }{颜色} 48 | \TOline{line width}{|0.6pt| }{线宽} 49 | \TOline{style }{|solid|}{线型} 50 | \bottomrule 51 | \end{tabular} 52 | 53 | \emph{可以使用所有有效\TIKZ{}选项。} 54 | \end{NewMacroBox} 55 | 56 | 57 | % \subsection{Ligne verticale } 58 | \subsection{绘制垂线} 59 | % problème avec cette macro, en principe 1./3 devrait être acceptée. 60 | 注意使用带小数点的数,以实现浮点数计算。 61 | 62 | \begin{tkzexample}[latex=8cm] 63 | \begin{tikzpicture}[scale=2] 64 | \tkzInit[xmax=3,ymax=2] 65 | \tkzAxeXY 66 | \tkzVLine[color = blue, 67 | style = dashed, 68 | line width = 1pt]{2} 69 | \tkzVLine[color = red, 70 | style = dashed, 71 | line width = 1pt]{1./3} 72 | \end{tikzpicture} 73 | \end{tkzexample} 74 | 75 | 76 | \newpage 77 | % \begin{NewMacroBox}{tkzVLines}{\oarg{local options}\marg{list of values}} 78 | % Attention, la syntaxe est celle de \tkzname{fp} car on n'utilise pas \tkzname{gnuplot} pour tracer une droite. 79 | % 80 | % \begin{tabular}{lll} 81 | % \toprule 82 | % arguments & exemple & définition \\ 83 | % \midrule 84 | % \TAline{list of values}{\tkzcname{tkzVLines\{1,4\}}}{Trace les droites $x=1$ et $x=4$} 85 | % \bottomrule 86 | % \end{tabular} 87 | % 88 | % \end{NewMacroBox} 89 | \begin{NewMacroBox}{tkzVLines}{\oarg{命令选项}\marg{横坐标列表}} 90 | 由于无法使用\tkzname{gnuplot}绘制直线,该命令需要使用\tkzname{fp}语法定义函数。 91 | 92 | \begin{tabular}{lll} 93 | \toprule 94 | 参数 & 样例 & 含义 \\ 95 | \midrule 96 | \TAline{横坐标列表}{\tkzcname{tkzVLines\{1,4\}}}{垂线:$x=1$和$x=4$} 97 | \bottomrule 98 | \end{tabular} 99 | 100 | \end{NewMacroBox} 101 | 102 | % \subsection{Lignes verticales} 103 | \subsection{绘制多条垂线} 104 | 105 | \begin{tkzexample}[latex=7cm] 106 | \begin{tikzpicture} 107 | \tkzInit[xmax=5,ymax=5] 108 | \tkzAxeXY 109 | \tkzVLines[color = green]{1,2,...,4} 110 | \end{tikzpicture} 111 | \end{tkzexample} 112 | 113 | \subsection{用\tkzname{fp}宏包计算垂线} 114 | \begin{tkzexample}[] 115 | \begin{tikzpicture} 116 | \tkzInit[xmin=-7,xmax=7,ymin=-1,ymax=1] 117 | \tkzAxeY 118 | \tkzAxeX[trig=2] 119 | \foreach\v in {-2,-1,1,2} 120 | {\tkzVLine[color=red]{\v*\FPpi}} 121 | \end{tikzpicture} 122 | \end{tkzexample} 123 | 124 | \newpage 125 | \subsection{水平线} 126 | % \begin{NewMacroBox}{tkzHLine}{\oarg{local options}\marg{decimal number}} 127 | % \begin{tabular}{lll} 128 | % arguments & exemple & définition \\ 129 | % \midrule 130 | % \TAline{decimal number}{\tkzcname{tkzVLine\{1\}}}{Trace la droite $y=1$} 131 | % \end{tabular} 132 | % \end{NewMacroBox} 133 | \begin{NewMacroBox}{tkzHLine}{\oarg{命令选项}\marg{纵坐标}} 134 | \begin{tabular}{lll} 135 | 参数 & 样例 & 含义 \\ 136 | \midrule 137 | \TAline{纵坐标}{\tkzcname{tkzVLine\{1\}}}{水平线:$y=1$} 138 | \end{tabular} 139 | \end{NewMacroBox} 140 | 141 | \begin{tkzexample}[latex=7cm] 142 | \begin{tikzpicture} 143 | \tkzInit[xmax=80,xstep=20,ymax=2] 144 | \tkzAxeXY 145 | \tkzHLine[color=red]{exp(1)-1} 146 | \end{tikzpicture} 147 | \end{tkzexample} 148 | % \subsection{Asymptote horizontale} 149 | \subsection{水平渐近线} 150 | % Attention, une autre méthode consiste à écrire \tkzcname{tkzFct{$\text{k}$}} mais si \tkzname{ystep= $n$} avec $n$ entier naturel alors il est nécessaire d'écrire $k$ comme un nombre réel, par exemple si \tkzname{ystep= $3$} alors il faut écrire $k=5.0$. 151 | % 注意,另一种方法是使用\tkzcname{tkzFct{$\text{k}$}}命令。 152 | % 如果\tkzname{ystep= $n$},带有$n$自然数整数。 153 | % 则需要为$k$赋值,例如,如果\tkzname{ystep= $3$}则$k=5.0$。 154 | 155 | \begin{tkzexample}[] 156 | \begin{tikzpicture}[scale=2.5] 157 | \tkzInit[xmax=5,ymin=0.5,ymax=1.5,ystep=0.5] 158 | \tkzGrid 159 | \tkzAxeXY 160 | \tkzFct[domain = 0:10]{x*exp(-x)+1} 161 | \tkzHLine[color=red,style=solid,line width=1.2pt]{1} 162 | \tkzDrawTangentLine[draw,color=blue](1) 163 | \tkzText[draw,fill = brown!20](2,0.75){$f(x)=x \text{e}^{-x}+1$} 164 | \end{tikzpicture} 165 | \end{tkzexample} 166 | 167 | 168 | 169 | \newpage 170 | 171 | % \subsection{Lignes horizontales} 172 | \subsection{绘制多条水平线} 173 | 174 | % \begin{NewMacroBox}{tkzHLines}{\oarg{local options}\marg{list of values}} 175 | % \begin{tabular}{lll} 176 | % arguments & exemple & définition \\ 177 | % \midrule 178 | % \TAline{list of values}{\tkzcname{tkzHLines\{1,4\}}}{Trace les droites $y=1$ et $y=4$} 179 | % \bottomrule 180 | % \end{tabular} 181 | % \end{NewMacroBox} 182 | \begin{NewMacroBox}{tkzHLines}{\oarg{命令选项}\marg{纵坐标列表}} 183 | \begin{tabular}{lll} 184 | 参数 & 样例 & 含义 \\ 185 | \midrule 186 | \TAline{纵坐标列表}{\tkzcname{tkzHLines\{1,4\}}}{水平线:$y=1$和$y=4$} 187 | \bottomrule 188 | \end{tabular} 189 | \end{NewMacroBox} 190 | 191 | \begin{tkzexample}[] 192 | \begin{tikzpicture} 193 | \tkzInit 194 | \tkzAxeXY 195 | \tkzHLines[color = green]{1,2,...,10} 196 | \end{tikzpicture} 197 | \end{tkzexample} 198 | 199 | 200 | \newpage 201 | % \subsection{Asymptote horizontale et verticale} 202 | \subsection{水平和垂直渐近线} 203 | \begin{tkzexample}[vbox] 204 | \begin{tikzpicture}[scale=1.25] 205 | \tkzInit 206 | \tkzGrid 207 | \tkzAxeXY 208 | \tkzFct[color=red,domain=1.001:1.9]{1+1/(log(x-1)**2)} 209 | \tkzFct[color=red,domain = 2.1:10]{1+1/(log(x-1)**2)} 210 | \tkzHLine[line width=1pt,color=red]{1} 211 | \tkzVLine[line width=1pt,color=blue]{2} 212 | \tkzDefPoint(1,1){A} 213 | \tkzDrawPoint[fill=white,color=Maroon,size=4](A) 214 | \tkzDefPointByFct[draw,with=b]({1+exp(1)}) 215 | \tkzLabelPoint[above right](tkzPointResult){$(1+\text{e}~;~2)$} 216 | \tkzText[draw,color = black,fill = brown!20](6,6)% 217 | {$f(x)=\dfrac{1}{\ln^2 (x-1)}+1$} 218 | \end{tikzpicture} 219 | \end{tkzexample} 220 | 221 | 222 | \end{document} 223 | \endinput 224 | -------------------------------------------------------------------------------- /doc-zh-cn/chap16/TKZdoc-fct-bac.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Exemples avec les packages \tkzname{alterqcm} et \tkzname{tkz-tab}} 4 | \section{在\tkzname{alterqcm}和\tkzname{tkz-tab}宏包中使用\tkzname{tkz-fct}宏包绘制函数曲线} 5 | 6 | % 7 | % % \shorthandoff{:} 8 | \begin{alterqcm}[lq=110mm] 9 | 10 | \AQmessage{ 11 | % La figure 1. donne la représentation graphique d'une fonction $f$ définie sur $\mathbf{R}^+$ et la figure 2 celle d'une primitive de $f$ sur $\mathbf{R}^+$. 12 | 图1是函数$f$在$\mathbf{R}^+$域中的曲线,图2是基元函数$f$在$\mathbf{R}^+$域中的曲线。 13 | 14 | \begin{center} 15 | \begin{tikzpicture}[xscale=2.25,yscale=1] 16 | \tkzInit[xmin=-2,xmax=3,ymin=-1,ymax=6] 17 | \tkzDrawX 18 | \tkzDrawY 19 | \tkzFct[samples=100,domain = -1:2.2]{x+exp(x-1)} 20 | \tkzDefPoint(1,2){pt1} 21 | \tkzDrawPoint(pt1) 22 | \tkzPointShowCoord[xlabel=$1$,ylabel=$2$](pt1) 23 | \tkzDefPoint(2,4.71828){pt2} 24 | \tkzDrawPoint(pt2) 25 | \tkzPointShowCoord[xlabel=$2$,ylabel=$\text{e}+2$](pt2) 26 | \tkzRep 27 | \end{tikzpicture} 28 | \end{center} 29 | 30 | \begin{center} 31 | \begin{tikzpicture}[xscale=2.25,yscale=1] 32 | \tkzInit[xmin=-2,xmax=3,ymin=-1,ymax=6] 33 | \tkzDrawX 34 | \tkzDrawY 35 | \tkzFct[samples=100,domain = -1:2.2]{x*x/2+exp(x-1)} 36 | \tkzDefPoint(1,1.5){pt1} 37 | \tkzDrawPoint(pt1) 38 | \tkzPointShowCoord[xlabel=$1$,ylabel=$3/2$](pt1) 39 | \tkzDefPoint(2,4.71828){pt2} 40 | \tkzDrawPoint(pt2) 41 | \tkzPointShowCoord[xlabel=$2$,ylabel=$\text{e}+2$](pt2) 42 | \tkzRep 43 | \end{tikzpicture} 44 | \end{center} 45 | } 46 | % 47 | \AQquestion{ 48 | % Quelle est l'aire, en unités d'aire, de la partie du plan limitée par la représentation graphique de la fonction $f$, l'axe des abscisses et les 49 | % droites d'équation $x = 1$ et $x = 2$ ? 50 | 求函数$f$与横轴、直线$x=1$和$x=2$围成的面积是多少? 51 | } 52 | {{$\text{e} + \cfrac{3}{4}$}, 53 | {$\text{e} + \cfrac{1}{2}$}, 54 | {$1$} 55 | } 56 | \end{alterqcm} 57 | 58 | \begin{alterqcm}[lq=90mm,pre=false,numbreak=1] 59 | \AQmessage{ 60 | % La fonction $k$ définie et strictement positive sur $\mathbf{R}^+$ est connue par son tableau de variations. 61 | 已知$\mathbf{R}^+$定义域内的严格正函数$k$的变分表为: 62 | 63 | \begin{center} 64 | \begin{tikzpicture} 65 | \tkzTabInit[lgt=1,espcl=2]{$x$/0.5,$k(x)$/1.5} 66 | {$0$,$1$,$3$,$+\infty$} 67 | \tkzTabVar{-/ /,% 68 | +/ /,% 69 | -/ /,% 70 | +/ $+\infty$ /}% 71 | \end{tikzpicture} 72 | \end{center}% 73 | } 74 | 75 | \AQquestion{ 76 | % Pami les tableaux suivants, quel est le tableau de variations de la fonction $g$ définie sur 77 | % $\mathbf{R}^+$ par \[g(x) = \cfrac{1}{k(x)}\ ? \] 78 | 有变化表如下,请问$\mathbf{R}^+$定义域中的$g$函数的变化表是哪个? 79 | \[g(x) = \cfrac{1}{k(x)}\ ? \] 80 | } 81 | {{表A}, 82 | {表B}, 83 | {表C} 84 | } 85 | 86 | \AQmessage{ 87 | \begin{center} 88 | 表A 89 | 90 | \begin{tikzpicture} 91 | \tkzTabInit[lgt=1,espcl=2]{$x$/0.5,$g(x)$/1.5} 92 | {$0$,$1$,$3$,$+\infty$} 93 | \tkzTabVar{-/ /,% 94 | +/ /,% 95 | -/ /,% 96 | +/ $+\infty$ /}% 97 | \end{tikzpicture} 98 | 99 | \end{center} 100 | 101 | 102 | \begin{center} 103 | 表B 104 | 105 | \begin{tikzpicture} 106 | \tkzTabInit[lgt=1,espcl=2]{$x$/0.5,$g(x)$/1.5} 107 | {$0$,$1$,$3$,$+\infty$} 108 | \tkzTabVar{+/ /,% 109 | -/ /,% 110 | +/ /,% 111 | -/ $-\infty$ /}% 112 | \end{tikzpicture} 113 | 114 | \end{center} 115 | 116 | \begin{center} 117 | 表C 118 | 119 | \begin{tikzpicture} 120 | \tkzTabInit[lgt=1,espcl=2]{$x$/0.5,$g(x)$/1.5} 121 | {$0$,$1$,$3$,$+\infty$} 122 | \tkzTabVar{-/ /,% 123 | +/ /,% 124 | -/ /,% 125 | +/ $0$ /}% 126 | \end{tikzpicture} 127 | 128 | \end{center} 129 | } 130 | 131 | \AQquestion{ 132 | % Soit $h$ la fonction définie sur $\mathbf{R}$ par $h(x) = \text{e}^x - x + 1$. 133 | % On note $\mathcal{C}$ la courbe représentative de $h$ dans un repère 134 | % orthonormal $O;\vec{\imath};\vec{\jmath}$. 135 | 设函数$h$是$\mathbf{R}$中定义的函数:$h(x) = \text{e}^x - x + 1$。 136 | $\mathcal{C}$表示正交坐标系$O;\vec{\imath};\vec{\jmath}$的函数$h$的曲线。 137 | } 138 | {{% 139 | \begin{minipage}{5cm} 140 | % La droite d'équation $y = 1$ est 141 | % asymptote à $\mathcal{C}$% 142 | 方程$y = 1$是$\mathcal{C}$的渐近线% 143 | \end{minipage} 144 | }, 145 | {\begin{minipage}{5cm} 146 | % La droite d'équation $x = 0$ est 147 | % asymptote à $\mathcal{C}$ 148 | 方程$x = 0$是$\mathcal{C}$的渐近线% 149 | \end{minipage}}, 150 | {\begin{minipage}{5cm} 151 | % La droite d'équation $y = -x + 1$ est 152 | % asymptote à $\mathcal{C}$ 153 | 方程$y = -x +1$是$\mathcal{C}$的渐近线% 154 | \end{minipage}} 155 | } 156 | \AQquestion{ 157 | % En économie, le coût marginal est le coût occasionné par la 158 | % production d'une unité supplémentaire, et on considère que le coût 159 | % marginal est assimilé à la dérivée du coût total.\\ 160 | % Dans une entreprise, une étude a montré que le coût marginal 161 | % $C_{m}(q)$ exprimé en millliers d'euro en fonction du nombre $q$ 162 | % d'articles fabriqués est donné par la relation : 163 | % \[C_{m}(q) = 3q^2 - 10q + \cfrac{2}{q} + 20.\] 164 | 在经济学中,边际成本是一个重要的指标,并且边际成本是总成本的导数。 165 | 一项研究中,边际成本用$C_{m}(q)$表示(百万欧元), 166 | 则他与产品数量$q$之间的关系为: 167 | \[C_{m}(q) = 3q^2 - 10q + \cfrac{2}{q} + 20.\] 168 | } 169 | {{ $C_{r}(q) = q^3 - 5q^2 + 2\ln q + 20q + 9984$}, 170 | {$C_{r}(q) = q^3 - 5q^2 + 2\ln q + 20q - 6$}, 171 | {$C_{r}(q) = 6q - 10 - \cfrac{2}{q^2}$} 172 | } 173 | 174 | \end{alterqcm} 175 | 176 | 以下是函数$f$及其基元函数的两种表示形式: 177 | 178 | % \subsubsection{Première représentation} 179 | \subsubsection{第1种方式} 180 | \begin{tkzexample}[code only] 181 | \begin{tikzpicture}[xscale=2.25,yscale=1] 182 | \tkzInit[xmin=-2,xmax=3,ymin=-1,ymax=6] 183 | \tkzDrawX 184 | \tkzDrawY 185 | \tkzFct[samples=100,domain = -1:2.2]{x+exp(x-1)} 186 | \tkzDefPoint(1,2){pt1} 187 | \tkzDrawPoint(pt1) 188 | \tkzPointShowCoord[xlabel=$1$,ylabel=$2$](pt1) 189 | \tkzDefPoint(2,4.71828){pt2} 190 | \tkzDrawPoint(pt2) 191 | \tkzPointShowCoord[xlabel=$2$,ylabel=$\text{e}+2$](pt2) 192 | \tkzRep 193 | \end{tikzpicture} 194 | \end{tkzexample} 195 | 196 | % \subsubsection{Seconde représentation} 197 | \subsubsection{第2种方式} 198 | \begin{tkzexample}[] 199 | \begin{tikzpicture}[xscale=2.25,yscale=1] 200 | \tkzInit[xmin=-2,xmax=3,ymin=-1,ymax=6] 201 | \tkzDrawX 202 | \tkzDrawY 203 | \tkzFct[samples=100,domain =-1:2.2]{x*x/2+exp(x-1)} 204 | \tkzDefPoint(1,1.5){pt1} 205 | \tkzDrawPoint(pt1) 206 | \tkzPointShowCoord[xlabel=$1$,ylabel=$3/2$](pt1) 207 | \tkzDefPoint(2,4.71828){pt2} 208 | \tkzDrawPoint(pt2) 209 | \tkzPointShowCoord[xlabel=$2$,ylabel=$\text{e}+2$](pt2) 210 | \tkzRep 211 | \end{tikzpicture} 212 | \end{tkzexample} 213 | 214 | % Code d'un tableau de variations 215 | 变更表代码为: 216 | 217 | \begin{tkzltxexample}[] 218 | \begin{tikzpicture} 219 | \tkzTabInit[lgt=1,espcl=2]{$x$/0.5,$k(x)$/1.5} 220 | {$0$,$1$,$3$,$+\infty$} 221 | \tkzTabVar{-/ /,% 222 | +/ /,% 223 | -/ /,% 224 | +/ $+\infty$ /}% 225 | \end{tikzpicture} 226 | \end{tkzltxexample} 227 | 228 | 229 | 230 | 231 | \end{document} 232 | \endinput 233 | -------------------------------------------------------------------------------- /doc-zh-cn/chap04/TKZdoc-fct-point.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Placer un point sur une courbe \tkzcname{tkzDefPointByFct}} \hypertarget{tptfct}{} 4 | \section{\tkzcname{tkzDefPointByFct}命令:通过函数定义点} \hypertarget{tptfct}{} 5 | 6 | % \begin{NewMacroBox}{tkzDefPointByFct}{\parg{$decimal number$}} 7 | % \emph{Cette macro permet de calculer l'image par la fonction définie précédemment, d'un nombre décimal.} 8 | % 9 | % \medskip 10 | % \begin{tabular}{lll} 11 | % \toprule 12 | % argument & exemple & explication \\ 13 | % \midrule 14 | % \TAline{decimal number}{\tkzcname{tkzDefPointByFct(0)}}{définit un point d'abscisse $0$} 15 | % \bottomrule 16 | % \end{tabular} 17 | % 18 | % \begin{tabular}{lll} 19 | % option & defaut & explication \\ 20 | % \midrule 21 | % \TOline{draw}{false}{permet de tracer le point avec le style courant} 22 | % \TOline{with}{a}{permet de choisir la fonction} 23 | % \TOline{ref}{empty}{permet de donner une référence au point} 24 | % \bottomrule 25 | % \end{tabular} 26 | % 27 | % \emph{C'est donc la dernière fonction définie qui est utilisée. Si une autre fonction, est utilisée alors il faut utiliser l'ancienne macro \tkzcname{tkzFctPt}. Le point est défini sous un nom générique \tkzname{tkzPointResult} mais non tracé. Afin de le tracer il faut utiliser la macro \tkzcname{tkzDrawPoint}.} 28 | % \end{NewMacroBox} 29 | \begin{NewMacroBox}{tkzDefPointByFct}{\parg{横坐标值}} 30 | \emph{ 31 | 该命令允许使用十进制数表示的$x$坐标,通过函数计算,定义函数曲线的一个点。 32 | } 33 | 34 | \medskip 35 | \begin{tabular}{lll} 36 | \toprule 37 | 参数 & 样例 & 说明 \\ 38 | \midrule 39 | \TAline{横坐标值}{\tkzcname{tkzDefPointByFct(0)}}{定义函数曲线上横坐标为$0$的点} 40 | \bottomrule 41 | \end{tabular} 42 | 43 | \begin{tabular}{lll} 44 | 选项 & 默认值 & 说明 \\ 45 | \midrule 46 | \TOline{draw}{false}{允许使用当前样式绘制该点} 47 | \TOline{with}{a}{指定函数,根据\tkzcname{tkzFct}命令定义的自然序,用字母编号} 48 | \TOline{ref}{empty}{设置定义点的引用名称} 49 | \bottomrule 50 | \end{tabular} 51 | 52 | \emph{ 53 | 该命令使用最近使用的函数定义点,如果需使用别的函数, 54 | 请使用旧的\tkzcname{tkzFctPt}命令。 55 | 可以通过\tkzcname{tkzPointResult}命令使用当前定义的点, 56 | 但如果需要绘制该点,则需要使用\tkzcname{tkzDrawPoint}命令。 57 | } 58 | \end{NewMacroBox} 59 | 60 | % \subsection{Exemple avec \tkzcname{tkzGetPoint}} 61 | \subsection{\tkzcname{tkzGetPoint}命令示例} 62 | % Cela permet de référencer le point créé par \tkzcname{tkzDefPointByFct}. 63 | 该命令可以引用用\tkzcname{tkzDefPointByFct}命令定义的点。 64 | 65 | \begin{center} 66 | \begin{tkzexample}[vbox] 67 | \begin{tikzpicture}[scale=1.25] 68 | \tkzInit[xmin=-2,xmax=2,xstep=1, 69 | ymin=-8,ymax=24,ystep=8] 70 | \tkzGrid \tkzAxeXY 71 | \tkzFct[domain =-1.5:1]{3.0-1.3125*x**5-2.5*x**3} 72 | \tkzDefPointByFct(.5) \tkzGetPoint{A}\tkzDrawPoint(A) 73 | \tkzLabelPoint[above right](A){$A_0$} 74 | \end{tikzpicture} 75 | \end{tkzexample} 76 | \end{center} 77 | 78 | 79 | \newpage 80 | % \subsection{Exemple avec \tkzcname{tkzGetPoint} et \tkzname{tkzPointResult}} 81 | % Il est possible de ne pas référencer le point et d'utiliser la référence générique. 82 | \subsection{\tkzcname{tkzGetPoint}命令和\tkzname{tkzPointResult}} 83 | 如果不需要保存并命名定义的点,则可以用\tkzname{tkzPointResult}直接该点,。 84 | 85 | \begin{tkzexample}[latex=7cm,small] 86 | \begin{tikzpicture}[scale=1.25] 87 | \tkzInit[xmin=-2,xmax=2,xstep=1, 88 | ymin=-8,ymax=24,ystep=8] 89 | \tkzGrid 90 | \tkzAxeXY 91 | \tkzFct[domain =-1.5:1]{3.0-1.3125*x**5-2.5*x**3} 92 | \tkzDefPointByFct(.5) 93 | \tkzDrawPoint(tkzPointResult) 94 | % ou bien \tkzDefPointByFct[draw](.5) 95 | \end{tikzpicture} 96 | \end{tkzexample} 97 | 98 | % \subsection{Options \tkzname{draw} et \tkzname{ref}} 99 | \subsection{\tkzname{draw}和\tkzname{ref}选项} 100 | % Cela permet de tracer un point directement avec les options usuelles donc sans possibilités de personnaliser et d'attribuer une référence à ce point. 101 | \tkzname{draw}允许在定义点时直接绘制该点,\tkzname{ref}允许为定义的点命名, 102 | 并在后续代码中通过该名称引用该点。 103 | 104 | \begin{tkzexample}[latex=7cm,small] 105 | \begin{tikzpicture}[scale=1.25] 106 | \tkzInit[xmin=-2,xmax=2,xstep=1, 107 | ymin=-8,ymax=24,ystep=8] 108 | \tkzGrid 109 | \tkzAxeXY 110 | \tkzFct[domain =-1.5:1]{3.0-1.3125*x**5-2.5*x**3} 111 | \tkzDefPointByFct[draw,ref=A](.5) 112 | \tkzLabelPoint[above right](A){$a$} 113 | \end{tikzpicture} 114 | \end{tkzexample} 115 | 116 | \newpage 117 | % \subsection{Placer des points sans courbe} 118 | \subsection{仅绘制函数曲线点} 119 | % Attention, ceci est délicat. Il suffit de définir la macro \tkzcname{tkzFctLast} qui est la dernière expression traduite avec la syntaxe de \tkzname{fp.sty}. Les points sont donc déterminer avec \tkzname{fp.sty}. 120 | 该例中,需提前定义表示函数的\tkzcname{tkzFctLast}全局宏(\tkzcname{global}\tkzcname{edef})。 121 | 由于通过\tkzname{fp.sty}宏包实现,因此,该宏中的函数定义需要使用\tkzname{fp.sty}语法。 122 | 123 | \begin{tkzexample}[] 124 | \begin{tikzpicture}[xscale=3,yscale=2] 125 | \tkzInit[xmin=-2,xmax=2,xstep=1, 126 | ymin=-8,ymax=24,ystep=8] 127 | \tkzGrid 128 | \tkzAxeXY 129 | \global\edef\tkzFctLast{3.0-1.3125*x^5-2.5*x^3} 130 | \foreach \va in {-1.5,-1.4,...,1}{% 131 | \tkzDefPointByFct[draw](\va)} 132 | \end{tikzpicture} 133 | \end{tkzexample} 134 | 135 | \newpage\null 136 | \subsection{使用绘图坐标定义点} 137 | 138 | % Cette fois, le domaine s'étend de 0 à 800, les valeurs prises par la fonction de $0$ à $\numprint{2000}$. \tkzname{xstep=100} donc il faut utliser |\x| à la place de $x$. Une petite astuce au niveau de gnuplot, 1. et 113. permettent d'obtenir une division dans les décimaux sinon la division se fait dans les entiers. 139 | 在此,将函数定义域设置为$0$至$\numprint{800}$,值域设置为$0$ 至 $\numprint{2000}$。 140 | 由于\tkzname{xstep=100},所以在函数定义中应使用|\x|代替$x$。 141 | 注意,要用$1.$和$113.$带小数点的数实现浮点数运算。 142 | 143 | \begin{tkzexample}[] 144 | \begin{tikzpicture}[scale=1.6] 145 | \tkzInit[xmin = 0, xmax = 800, 146 | ymin = 0, ymax = 2000, 147 | xstep = 100,ystep = 400] 148 | \tkzGrid 149 | \tkzAxeXY 150 | \tkzFct[color = blue, 151 | domain = 0:800]% 152 | {(1./90000)*\x*\x*\x-(1./100)*\x*\x+(113./36)*\x} 153 | \foreach \va in {0,450,800}{% 154 | \tkzDefPointByFct[draw](\va)} 155 | \end{tikzpicture} 156 | \end{tkzexample} 157 | 158 | \newpage 159 | % \subsection{Placer des points avec deux fonctions} 160 | \subsection{设置点样式} 161 | 162 | \medskip 163 | % Revoir \tkzcname{tkzSetUpPoint} et \tkzcname{tkzText} du module \tkzname{tkz-base.sty} 164 | 请参阅\tkzname{tkz-base.sty}宏包的\tkzcname{tkzSetUpPoint}命令和\tkzcname{tkzText}命令。 165 | 166 | 167 | \begin{tkzexample}[code only] 168 | \begin{tikzpicture}[scale=4] 169 | \tkzInit[xmax=3,ymax=2] 170 | \tkzAxeX 171 | \tkzAxeY 172 | \tkzGrid(0,0)(3,2) 173 | \tkzFct[color = red,domain = 1./3:3]{0.125*(3*x-1)+0.375*(3*x-1)/(x*x)} 174 | \tkzFct[color = green,domain = 1./3:3]{0.125*(3*x-1)} 175 | \tkzSetUpPoint[shape=circle, size = 4, color=black, fill=lightgray] 176 | \tkzDefPointByFct[draw,with = a](1) 177 | \tkzDefPointByFct[draw,with = a](2) 178 | \tkzDefPointByFct[draw,with = a](3) 179 | \tkzDefPointByFct[draw,with = b](3) 180 | \tkzDefPointByFct[draw,with = b](1/3) 181 | \tkzText[draw,color= red,fill=red!20](1,1.5) % 182 | {$f(x)=\frac{1}{8}(3x-1)+\frac{3}{8}% 183 | \left(\frac{3x-1}{x^2}\right)$} 184 | \tkzText[draw,color= green!50!black,fill=green!20]% 185 | (2,0.3){$g(x)=\frac{1}{8}(3x-1)$} 186 | \end{tikzpicture} 187 | \end{tkzexample} 188 | 189 | \begin{tikzpicture}[scale=4] 190 | \tkzInit[xmax=3,ymax=2] 191 | \tkzAxeX 192 | \tkzAxeY 193 | \tkzGrid(0,0)(3,2) 194 | \tkzFct[color = red,domain = 1./3:3]{0.125*(3*x-1)+0.375*(3*x-1)/(x*x)} 195 | \tkzFct[color = green,domain = 1./3:3]{0.125*(3*x-1)} 196 | \tkzSetUpPoint[shape=circle, size = 4, color=black, fill=lightgray] 197 | \tkzDefPointByFct[draw,with = a](1) 198 | \tkzDefPointByFct[draw,with = a](2) 199 | \tkzDefPointByFct[draw,with = a](3) 200 | \tkzDefPointByFct[draw,with = b](3) 201 | \tkzDefPointByFct[draw,with = b](1/3) 202 | \tkzText[draw,color= red,fill=red!20](1,1.5) % 203 | {$f(x)=\frac{1}{8}(3x-1)+\frac{3}{8}% 204 | \left(\frac{3x-1}{x^2}\right)$} 205 | \tkzText[draw,color= green!50!black,fill=green!20]% 206 | (2,0.3){$g(x)=\frac{1}{8}(3x-1)$} 207 | \end{tikzpicture} 208 | 209 | %<---------------------------------------------------------------------------> 210 | \end{document} 211 | \endinput 212 | -------------------------------------------------------------------------------- /doc-zh-cn/chap03/TKZdoc-fct-fonctions.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Les différentes macros} 4 | \section{命令简介} 5 | 6 | % \tkzname{gnuplot} détermine les points nécessaires pour tracer la courbe. Le nombre de points est fixé par l'option \tkzname{samples}; dans les premiers exemples la valeur du nombre de points est celle donnée par défaut. Ensuite Tikz va utiliser cette table pour tracer la courbe. C'est donc \tkzname{Tikz} qui trace la courbe. 7 | \tkzname{tkz-fct}宏包通过\tkzname{gnuplot}计算函数曲线上的抽样点坐标, 8 | 采样点数由\tkzname{samples}选项指定, 9 | 在第1个示例中,采样点数取默认值。 10 | 得到采样点坐标数据表后,用\TIKZ{}实现绘图。 11 | 12 | % \subsection{Tracé d'une fonction avec gnuplot \tkzcname{tkzFct}} 13 | \subsection{\tkzcname{tkzFct}命令:用gnuplot绘制函数曲线} 14 | % Cette première macro est la plus importante car elle permet de tracer la représentation graphique d'une fonction continue .\hypertarget{tfct}{} 15 | 该命令是一个重要的命令,用于绘制函数曲线。\hypertarget{tfct}{} 16 | 17 | % \begin{NewMacroBox}{tkzFct}{\oarg{local options}\var{gnuplot expression}} 18 | % \emph{La fonction est donnée en utilisant la syntaxe de gnuplot. x est la variable sauf si \tkzname{xstep} est différent de 1, dans ce cas la variable est \tkzcname{x}.} 19 | % 20 | % \medskip 21 | % \begin{tabular}{lll} 22 | % \toprule 23 | % options & exemple & explication \\ 24 | % \midrule 25 | % \TAline{gnuplot expression}{x**3}{** représente la puissance $\wedge$} 26 | % \bottomrule 27 | % \end{tabular} 28 | % 29 | % \emph{L'expression est de la forme 2*x+1 ; 3*log(x) ; x*exp(x) ; x*x*x+x*x+x. } 30 | % 31 | % Les options sont celles de \TIKZ. 32 | % 33 | % \begin{tabular}{lll} 34 | % \toprule 35 | % options & défaut & définition \\ 36 | % \midrule 37 | % \TOline{domain}{xmin:xmax}{domaine de la fonction} 38 | % \TOline{samples}{200}{nombre de points utilisés} 39 | % \TOline{id} {tkzfct}{permet d'identifier les noms des fichiers auxiliaires} 40 | % \TOline{color}{black}{couleur de la ligne} 41 | % \TOline{line width} {1pt}{épaisseur de la ligne} 42 | % \TOline{style} {solid}{style de la ligne} 43 | % \end{tabular} 44 | % \end{NewMacroBox} 45 | \begin{NewMacroBox}{tkzFct}{\oarg{命令选项}\var{gnuplot函数表达式}} 46 | \emph{ 47 | 函数采用gnuplot语法表示, 48 | 其中,x为自变量,如\tkzname{xstep}的值不为1, 49 | 则应使用\tkzcname{x}表示自变量。} 50 | 51 | \medskip 52 | \begin{tabular}{lll} 53 | \toprule 54 | 参数 & 示例 & 说明 \\ 55 | \midrule 56 | \TAline{gnuplot函数表达式}{x**3}{**表示幂运算($\wedge$)} 57 | \bottomrule 58 | \end{tabular} 59 | 60 | \emph{类似的函数表达式有:2*x+1、3*log(x)、x*exp(x)、x*x*x+x*x+x等。} 61 | 62 | 选项可以是所有有效\TIKZ{}选项 63 | 64 | \begin{tabular}{lll} 65 | \toprule 66 | 选项 & 默认值 & 含义 \\ 67 | \midrule 68 | \TOline{domain}{xmin:xmax}{函数定义域} 69 | \TOline{samples}{200}{采样点数} 70 | \TOline{id} {tkzfct}{标识id} 71 | \TOline{color}{black}{颜色} 72 | \TOline{line width} {1pt}{线宽} 73 | \TOline{style} {solid}{线型} 74 | \end{tabular} 75 | \end{NewMacroBox} 76 | 77 | % \tkzBomb Lorsque \tkzname{xstep} est différent de $1$, il est nécessaire de remplacer $x$ par |\x|. 78 | \tkzBomb 如果\tkzname{xstep}不为$1$,则自变量$x$需要用|\x|表示。 79 | % \tkzHand Il faut bien évidemment avoir initialisé l'environnement à l'aide \tkzcname{tkzInit} avant d'appeler \tkzcname{tkzFct}. 80 | \tkzHand 在使用\tkzcname{tkzFct}命令之前,需要用\tkzcname{tkzInit}初始化绘图环境。 81 | % \tkzBomb Attention à ne pas mettre d'espace entre les arguments. 82 | \tkzBomb 参数中不允许留有空白。 83 | %<---------------------------------------------------------------------------> 84 | % \subsection{option : \tkzname{samples}} 85 | \subsection{\tkzname{samples}选项} 86 | 87 | 如果为线性函数,仅需两个点即可,如 88 | % Il faut remarquer que pour tracer une droite seulement deux points sont nécessaires, ainsi le code~: 89 | 90 | \begin{tkzltxexample}[] 91 | \tkzFct[{-(},color=red,samples=2,domain =-1:2]{(8-1.5*\x)/2} 92 | \end{tkzltxexample} 93 | 94 | 95 | % donne un fichier xxx.table qui contient ~: 96 | 生成的\enquote{xxx.table}坐标点数据表的内容为: 97 | 98 | \begin{tkzltxexample}[] 99 | # Curve 0 of 1, 2 points 100 | # Curve title: "(8-1.5*x)/2" 101 | # x y type 102 | -1.00000 4.75000 i 103 | 2.00000 2.50000 i 104 | \end{tkzltxexample} 105 | 106 | % Ce qui est simplement suffisant. Plus simple est dans ce cas, de tracer un segment. 107 | 这些数据足够用于绘制简单的线段。 108 | 109 | % On demande 400 valeurs pour la table qui va permettre le tracé. Par défaut, la valeur choisie est 200. 110 | 以下代码中,为函数曲线设置了400个采样点(\tkzname{samples}选项的默认值是200)。 111 | 112 | \medskip 113 | \begin{tkzexample}[latex=7cm] 114 | \begin{tikzpicture}[scale=1] 115 | \tkzInit[xmax=5,ymax=2] 116 | \tkzGrid[sub] 117 | \tkzAxeXY 118 | \tkzFct[samples=400,domain=.5:5]{1/x} 119 | \end{tikzpicture} 120 | \end{tkzexample} 121 | 122 | %<---------------------------------------------------------------------------> 123 | % \subsection{options : \tkzname{xstep, ystep}} 124 | \subsection{\tkzname{xstep, ystep}选项} 125 | 126 | \begin{tkzexample}[] 127 | \begin{tikzpicture} 128 | \tkzInit[xmax= 110,xstep=10, 129 | ymax=6,ystep=1] 130 | \tkzDrawX[label={\textit{年龄}},below= -18pt] 131 | \tkzLabelX 132 | \tkzDrawY[label={\textit{公升s}}] 133 | \tkzFct[domain = 0.1:100 ]{50/\x} 134 | \end{tikzpicture} 135 | \end{tkzexample} 136 | 137 | 138 | % \subsection{Modification de \tkzname{xstep} et \tkzname{ystep}} 139 | \subsection{改变\tkzname{xstep}和\tkzname{ystep}选项} 140 | 141 | % Cette fois le domaine s'étend de 0 à 800, les valeurs prises par la fonction de $0$ à $\numprint{2000}$. \tkzname{xstep=100} donc il faut utiliser |\x| à la place de $x$. Une petite astuce au niveau de gnuplot, 1. et 113. permettent d'obtenir une division dans les décimaux sinon la division se fait dans les entiers. 142 | 在此,将函数的定义域设置为$0$到$\numprint{700}$,并取\tkzname{xstep=100}, 143 | 值域设置为$0$到$\numprint{2000}$。 144 | 因此,在函数表达式中应该用|\x|代替$x$。 145 | 注意,在gnuplot中,需要使用类似\enquote{\tkzname{1.}}和\enquote{\tkzname{113.}} 146 | 带\tkzimp{小数点}的数字进行浮点数除法运算, 147 | 否则,则会使用整数除法运算(例如1/3的结果为0)。 148 | 149 | % Ensuite, j'utilise les macros pour placer des points 150 | 然后,用该命令绘制函数曲线。 151 | %<---------------------------------------------------------------------------> 152 | \begin{tkzexample}[vbox] 153 | \begin{tikzpicture}[scale=1.5] 154 | \tkzInit[xmax=700,xstep=100,ymax=1200,ystep=400] 155 | \tkzGrid(0,0)(700,1200) \tkzAxeXY 156 | \tkzFct[color=red,samples=100,line width=0.8pt,domain =0:700]% 157 | {(1./90000)*\x*\x*\x-(1./100)*\x*\x+(113./36)*\x} 158 | \end{tikzpicture} 159 | \end{tkzexample} 160 | 161 | % \subsection{\tkzname{ystep} et les fonctions constantes} 162 | \subsection{\tkzname{ystep}选项和常函数} 163 | 164 | % Attention, ici \tkzname{ystep=6} or \tkzname{gnuplot} donne $80\div 6=13$. il faut donc écrire $80.$ 165 | 在此\tkzname{ystep=6},由于\tkzname{gnuplot}执行$80\div 6$运算的结果是$13$。 166 | 因此,应该使用\enquote{$80.0$}表示常函数。 167 | 168 | 169 | 170 | \begin{tkzexample}[vbox] 171 | \begin{tikzpicture}[scale=0.4] 172 | \tkzInit[xmax=30,ymax=90,ystep=6] 173 | \tkzDrawX[right,label=$t$] 174 | \tkzDrawY[above,label=$P$] 175 | \tkzFct[line width=1pt,color=red,dashed,domain=0:30]{80.0} 176 | \tkzFct[line width=1pt,color=blue,domain=0:30]{80/(1.0+4.0*exp(-0.21*x))} 177 | \tkzText[above,color=red](20,80){$P=80$} 178 | \end{tikzpicture} 179 | \end{tkzexample} 180 | 181 | % \subsection{Les fonctions affines ou linéaires} 182 | \subsection{仿射函数或线性函数} 183 | % Pour obtenir des droites, on peut utiliser \tkzname{gnuplot} même si l'outil est un peu lourd dans ce cas. Pour alléger les calculs, il est possible de ne demander que deux points ! 184 | 可以使用\tkzname{gnuplot}绘制直线,虽然这样会增加绘图负担,为简化计算,可只使用2个采样点。 185 | 186 | \begin{tkzexample}[vbox] 187 | \begin{tikzpicture}[] 188 | \tkzInit[ymax=20,ystep=5] 189 | \tkzAxeXY 190 | \tkzFct[color=red,domain=0:10,samples=2]{2*x+5} 191 | \tkzFct[color=blue,domain=0:10,samples=2]{-x+15} 192 | \tkzFct[color=green,domain=0:10,samples=2]{7} % 7/5=1(整数) 193 | \tkzFct[color=purple,domain=0:10,samples=2]{7.}%7.0/5 =1.2(浮点数) 194 | \end{tikzpicture} 195 | \end{tkzexample} 196 | %<---------------------------------------------------------------------------> 197 | \subsection{子网格} 198 | 199 | $y=(x-4)\text{e}^{-0.25x+5}$ 200 | 201 | % Il est possible de dessiner une autre grille. 202 | 可以采用子网格突出表示函数曲线局部。 203 | 204 | \begin{tkzexample}[latex=8cm] 205 | \begin{tikzpicture} 206 | \tkzInit[xmin=4,xmax=18,xstep=2, 207 | ymin=20,ymax=90,ystep=10] 208 | \tkzFct[domain = 5:18]% 209 | {(\x-4)*exp(-0.25*\x+5)} 210 | \tkzGrid(4,20)(18,90) 211 | \tkzAxeXY 212 | \tkzGrid[sub, 213 | subxstep=0.5, 214 | subystep=2, 215 | color=brown](6,60)(12,90) 216 | \end{tikzpicture} 217 | \end{tkzexample} 218 | %<---------------------------------------------------------------------------> 219 | \subsection{使用\tkzname{tkz-base}宏包的命令} 220 | % Toutes les macros de \tkzname{tkz-base} sont bien sûr utilisables, en voici quelques exemples. 221 | 在绘图中,也可以直接使用\tkzname{tkz-base}宏包的命令。 222 | 223 | \begin{center} 224 | \begin{tkzexample}[vbox] 225 | \begin{tikzpicture}[scale=2] 226 | \tkzInit[xmin=-3,xmax=3, ymin=-1,ymax=4] 227 | \tkzGrid[sub,subxstep=.5,subystep=.5] 228 | \tkzAxeXY 229 | \tkzFct[domain = -3:2]{(2-x)*exp(x)} 230 | \tkzText(-2,1.25){$\mathcal{C}_{f}$} 231 | \tkzDefPoint(2,0){A} \tkzDrawPoint(A) \tkzLabelPoints(A) 232 | \end{tikzpicture} 233 | \end{tkzexample} 234 | \end{center} 235 | 236 | 237 | %<---------------------------------------------------------------------------> 238 | \end{document} 239 | \endinput 240 | -------------------------------------------------------------------------------- /doc-zh-cn/chap07/TKZdoc-fct-area.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Macros pour définir des surfaces } 4 | \section{区域填充命令} 5 | 6 | % Il s'agit par exemple de représenter la partie du plan comprise entre la courbe représentative d'une fonction, l'axe des abscisses et les droites 7 | % d'équation $x=a$ et $x=b$. 8 | 例如,可通过着色表示一个函数曲线与横轴、直线$x=a$和$x=b$包围的区域。 9 | 10 | \subsection{\tkzcname{tkzDrawArea}或\tkzcname{tkzArea}命令:填充区域} \hypertarget{tda}{} 11 | 12 | % \begin{NewMacroBox}{tkzDrawArea}{\oarg{local options}} 13 | % Les options sont celles de \TIKZ. 14 | % 15 | % \begin{tabular}{lll} 16 | % \toprule 17 | % options & défaut & définition \\ 18 | % \midrule 19 | % \TOline{domain}{-5:5}{domaine de la fonction} 20 | % \TOline{with}{a}{référence de la fonction} 21 | % \TOline{color}{200}{nombre de points utilisés} 22 | % \TOline{opacity} {no defaut}{trnsparence} 23 | % \TOline{style}{black}{couleur de la ligne} 24 | % \end{tabular} 25 | % \end{NewMacroBox} 26 | \begin{NewMacroBox}{tkzDrawArea}{\oarg{命令选项}} 27 | 可以使用所有有效\TIKZ{}选项。 28 | 29 | \begin{tabular}{lll} 30 | \toprule 31 | 选项 & 默认值 & 含义 \\ 32 | \midrule 33 | \TOline{domain}{-5:5}{函数定义域} 34 | \TOline{with}{a}{函数名称} 35 | \TOline{color}{200}{颜色} 36 | \TOline{opacity} {无}{透明度} 37 | \TOline{style}{black}{线型} 38 | \end{tabular} 39 | \end{NewMacroBox} 40 | 41 | \subsection{对数函数} 42 | 43 | \begin{tkzexample}[] 44 | \begin{tikzpicture}[scale=2] 45 | \tkzInit[xmin=0,xmax=3,xstep=1, 46 | ymin=-2,ymax=2,ystep=1] 47 | \tkzGrid 48 | \tkzAxeXY 49 | \tkzFct[domain= 0.4:3]{1./x} 50 | \tkzDefPointByFct(1) 51 | \tkzGetPoint{A} 52 | \tkzDefPointByFct(2) 53 | \tkzGetPoint{B} 54 | \tkzLabelPoints[above right](A,B) 55 | \tkzDrawArea[color=blue!30, 56 | domain = 1:2] 57 | \tkzFct[domain = 0.5:3]{log(x)} 58 | \tkzDrawArea[color=red!30, 59 | domain = 1:2] 60 | \tkzPointShowCoord(A) 61 | \tkzPointShowCoord(B) 62 | \tkzDrawPoints(A,B) 63 | \end{tikzpicture} 64 | \end{tkzexample} 65 | 66 | \subsection{简单示例} 67 | \begin{tkzexample}[] 68 | \begin{tikzpicture}[scale=1.75] 69 | \tkzInit[xmin=0,xmax=800,xstep=100, 70 | ymin=0,ymax=2000,ystep=400] 71 | \tkzGrid 72 | \tkzAxeXY 73 | \tkzFct[domain = 0:800]{(1./90000)*\x*\x*\x-(1./100)*\x*\x+(113./36)*\x} 74 | \tkzDefPoint(450,400){a} 75 | \tkzDrawPoint(a) 76 | \tkzDrawArea[color=orange!50, domain =0:450] 77 | \tkzDrawArea[color=orange!80, domain =450:800] 78 | \end{tikzpicture} 79 | \end{tkzexample} 80 | 81 | %<---------------------------------------------------------------------------> 82 | 83 | \newpage 84 | \subsection{填充样式} 85 | \begin{tkzexample}[] 86 | \begin{tikzpicture}[scale=2] 87 | \tkzInit[xmin=-3,xmax=4,ymin=-2,ymax=4] 88 | \tkzGrid(-3,-2)(4,4) 89 | \tkzDrawXY 90 | \tkzFct[domain = -2.15:3.2]{(2+\x)*exp(-\x)} 91 | \tkzDrawArea[pattern=north west lines,domain =-2:2] 92 | \tkzDrawTangentLine[draw,color=blue](0) 93 | \tkzDrawTangentLine[draw,color=blue](-1) 94 | \tkzDefPointByFct(2) \tkzGetPoint{C} 95 | \tkzDefPoint(2,0){B} 96 | \tkzDrawPoints(B,C) \tkzLabelPoints[above right](B,C) 97 | \tkzRep 98 | \end{tikzpicture} 99 | \end{tkzexample} 100 | %<---------------------------------------------------------------------------> 101 | 102 | \newpage 103 | % \subsection{Surface comprise entre deux courbes \tkzcname{tkzDrawAreafg}} 104 | \subsection{\tkzcname{tkzDrawAreafg}命令:填充两条函数曲线之间的区域} 105 | 106 | \hypertarget{tdafg}{} 107 | % \begin{NewMacroBox}{tkzDrawAreafg}{\oarg{local options}} 108 | % Cette macro permet de mettre en évidence une surface délimitée par les courbes représentatives de deux fonctions. La courbe (a) doit être au-dessus de la courbe (b). 109 | % 110 | % \medskip 111 | % \begin{tabular}{lll} 112 | % \toprule 113 | % options & défaut & explication \\ 114 | % \midrule 115 | % \TOline{between} {a and b}{référence des deux courbes} 116 | % \TOline{domain= min:max}{domain=-5:5}{Les options sont celles de \TIKZ.} 117 | % \TOline{opacity} {0.5}{transparence} 118 | % \bottomrule 119 | % \end{tabular} 120 | % 121 | % \emph{L'option \tkzname{pattern} de \TIKZ\ peut être utile ! } 122 | % \end{NewMacroBox} 123 | \begin{NewMacroBox}{tkzDrawAreafg}{\oarg{命令选项}} 124 | 该命令用于填充两条函数曲线包围的区域,要求曲线(a)必须高于曲线(b)。 125 | 126 | \medskip 127 | \begin{tabular}{lll} 128 | \toprule 129 | 选项 & 默认值 & 说明 \\ 130 | \midrule 131 | \TOline{between} {a and b}{曲线名称} 132 | \TOline{domain= min:max}{domain=-5:5}{定义域(\TIKZ{}的选项)} 133 | \TOline{opacity} {0.5}{透明度} 134 | \bottomrule 135 | \end{tabular} 136 | 137 | \emph{可以使用类似\tkzname{pattern}的所有有效\TIKZ{}填充样式选项。 } 138 | \end{NewMacroBox} 139 | %<---------------------------------------------------------------------------> 140 | 141 | % \subsection{Surface comprise entre deux courbes en couleur} 142 | \subsubsection{两条函数曲线间区域填充示例} 143 | % Par défaut, la surface définie est comprise entre les deux premières courbes. 144 | 默认情况下,区域位于两条函数曲线之间。 145 | 146 | \begin{tkzexample}[vbox] 147 | \begin{tikzpicture}[scale=1.5] 148 | \tkzInit[xmax=5,ymax=5] 149 | \tkzGrid \tkzAxeXY 150 | \tkzFct[domain = 0:5]{x} 151 | \tkzFct[domain = 1:5]{log(x)} 152 | \tkzDrawAreafg[color = orange!50,domain = 1:5] 153 | \end{tikzpicture} 154 | \end{tkzexample} 155 | 156 | %<---------------------------------------------------------------------------> 157 | \newpage 158 | \subsubsection{用图案填充} 159 | 160 | \begin{tkzltxexample}[] 161 | \tkzDrawAreafg[between= a and b,pattern=north west lines,domain = 1:5] 162 | \end{tkzltxexample} 163 | 164 | \begin{center} 165 | \begin{tkzexample}[vbox] 166 | \begin{tikzpicture}[scale=.8] 167 | \tkzInit[xmax=5,ymax=5] 168 | \tkzGrid 169 | \tkzAxeXY 170 | \tkzFct[domain = 0:5]{x} 171 | \tkzFct[domain = 1:5]{log(x)} 172 | \tkzDrawAreafg[between= a and b,pattern=north west lines,domain = 1:5] 173 | \end{tikzpicture} 174 | \end{tkzexample} 175 | \end{center} 176 | 177 | %<---------------------------------------------------------------------------> 178 | % \subsection{Surface comprise entre deux courbes avec l'option \tkzname{between}} 179 | \subsubsection{\tkzname{between}选项} 180 | % Attention à l'ordre des références dans l'option \tkzname{between}. Seule la partie de la surface (b) est au-dessus de (a) est représentée. 181 | 注意,\tkzname{between}的引用顺序,在此表示函数曲线(b)高于函数曲线(a)。 182 | 183 | \begin{tkzexample}[latex=7cm] 184 | \begin{tikzpicture}[scale=1.25] 185 | \tkzInit[ymin=-1,xmax=5,ymax=3] 186 | \tkzGrid 187 | \tkzAxeXY 188 | \tkzFct[domain = 0.5:5]{1/x}% courbe a 189 | \tkzFct[domain = 1:5]{log(x)}% courbe b 190 | \tkzDrawAreafg[between=b and a, 191 | color=magenta!50, 192 | domain = 1:4] 193 | \end{tikzpicture} 194 | \end{tkzexample} 195 | 196 | %<---------------------------------------------------------------------------> 197 | \newpage 198 | % \subsection{Surface comprise entre deux courbes : courbes de Lorentz} 199 | \subsubsection{两条Lorentz函数曲线之间的区域} 200 | % Ici aussi, attention à l'ordre des références dans l'option \tkzname{between}. 201 | 在此,也要注意\tkzname{between}选项中的函数曲线引用顺序。 202 | 203 | \begin{tkzexample}[vbox] 204 | \begin{tikzpicture}[scale=1.25] 205 | \tkzInit[xmax=1,ymax=1,xstep=0.1,ystep=0.1] 206 | \tkzGrid 207 | \tkzAxeXY 208 | \tkzFct[color = red,domain = 0:1]{(exp(\x)-1)/(exp(1)-1)} 209 | \tkzFct[color = blue,domain = 0:1]{\x*\x*\x} 210 | \tkzFct[color = green,domain = 0:1]{\x} 211 | \tkzDrawAreafg[between = c and b,color=purple!40,domain = 0:1] 212 | \tkzDrawAreafg[between = c and a,color=gray!60,domain = 0:1] 213 | \end{tikzpicture} 214 | \end{tkzexample} 215 | 216 | %<---------------------------------------------------------------------------> 217 | % \subsection{Mélange de style} 218 | \subsubsection{混合样式} 219 | 220 | \begin{tkzexample}[] 221 | \begin{tikzpicture}[scale=2.5] 222 | \tkzInit[xmin=-1,xmax=4,ymin=0,ymax=5] 223 | \tkzGrid 224 | \tkzAxeXY 225 | \tkzFct[domain = -.5:4]{ 4*x-x**2+4/(x**2+1)**2} 226 | \tkzFct[domain = -.5:4]{x-1+4/(x**2+1)**2} 227 | \tkzDrawAreafg[color=green,domain = 1:4] 228 | \tkzDrawAreafg[pattern=north west lines,domain = -.5:1] 229 | \tkzRep 230 | \tkzText(2.5,4.5){$C_f$} 231 | \tkzText(2.5,1){$C_g$} 232 | \end{tikzpicture}% 233 | \end{tkzexample} 234 | 235 | \newpage %<---------------------------------------------------------------------------> 236 | % \subsection{Courbes de niveaux} 237 | % Le code est intéressant pour la définition des fonctions constantes aux lignes 10 et 11. 238 | \subsubsection{水平曲线} 239 | 注意代码第10行和第11行的常函数定义。 240 | 241 | \begin{tkzexample}[num] 242 | \begin{tikzpicture}[scale=.75] 243 | \tkzInit[xmax=20,ymax=12] 244 | \tkzGrid[color=orange,sub](0,0)(20,12) 245 | \tkzAxeXY 246 | \tkzFct[samples=400,domain =0:8]{(32-4*x)**(0.5)} % a 247 | \tkzFct[samples=400,domain =0:18]{(72-4*x)**(0.5)} % b 248 | \tkzFct[samples=400,domain =0:20]{(112-4*x)**(0.5)} % c 249 | \tkzFct[samples=400,domain =2:20]{(152-4*x)**(0.5)} % d 250 | \tkzFct[samples=400,domain =12:20]{(192-4*x)**(0.5)}% e 251 | \def\tkzFctgnuf{0} % f 252 | \def\tkzFctgnug{12}% g 253 | \tkzDrawAreafg[between= b and a,color=gray!80,domain = 0:8] 254 | \tkzDrawAreafg[between= b and f,color=gray!80,domain = 8:18] 255 | \tkzDrawAreafg[between= d and c,color=gray!50,domain = 2:20] 256 | \tkzDrawAreafg[between= g and c,color=gray!50,domain = 0:2] 257 | \tkzDrawAreafg[between= g and e,color=gray!20,domain =12:20] 258 | \end{tikzpicture}% 259 | \end{tkzexample} 260 | 261 | \end{document} 262 | \endinput 263 | -------------------------------------------------------------------------------- /doc-zh-cn/pgfornament.sty: -------------------------------------------------------------------------------- 1 | % pgfornament.sty (utf8 encoding) 2 | % Copyright 2020 Alain Matthes 3 | % This work may be distributed and/or modified under the 4 | % conditions of the LaTeX Project Public License, either version 1.3 5 | % of this license or (at your option) any later version. 6 | % The latest version of this license is in 7 | % http://www.latex-project.org/lppl.txt 8 | % and version 1.3 or later is part of all distributions of LaTeX 9 | % version 2005/12/01 or later. 10 | % 11 | % This work has the LPPL maintenance status “maintained”. 12 | % 13 | % The Current Maintainer of this work is Alain Matthes. 14 | %---------%---------%---------%---------%---------%---------%---------%--------- 15 | % First version created by Alain Matthes le 2012-02-22. 16 | %---------%---------%---------%---------%---------%---------%---------%--------- 17 | % Inspired from psvectorian P Fradin H Voss 18 | \NeedsTeXFormat{LaTeX2e} 19 | \RequirePackage{tikz,pgfopts} 20 | \ProvidesPackage{pgfornament}[2020/05/28 v1.2 vector ornaments] 21 | \gdef\pgfOrnamentsObject{pgflibraryvectorian.code.tex} 22 | \gdef\OrnamentsFamily{vectorian} 23 | \pgfkeys{% 24 | /pgfOrnaments/object/.cd, 25 | /pgfOrnaments/object/.code = \gdef\pgfOrnamentsObject{pgflibrary#1.code.tex} 26 | \gdef\OrnamentsFamily{#1}% 27 | } 28 | \ProcessPgfOptions{/pgfOrnaments} 29 | \input{\pgfOrnamentsObject}% 30 | %---------%---------%---------%---------%---------%---------%---------%-------- 31 | % tools 32 | %---------%---------%---------%---------%---------%---------%---------%-------- 33 | \makeatletter 34 | \newenvironment{newfamily}[1][vectorian]{% 35 | \global\let\SavedOrnamentsFamily\OrnamentsFamily 36 | \newpgfornamentfamily{#1} 37 | }{\newpgfornamentfamily{\SavedOrnamentsFamily}}% 38 | 39 | \def\pgf@@ornament#1{% 40 | \begingroup 41 | \def\ubb{\pgfusepath{use as bounding box}} 42 | \def\i{\pgfusepath{clip}}% 43 | \def\k{\pgfusepath{stroke}}% 44 | \let\o\pgfpathclose 45 | \let\s\pgfusepathqfillstroke 46 | \def\p ##1##2{\pgfqpoint{##1bp}{##2bp}}% 47 | \def\m ##1 ##2 {\pgfpathmoveto{\p{##1}{##2}}}% 48 | \def\l ##1 ##2 {\pgfpathlineto{\p{##1}{##2}}}% 49 | \def\r ##1 ##2 ##3 ##4 {\pgfpathrectangle{\p{##1}{##2}}{\p{##3}{##4}}}% 50 | \def\c ##1 ##2 ##3 ##4 ##5 ##6 {% 51 | \pgfpathcurveto{\p{##1}{##2}}{\p{##3}{##4}}{\p{##5}{##6}}}% 52 | \@@input \OrnamentsFamily#1.pgf% 53 | \endgroup}% 54 | 55 | \newcommand{\callornament}[1]{% 56 | \begingroup 57 | \def\ubb{\pgfusepath{use as bounding box}} 58 | \def\i{\pgfusepath{clip}}% 59 | \let\o\pgfpathclose 60 | \let\s\pgfusepathqfillstroke 61 | \def\p ##1##2{\pgfqpoint{##1bp}{##2bp}}% 62 | \def\m ##1 ##2 {\pgfpathmoveto{\p{##1}{##2}}}% 63 | \def\l ##1 ##2 {\pgfpathlineto{\p{##1}{##2}}}% 64 | \def\r ##1 ##2 ##3 ##4 {\pgfpathrectangle{\p{##1}{##2}}{% 65 | \p{##3}{##4}}}% 66 | \def\c ##1 ##2 ##3 ##4 ##5 ##6 {% 67 | \pgfpathcurveto{\p{##1}{##2}}{\p{##3}{##4}}{\p{##5}{##6}}}% 68 | \@@input #1\relax 69 | \endgroup} 70 | %---------%---------%---------%---------%---------%---------%---------%--------- 71 | % Les options de \pgfornament sont: 72 | % 73 | % scale : nombre (échelle, 1 par défaut) 74 | % width : nombre + unité (largeur, naturelle par défaut) 75 | % height : nombre + unité (hauteur, naturelle par défaut) 76 | % color : couleur ( par défaut couleur courante ) 77 | % symmetry=h : true/false (symétrie horizontale, false par défaut) 78 | % symmetry=v : true/false (symétrie verticale, false par défaut) 79 | % symmetry=c : true/false (symétrie centrale h+v,false par défaut) 80 | %---------%---------%---------%---------%---------%---------%---------%-------- 81 | \tikzset{pgfornamentstyle/.style={}}% 82 | \pgfkeys{% 83 | /ornament/.cd, 84 | scale/.code = {\def\pgfornamentscale{#1}}, 85 | width/.code = {\def\pgfornamentwidth{#1}}, 86 | height/.code = {\def\pgfornamentheight{#1}}, 87 | color/.code = {\def\pgfornamentcolor{#1}}, 88 | opacity/.code = {\def\pgfornamentopacity{#1}}, 89 | anchor/.code = {\def\pgfornamentanchor{#1}}, 90 | ydelta/.code = {\def\pgfornamentydelta{#1}}, 91 | symmetry/.is choice, 92 | symmetry/v/.code = {\tikzset{pgfornamentstyle/.append 93 | style={cm={-1,0,0,1,(0,0)}}}}, 94 | symmetry/c/.code = {\tikzset{pgfornamentstyle/.append 95 | style={cm={-1,0,0,-1,(0,0)}}}}, 96 | symmetry/h/.code = {\tikzset{pgfornamentstyle/.append 97 | style={cm={1,0,0,-1,(0,0)}}}}, 98 | symmetry/none/.code = {\tikzset{pgfornamentstyle/.append style={cm={1,0,0,1,(0,0)}}}}% 99 | }% 100 | %---------%---------%---------%---------%---------%---------%---------%--------- 101 | \def\pgfornament{\pgfutil@ifnextchar[{\pgf@ornament}{\pgf@ornament[]}}% 102 | \def\pgf@ornament[#1]#2{% 103 | \pgfkeys{% 104 | /ornament/.cd, 105 | scale = 1, 106 | opacity = {}, 107 | width = {}, 108 | height = {}, 109 | color = {}, 110 | ydelta = 0 pt, 111 | symmetry = none , 112 | anchor = center 113 | }% 114 | \pgfqkeys{/ornament}{#1}% 115 | \ifx\pgfornamentcolor\empty 116 | \tikzset{pgfornamentstyle/.append style={}}% 117 | \else 118 | \tikzset{pgfornamentstyle/.append style={color=\pgfornamentcolor}}% 119 | \fi 120 | \ifx\pgfornamentopacity\empty 121 | \tikzset{pgfornamentstyle/.append style={}}% 122 | \else 123 | \tikzset{pgfornamentstyle/.append style={opacity=\pgfornamentopacity}}% 124 | \fi 125 | \ifx\pgfornamentwidth\empty 126 | \else 127 | \@pgfornamentDim{#2}% bug correction LianTze 128 | \pgfmathsetmacro{\pgfornamentscale}{\pgfornamentwidth/\@pgfornamentX bp}% 129 | \fi 130 | \ifx\pgfornamentheight\empty 131 | \else 132 | \@pgfornamentDim{#2}% bug correction LianTze 133 | \pgfmathsetmacro{\pgfornamentscale}{\pgfornamentheight/\@pgfornamentY bp}% 134 | \fi 135 | \begin{tikzpicture}[% 136 | baseline={([yshift=\pgfornamentydelta]current bounding box.\pgfornamentanchor)}, 137 | pgfornamentstyle] 138 | \pgftransformscale{\pgfornamentscale}% 139 | \pgf@@ornament{#2}% 140 | \end{tikzpicture}% 141 | \tikzset{pgfornamentstyle/.style={cm={1,0,0,1,(0,0)}}} 142 | }% end pgfornament 143 | 144 | \gdef\ornamenttopos{.5} 145 | \gdef\ornamenttoanchor{center} 146 | \gdef\ornamenttosymmetry{none} 147 | \tikzset{options default/.style={anchor=center, 148 | sloped, 149 | allow upside down, 150 | inner sep=0pt}} 151 | \tikzset{ornament/at/.code={\def\ornamenttopos{#1}}, 152 | options/.style={options default,#1}, 153 | ornament symmetry/.code={\def\ornamenttosymmetry{#1}}, 154 | node anchor/.code={\def\ornamenttoanchor{#1}}, 155 | ornament/.style={% 156 | to path={% 157 | \pgfextra{% 158 | \tikz@scan@one@point\pgfutil@firstofone(\tikztostart)\relax 159 | \pgf@xa=\pgf@x 160 | \pgf@ya=\pgf@y 161 | \tikz@scan@one@point\pgfutil@firstofone(\tikztotarget)\relax 162 | \pgf@xb=\pgf@x 163 | \pgf@yb=\pgf@y 164 | \advance\pgf@xa by-\pgf@xb 165 | \advance\pgf@ya by-\pgf@yb 166 | \pgfmathveclen{\pgf@xa}{\pgf@ya}% 167 | \global\let\ornamentlen\pgfmathresult} 168 | -- node [pos=\ornamenttopos,options, 169 | anchor=\ornamenttoanchor]{% 170 | \pgfornament[width = \ornamentlen, 171 | symmetry=\ornamenttosymmetry]{#1}} 172 | (\tikztotarget)\tikztonodes %end pgfextra 173 | }% end to path 174 | }% end style 175 | }% end \tikzset 176 | 177 | \def\pgfornamenthline#1#2#3#4{% 178 | \pgfextractx{\pgf@x}{\pgfpointanchor{#1}{#3 east}} 179 | \pgf@xa=\pgf@x 180 | \pgfextractx{\pgf@x}{\pgfpointanchor{#2}{#3 west}} 181 | \pgf@xb=\pgf@x 182 | \advance\pgf@xb by -\pgf@xa 183 | \node[inner sep=0pt] at ($(#1.#3 east)!.5!(#2.#3 west)$) {\pgfornament[width=\pgf@xb]{#4}} ; 184 | } 185 | \def\pgfornamentvline#1#2#3#4{% 186 | \pgfextracty{\pgf@y}{\pgfpointanchor{#1}{south #3}} 187 | \pgf@ya=\pgf@y 188 | \pgfextracty{\pgf@y}{\pgfpointanchor{#2}{north #3}} 189 | \pgf@yb=\pgf@y 190 | \advance\pgf@yb by -\pgf@ya 191 | \node[inner sep=0pt,rotate=90] at ($(#1.south #3)!.5!(#2.north #3)$) {\pgfornament[width=\pgf@yb]{#4}} ; 192 | }% 193 | \def\getornamentlength#1#2#3#4{% 194 | \pgfpointdiff{\pgfpointanchor{#1}{#2}}% 195 | {\pgfpointanchor{#3}{#4}}% 196 | \pgf@xa=\pgf@x 197 | \pgf@ya=\pgf@y 198 | \pgfmathveclen{\pgf@xa}{\pgf@ya}% 199 | \global\let\ornamentlen\pgfmathresult 200 | }% 201 | \def\getornamentangle#1#2#3{% 202 | \pgfpointdiff{\pgfpointanchor{#2}{center}}{\pgfpointanchor{#3}{center}}% 203 | \pgfmathsetmacro{#1}{atan2(\pgf@x,\pgf@y)}% 204 | }% 205 | \makeatother 206 | \newcommand{\resetpgfornamentstyle}{\tikzset{pgfornamentstyle/.style={}}} 207 | 208 | % 2020 Changing vector objects 209 | \def\newpgfornamentfamily#1{% 210 | \edef\OrnamentsFamily{#1} 211 | \gdef\pgfOrnamentsObject{pgflibrary\OrnamentsFamily.code.tex} 212 | \input{\pgfOrnamentsObject}% 213 | }% 214 | 215 | \makeatletter 216 | \pgfkeys{/ornamentline/.cd, 217 | color/.store in = \ornamentcolor, 218 | color = black, 219 | /ornamentline/.search also={/tikz}} 220 | \def\pgfornamentline{\pgfutil@ifnextchar[{\pgf@ornamentline}{\pgf@ornamentline[]}}% 221 | \def\pgf@ornamentline[#1]#2#3#4#5{% 222 | 223 | \pgfqkeys{/ornamentline}{#1}% 224 | \pgfmathsetmacro\nbo{#4} 225 | \path (#2) -- (#3) foreach \i in {0,...,\nbo} {coordinate[pos=\i/\nbo] (p\i)} 226 | [color=\ornamentcolor] foreach \i [count=\j] in {0,...,\number\numexpr\nbo-1} { (p\i) to [ornament=#5] (p\j)}; 227 | } 228 | \makeatother 229 | \endinput 230 | -------------------------------------------------------------------------------- /doc-zh-cn/chap02/TKZdoc-fct-installation.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Installation de \tkzname{tkz-fct}} 4 | \section{安装\tkzname{tkz-fct}宏包} 5 | % Il est possible que lorsque vous lirez ce document, \tkzname{tkz-fct} soit présent sur le serveur du \tkzname{CTAN}\footnote{\tkzname{tkz-fct} ne fait pas encore partie de \tkzname{TeXLive} mais il sera bientôt possible de l'installer avec \emph{tlmgr}}. Si \tkzname{tkz-fct} ne fait pas encore partie de votre distribution, cette section vous montre comment l'installer, elle est aussi nécessaire, si vous avez envie d'installer une version plus récente ou personnalisée de \tkzname{tkz-fct}. \emph{Attention, la présence dans mon dossier texmf, des fichiers de \PGF, s'explique par l'utilisation occasionnelle de la version CVS de \PGF}. 6 | 目前,\tkzname{tkz-fct}宏包已被收录于\tkzname{CTAN}, 7 | 如果发行版中未收录\tkzname{tkz-fct}宏包,或需使用该宏包更新版本,或修改后的该宏包的自定义版本, 8 | 则需要按本节的说明安装\tkzname{tkz-fct}宏包。 9 | \emph{注意,由于偶尔会使用\PGF{}的CVS版本,此处的\enquote{TEXMF}目录树中包含了\PGF{}的文件。} 10 | 11 | % \subsection{Avec TeXLive sous OS X, Linux et Windows}\NameDist{TeXLive} 12 | \subsection{在OS X、Linux和Windows中基于TeXLive发行版使用\tkzname{tkz-fct}宏包}\NameDist{TeXLive} 13 | 14 | 在TeXLive的目录树中, 15 | 会创建一个\tikz[remember picture,baseline=(n1.base)]\node [fill=blue!30,draw] (n1) {tkz};文件夹, 16 | 其路径为:\textcolor{red!60}{ texmf/tex/latex/tkz}。 17 | 当然,并不强制使用\enquote{tkz}为文件夹命名,也可以使用其它名称。 18 | 19 | % \tikz[baseline=(t.base)]\node [fill=blue!30,draw] (t) {texmf}; est un dossier personnel, voici les chemins de ce dossier sur mes deux ordinateurs: 20 | \tikz[baseline=(t.base)]\node [fill=blue!30,draw] (t) {texmf};是一个文件夹, 21 | 不同系统其路径可能是不同的,并且也可以自定义其工作路径,例如: 22 | 23 | \medskip 24 | \begin{itemize}\setlength{\itemsep}{5pt} 25 | \item OS X系统: \colorbox{blue!30}{\textbf{/Users/ego/Library/texmf}}; 26 | \item Ubuntu系统: \colorbox{blue!30}{\textbf{/home/ego/texmf}}. 27 | \end{itemize} 28 | 29 | \medskip 30 | \begin{enumerate} 31 | \item 32 | 33 | % Placez le fichier \tikz[remember picture,baseline=(n2.base)]\node [fill=blue!20,draw] (n2) {tkz-fct.sty}; 34 | % dans le dossier \tikz[baseline=(p.base)]\node [fill=blue!20,draw] (p) {tkz};. 35 | 将\tikz[remember picture,baseline=(n2.base)]\node [fill=blue!20,draw] (n2) {tkz-fct.sty}; 36 | 复制到\tikz[baseline=(p.base)]\node [fill=blue!20,draw] (p) {tkz};中。 37 | 38 | 39 | 40 | \medskip 41 | \begin{tikzpicture} [remember picture,rotate=90] 42 | 43 | \node (texmf) at (4,2) [draw,fill=blue!30 ] {texmf}; 44 | 45 | \node (tex) at (6,0) [draw ] {tex}; 46 | \node (doc) at (2,0) [draw ] {doc}; 47 | 48 | \node (texgen) at (7,-2) [draw ] {generic}; 49 | \node (docgen) at (0,-2) [draw ] {generic}; 50 | 51 | \node (latex) at (4,-2) [draw ] {latex}; 52 | 53 | \node (genpgf) at (7,-4) [draw] {pgf}; 54 | \node (latpgf) at (5,-4) [draw] {pgf}; 55 | \node (tkz) at (4,-4) [draw,fill=blue!20 ] {tkz}; 56 | 57 | \node (docpgf) at (0,-4) [draw] {pgf}; 58 | 59 | \node (fct) at (6,-6) [draw,fill=orange!20] {tkz-fct.sty}; 60 | \node (tkb) at (4,-6) [draw,fill=blue!20] {tkzbase}; 61 | \node (tke) at (2,-6) [draw,fill=blue!20] {tkzeuclide}; 62 | 63 | \node (tari) at (9,-11) [draw,fill=green!20] {tkz-tools-arith.tex}; 64 | \node (tuti) at (8,-11) [draw,fill=green!20] {tkz-tools-utilities.tex}; 65 | \node (tmisc) at (7,-11) [draw,fill=green!20] {tkz-tools-misc.tex}; 66 | \node (tmath) at (6,-11) [draw,fill=green!20] {tkz-tools-math.tex}; 67 | \node (tbas) at (5,-11) [draw,fill=green!20] {tkz-tools-base.tex}; 68 | \node (base) at (4,-11) [draw,fill=green!20] {tkz-base.sty}; 69 | \node (cfg) at (3,-11) [draw,fill=red!20] {tkz-base.cfg}; 70 | \node (mark) at (2,-11) [draw,fill=red!20] {tkz-obj-marks.tex}; 71 | \node (pts) at (1,-11) [draw,fill=red!20] {tkz-obj-points.tex}; 72 | \node (seg) at (0,-11) [draw,fill=red!20] {tkz-obj-segments.tex}; 73 | 74 | 75 | 76 | \draw[-open triangle 90](texmf.north east) --(tex.south west) ; 77 | \draw[-open triangle 90](texmf.south east) -- (doc.north west) ; 78 | 79 | \draw[-open triangle 90](tex.north east) --(texgen.south west) ; 80 | \draw[-open triangle 90](tex.south east) -- (latex.north west) ; 81 | \draw[-open triangle 90](texgen.east) -- (genpgf.west) ; 82 | 83 | \draw[-open triangle 90](doc.south east) -- (docgen.north west) ; 84 | \draw[-open triangle 90](docgen.east) -- (docpgf.west) ; 85 | 86 | \draw[-open triangle 90](latex.north east) -- (latpgf.south west) ; 87 | \draw[-open triangle 90](latex.east) -- (tkz.west) ; 88 | 89 | \draw[-open triangle 90,blue!40](tkz.east) to[out=-90,in=90](fct.west) ; 90 | \draw[-open triangle 90,blue!40](tkz.east) to[out=-90,in=90](tkb.west) ; 91 | \draw[-open triangle 90,blue!40](tkz.east) to[out=-90,in=90](tke.west) ; 92 | 93 | \draw[-open triangle 90,blue!40](tkb.east) to[out=-90,in=90](tari.west) ; 94 | \draw[-open triangle 90,blue!40](tkb.east) to[out=-90,in=90](tuti.west) ; 95 | \draw[-open triangle 90,blue!40](tkb.east) to[out=-90,in=90](tmisc.west) ; 96 | \draw[-open triangle 90,blue!40](tkb.east) to[out=-90,in=90](tmath.west) ; 97 | \draw[-open triangle 90,blue!40](tkb.east) to[out=-90,in=90](tbas.west) ; 98 | \draw[-open triangle 90,blue!40](tkb.east) to[out=-90,in=90](base.west) ; 99 | \draw[-open triangle 90,blue!40](tkb.east) to[out=-90,in=90](cfg.west) ; 100 | \draw[-open triangle 90,blue!40](tkb.east) to[out=-90,in=90](mark.west) ; 101 | \draw[-open triangle 90,blue!40](tkb.east) to[out=-90,in=90](pts.west) ; 102 | \draw[-open triangle 90,blue!40](tkb.east) to[out=-90,in=90](seg.west) ; 103 | 104 | \end{tikzpicture} 105 | 106 | \begin{tikzpicture}[remember picture,overlay] 107 | \path[->,thin,red!50,>=latex] (n1) edge [bend left] (tkz); 108 | \path[->,thin,red!50,>=latex] (n2) edge [bend left] (fct); 109 | \end{tikzpicture} 110 | 111 | \vfill 112 | \newpage 113 | % \item Ouvrir un terminal, puis faire \tkzname{sudo texhash} si nécessaire. 114 | \item 打开终端,根据需要执行\tkzname{sudo texhash}命令。 115 | % \item Vérifier que \tkzname{Ti\emph{k}Z 2.10}\index{TikZ@Ti\emph{k}Z} est installé car c'est la version minimum pour le bon fonctionnement de \tkzname{tkz-fct}. \tkzname{tkz-base} doit aussi être installé, de même le binaire « gnuplot» doit être installé sur votre ordinateur. \tkzname{fp.sty} est intensément utilisé mais il est présent dans toutes les distributions. 116 | \item 检查\tkzname{Ti\emph{k}Z 2.10}\index{TikZ@Ti\emph{k}Z}是否安装, 117 | 这是确保\tkzname{tkz-fct}宏包正确运行的最低\TIKZ{}版本。 118 | 同时,也必须先安装\tkzname{tkz-base}宏包。 119 | 一般来讲,由于比较常用,几乎所在\LaTeX{}发行版中都包含了\tkzname{fp.sty}宏包, 120 | 若没有该宏包,则需要手动安装。 121 | \end{enumerate} 122 | 123 | 124 | % \subsection{Avec MikTeX sous Windows XP}\NameDist{MikTeX}\NameSys{Windows XP} 125 | \subsection{在Windows中基于MikTeX使用\tkzname{tkz-fct}}\NameDist{MikTeX}\NameSys{Windows} 126 | 127 | % Je ne connais pas grand-chose à ce système mais un utilisateur de mes packages \textbf{Wolfgang Buechel} a eu la gentillesse de me faire parvenir ce qui suit~: 128 | 由于对Windows系统不熟悉,以下说明中由宏包用户\textbf{Wolfgang Buechel}提供: 129 | 130 | % Pour ajouter \tkzname{tkz-fct.sty} à MiKTeX\footnote{Essai réalisé avec la version \tkzname{2.7}}: 131 | 将\tkzname{tkz-fct.sty}宏包安装到MiKTeX\footnote{基于\tkzname{2.7}版本进行测试。}: 132 | 133 | \begin{itemize}\setlength{\itemsep}{10pt} 134 | % \item ajouter un dossier \tkzname{tkz} dans le dossier 135 | % \textcolor{red}{\texttt{[MiKTeX-dir]/tex/latex}} 136 | \item 在\textcolor{red}{\texttt{[MiKTeX-dir]/tex/latex}}中添加\tkzname{tkz}文件夹 137 | % \item copier \tkzname{tkz-fct.sty} et tous les packages nécessaires à son fonctionnement dans le dossier \tkzname{tkz}, 138 | \item 将\tkzname{tkz-fct.sty}及其所需要的文件复制到\tkzname{tkz}文件夹 139 | % \item mettre à jour MiKTeX, pour cela dans shell DOS lancer la commande \textbf{\textcolor{red}{|mktexlsr -u|}} 140 | \item 在命令行中执行\textbf{\textcolor{red}{|mktexlsr -u|}}命令升级MikTeX 141 | 142 | % ou bien encore, choisir \textcolor{red}{|Start/Programs/Miktex/Settings/General|} 143 | 或在\textcolor{red}{|Start/Programs/Miktex/Settings/General|}中 144 | 145 | % puis appuyer sur le bouton \textbf{\textcolor{red}{|Refresh FNDB|}}. 146 | 单击\textbf{\textcolor{red}{|Refresh FNDB|}}按钮进行更新。 147 | \end{itemize} 148 | 149 | \subsection{安装小结} 150 | 151 | % Pour résumer, \tkzname{Ti\emph{k}Z 2.10} est nécessaire, ensuite soit \tkzname{tkz-fct} est dans votre distribution et le seul problème est l'installation de \tkzname{gnuplot}; soit il n'est pas dans votre distribution et dans ce cas, il suffit de créer un dossier qui le contiendra ainsi que \tkzname{tkz-base} et les fichiers qui l'accompagnent. 152 | 需要\tkzname{Ti\emph{k}Z 2.10}的支持,安装\tkzname{tkz-fct}宏包, 153 | 可能的一个问题是需要安装\tkzname{gnuplot}。 154 | 如果发行版中不存在\tkzname{tkz-fct}宏包,则需要在TeXLive目录树中创建一个文件夹, 155 | 并将\tkzname{tkz-base}及其需要的文件复制到该文件夹中完成安装。 156 | 157 | % Au moment où j'écris ces lignes les fichiers nécessaires pour utiliser \tkzname{tkz-fct} sont~: 158 | \tkzname{tkz-fct}宏包需要的文件有: 159 | 160 | \vspace*{8pt} 161 | \begin{itemize} 162 | 163 | \item \tkzname{tkz-fct.sty}文件 164 | 165 | \vspace*{20pt} 166 | \item \tkzname{tkz-base}所需要的文件有: 167 | 168 | \vspace*{8pt} 169 | \begin{itemize} 170 | \item \tkzname{tkz-base.sty} 主文件 171 | \item \tkzname{tkz-base.cfg} 配置文件 172 | \item \tkzname{tkz-tools-base.tex} 173 | \item \tkzname{tkz-tools-arith.tex} 174 | \item \tkzname{tkz-tools-misc.tex} 175 | \item \tkzname{tkz-tools-utilities.tex} 176 | \item \tkzname{tkz-obj-points.tex} 177 | \item \tkzname{tkz-obj-segments.tex} 178 | \item \tkzname{tkz-obj-marks.tex} 179 | \end{itemize} 180 | 181 | \vspace*{20pt} 182 | \item \tkzname{tkz-euclide} 需要的文件有: 183 | 184 | \vspace*{8pt} 185 | \begin{itemize} 186 | \item \tkzname{tkz-euclide.sty} 主文件 187 | \item \tkzname{tkz-tools-intersections.tex} 188 | \item \tkzname{tkz-tools-math.tex} 189 | \item \tkzname{tkz-tools-transformations.tex} 190 | \item \tkzname{tkz-lib-symbols.tex} 添加的新符号 191 | \item \tkzname{tkz-obj-lines.tex} 192 | \item \tkzname{tkz-obj-addpoints.tex} 补充的点的定义 193 | \item \tkzname{tkz-obj-circles.tex} 194 | \item \tkzname{tkz-obj-arcs.tex} 195 | \item \tkzname{tkz-obj-angles.tex} 196 | \item \tkzname{tkz-obj-polygons.tex} 197 | \item \tkzname{tkz-obj-sectors.tex} 198 | \item \tkzname{tkz-obj-protractor.tex} 199 | \end{itemize} 200 | 201 | \end{itemize} 202 | 203 | \end{document} 204 | \endinput 205 | 206 | -------------------------------------------------------------------------------- /doc-zh-cn/main.tex: -------------------------------------------------------------------------------- 1 | % Copyright (C) 2020 Alain Matthes 2 | % This work may be distributed and/or modified under the 3 | % conditions of the LaTeX Project Public License, either version 1.3 4 | % of this license or (at your option) any later version. 5 | % The latest version of this license is in 6 | % http://www.latex-project.org/lppl.txt 7 | % and version 1.3 or later is part of all distributions of LaTeX 8 | % version 2005/12/01 or later. 9 | % This work has the LPPL maintenance status `maintained'. 10 | % The Current Maintainer of this work is Alain Matthes 11 | 12 | % ``TKZdoc-fct-main '' is the french documentation of tkz-fct. 13 | 14 | \documentclass[DIV = 14, 15 | fontsize = 10, 16 | headinclude = false, 17 | index = totoc, 18 | footinclude = false, 19 | twoside, 20 | headings = small 21 | ]{tkz-doc-zh} 22 | \usepackage{etoc} 23 | \gdef\tkznameofpack{tkz-fct} 24 | \gdef\tkzversionofpack{1.4c} 25 | \gdef\tkzdateofpack{2020/05/05} 26 | \gdef\tkznameofdoc{doc-tkz-fct} 27 | \gdef\tkzdateofdoc{2020/05/05} 28 | \gdef\tkzversionofdoc{1.4c} 29 | \gdef\tkzauthorofpack{Alain Matthes} 30 | \gdef\tkzauthoroftran{耿楠} 31 | \gdef\tkzadressoftran{陕西$\cdot$杨凌} 32 | \gdef\tkzadressofauthor{} 33 | \gdef\tkznamecollection{AlterMundus} 34 | \gdef\tkzurlauthor{http://altermundus.fr} 35 | \gdef\tkzurlauthorcom{http://altermundus.fr} 36 | \gdef\tkzengine{xelatex} 37 | \def\nogreekalph{} 38 | \usepackage{tkz-tab,tkz-fct} 39 | \usepackage[english]{alterqcm} 40 | \usepackage{tkz-euclide} 41 | \usetikzlibrary{shapes.geometric} 42 | \usepackage[colorlinks]{hyperref} 43 | \hypersetup{ 44 | linkcolor=Gray, 45 | citecolor=Green, 46 | filecolor=Mulberry, 47 | urlcolor=NavyBlue, 48 | menucolor=Gray, 49 | runcolor=Mulberry, 50 | linkbordercolor=Gray, 51 | citebordercolor=Green, 52 | filebordercolor=Mulberry, 53 | urlbordercolor=NavyBlue, 54 | menubordercolor=Gray, 55 | runbordercolor=Mulberry, 56 | pdfsubject={Graph function with gnuplot}, 57 | pdfauthor={\tkzauthorofpack}, 58 | pdftitle={\tkznameofpack}, 59 | pdfkeywords={tikz, pgf, pdf, pdflatex, graphic, euclide,lualatex, 60 | points, maths, graph, gnuplot, angle ,function}, 61 | pdfcreator={\tkzengine} 62 | } 63 | \usepackage{url} 64 | \def\UrlFont{\small\ttfamily} 65 | % 66 | % \usepackage{fontspec} 67 | % \setmainfont{texgyrepagella}[ 68 | % Extension = .otf, 69 | % UprightFont = *-regular , 70 | % ItalicFont = *-italic , 71 | % BoldFont = *-bold , 72 | % BoldItalicFont = *-bolditalic , 73 | % ] 74 | % \setsansfont{texgyreheros}[ 75 | % Extension = .otf, 76 | % UprightFont = *-regular , 77 | % ItalicFont = *-italic , 78 | % BoldFont = *-bold , 79 | % BoldItalicFont = *-bolditalic , 80 | % ] 81 | % \setmonofont{lmmono10-regular.otf}[ 82 | % Numbers={Lining,SlashedZero}, 83 | % ItalicFont=lmmonoslant10-regular.otf, 84 | % BoldFont=lmmonolt10-bold.otf, 85 | % BoldItalicFont=lmmonolt10-boldoblique.otf, 86 | % ] 87 | % \newfontfamily\ttcondensed{lmmonoltcond10-regular.otf} 88 | %% (La)TeX font-related declarations: 89 | \linespread{1.05} % Pagella needs more space between lines 90 | \usepackage{unicode-math} 91 | \usepackage{fourier-otf} 92 | \usepackage{tkzexample} 93 | \usepackage{rotating,fancyvrb} 94 | % \usepackage[english]{babel} 95 | % \usepackage[autolanguage]{numprint} 96 | 97 | \usepackage{microtype} 98 | % \DisableLigatures{encoding = T1, 99 | % family = tt*} 100 | \usepackage[parfill]{parskip} 101 | \usepackage{array,multirow,multido,booktabs} 102 | \usepackage{shortvrb,fancyvrb} 103 | \usepackage{ipa} 104 | \usepackage{csquotes} 105 | \usepackage{pgfornament} 106 | \makeatletter 107 | \renewcommand*\l@subsubsection{\bprot@dottedtocline{3}{3.8em}{4em}} 108 | \makeatother 109 | \AtBeginDocument{\MakeShortVerb{\|}} 110 | 111 | \RequirePackage{makeidx} 112 | %\@twocolumnfalse 113 | \makeindex 114 | \newcommand*{\E}{\ensuremath{\mathrm{e}}} 115 | \colorlet{graphicbackground}{white} 116 | \colorlet{codebackground}{Gray!10} 117 | % \usepackage[saved]{tkzexample} 118 | % \def\tkzFileSavedPrefix{tkzFct} 119 | \def\blue{\color{blue}} 120 | \def\red{\color{red}} 121 | 122 | % 分文档翻译,方便定位错误,加快编译速度 123 | %必须是document环境的前最后一行代码 124 | \usepackage{subfiles} 125 | 126 | \begin{document} 127 | 128 | %<--------------------- Première page présentation ------------------------–> 129 | \title{\tkznameofpack} 130 | \date{\today} 131 | \clearpage 132 | \thispagestyle{empty} 133 | \maketitle 134 | \null 135 | \makeatletter 136 | \typeout{Load pgfornament font} 137 | \AddToShipoutPicture*{% 138 | \setlength\unitlength{1mm} 139 | \put(70,120){% 140 | \begin{tikzpicture} 141 | \coordinate (A) at (0pt,240pt); 142 | \coordinate (B) at (300pt,240pt); 143 | \coordinate (C) at (300pt,0pt); 144 | \coordinate (D) at (0pt,0pt); 145 | \begin{scope}[opacity=0.5] % for opacity 146 | \pgfornamentline[color=MidnightBlue]{[xshift=1.65cm,yshift=-1mm]A}{[xshift=-1.58cm,,yshift=-1mm]B}{1}{88}; % AB 147 | \pgfornamentline[color=MidnightBlue]{[xshift=1.65cm,yshift=1.5mm]D}{[xshift=-1.58cm,yshift=1.5mm]C}{1}{88}; 148 | \pgfornamentline[color=MidnightBlue]{[xshift=2.2mm,yshift=-1.59cm]A}{[xshift=2.2mm,yshift=1.59cm]D}{1}{88}; 149 | \pgfornamentline[color=MidnightBlue]{[xshift=-1.2mm,yshift=-1.59cm]B}{[xshift=-1.2mm,yshift=1.59cm]C}{1}{88}; 150 | \end{scope} 151 | \node[anchor=north west] at (A) {\pgfornament[color=MidnightBlue,opacity=0.5,width=1.5cm]{61}}; % A 152 | \node[anchor=north east] at (B) {\pgfornament[color=MidnightBlue,opacity=0.5,width=1.5cm,symmetry=v]{61}};% B 153 | \node[anchor=south east] at (C) {\pgfornament[color=MidnightBlue,opacity=0.5,width=1.5cm,symmetry=c]{61}}; % C 154 | \node[anchor=south west] at (D) {\pgfornament[color=MidnightBlue,opacity=0.5,width=1.5cm,symmetry=h]{61}}; % D 155 | \node[text width=280pt] at (150 pt,120 pt){% 156 | \begin{center} 157 | \color{MidnightBlue} 158 | \fontsize{24}{48} 159 | \selectfont tkz-fct宏包\par 160 | 基于\tkzname{gnuplot}和\TIKZ{}的\par 161 | 二维函数曲线绘图宏包 162 | \end{center}}; 163 | \end{tikzpicture}}} 164 | \makeatother 165 | \clearpage 166 | \tkzSetUpColors[background=white,text=darkgray] 167 | 168 | \nameoffile{\tkznameofpack} 169 | 170 | \defoffile{ 171 | % \textbf{tkz-fct.sty (v1.4c)} est un package pour créer à l'aide de \TIKZ, des représentations graphiques de fonctions en 2D le plus simplement possible. Il est dépendant de \TIKZ\ et fera partie d'une série de modules ayant comme point commun, La création de dessins utiles dans l’enseignement des mathématiques. Ce sont des représentations du type scolaire qui correspondent à l’enseignement proposé dans les lycées français. 172 | \textbf{tkz-fct.sty(v1.4c)}是一个基于\tkzname{gnuplot}和\TIKZ{}设计的用于绘制二维函数曲线的宏包, 173 | 它语法简单、使用方便,是\textbf{tkz-}系列宏包的一个模块,主要用于绘制数学教学中的各类函数曲线, 174 | 这些函数曲线符合法国高中教学的需求。 175 | } 176 | 177 | \presentation 178 | 179 | \vspace*{24pt} 180 | % \noindent\lefthand\ Je souhaite remercier \tkzimp{Till Tantau} pour avoir créé le merveilleux outil \tkzname{\TIKZ}, ainsi que \tkzimp{Michel Bovani} pour \tkzname{fourier}, dont l'association avec \tkzname{utopia} est excellente. 181 | 182 | \noindent\lefthand\ 在此,要感谢\tkzimp{Till Tantau}开发了精彩的\tkzname{\TIKZ}宏包, 183 | 也要感谢\tkzimp{Michel Bovani}开发的\tkzname{fourier}宏包, 184 | 这些宏包都能与\tkzname{utopia}宏包很好的协同工作。 185 | 186 | 187 | \vspace*{12pt} 188 | % \noindent\lefthand\ Je souhaite remercier aussi \tkzimp{David Arnold} qui a corrigé un grand nombre d'erreurs et qui a testé de nombreux exemples, \tkzimp{Pablo González Luengo } pour son aide sur la documentation et la gestion du dépôt "GitHub", \tkzimp{Wolfgang Büchel} qui a corrigé également des erreurs et a construit de superbes scripts pour obtenir les fichiers d'exemples, \tkzimp{John Kitzmiller} et ses exemples, et enfin \tkzimp{Gaétan Marris} pour ses remarques. 189 | 190 | \noindent\lefthand\ 感谢\tkzimp{David Arnold},他纠正了宏包中许多错误,并对多数示例进行了测试; 191 | 感谢\tkzimp{Pablo González Luengo},他在Github仓库的文档管理方面提供全力的帮助; 192 | 感谢\tkzimp{Wolfgang Büchel},他也纠正了许多错误,并编写优秀的脚本管理示例文件; 193 | 感谢\tkzimp{John Kitzmiller},他设计并测试了更多的示例; 194 | 最后要感谢\tkzimp{Gaetan Marris},他的评论为宏包的改进提供了很好的思路。 195 | 196 | % \vspace*{12pt} 197 | % \noindent\lefthand\ Vous trouverez bientôt de nombreux exemples sur mon site~: 198 | % \href{http://altermundus.fr}{altermundus.fr} 199 | 200 | \vfill 201 | % Vous pouvez envoyer vos remarques, et les rapports sur des erreurs que vous aurez constatées à l'adresse suivante~: \href{mailto:al.ma@mac.com}{\textcolor{blue}{Alain Matthes}}. 202 | \noindent\lefthand\ 如果发现该文档的错误或有其他任何意见和建议,请发信至:\href{mailto:al.ma@mac.com}{\textcolor{blue}{Alain Matthes}}. 203 | 204 | \noindent\lefthand\ 如果发现译文的错误或其有他任何意见和建议,请发信至:\href{mailto:nangeng@nwafu.edu.cn}{\textcolor{blue}{耿楠}}. 205 | 206 | % This work may be distributed and/or modified under the 207 | % conditions of the LaTeX Project Public License, either version 1.3 208 | % of this license or (at your option) any later version. 209 | 可以在\href{http://www.ctan.org/}{CTAN}发布的``LATEX Project Public 210 | License''协议下发布和修改该文档。 211 | % <---------------------------------------------------------------------------> 212 | 213 | \clearpage 214 | \tableofcontents 215 | 216 | \clearpage 217 | \newpage 218 | 219 | \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} 220 | %<---------------------------- the files ------------------------------------> 221 | \subfileinclude{chap00/TKZdoc-fct-why} 222 | \subfileinclude{chap01/TKZdoc-fct-compilation} 223 | \subfileinclude{chap02/TKZdoc-fct-installation} 224 | \subfileinclude{chap03/TKZdoc-fct-fonctions} 225 | \subfileinclude{chap04/TKZdoc-fct-point} 226 | \subfileinclude{chap05/TKZdoc-fct-label} 227 | \subfileinclude{chap06/TKZdoc-fct-tangent} 228 | \subfileinclude{chap07/TKZdoc-fct-area} 229 | \subfileinclude{chap08/TKZdoc-fct-riemann} 230 | \subfileinclude{chap09/TKZdoc-fct-asymptote} 231 | \subfileinclude{chap10/TKZdoc-fct-param} 232 | \subfileinclude{chap11/TKZdoc-fct-polar} 233 | \subfileinclude{chap12/TKZdoc-fct-symbol} 234 | \subfileinclude{chap13/TKZdoc-fct-example} 235 | \subfileinclude{chap14/TKZdoc-fct-interpolation} 236 | \subfileinclude{chap15/TKZdoc-fct-VDW} 237 | \subfileinclude{chap16/TKZdoc-fct-bac} 238 | \subfileinclude{chap17/TKZdoc-fct-fppgf} 239 | \subfileinclude{chap18/TKZdoc-fct-faq} 240 | \subfileinclude{chap19/TKZdoc-fct-liste} 241 | %<---------------------------------------------------------------------------> 242 | \clearpage\newpage 243 | \printindex 244 | \end{document} 245 | -------------------------------------------------------------------------------- /doc-zh-cn/chap06/TKZdoc-fct-tangent.tex: -------------------------------------------------------------------------------- 1 | \documentclass[../main.tex]{subfiles} 2 | \begin{document} 3 | % \section{Macros pour tracer des tangentes } 4 | \section{绘制切线} 5 | 6 | % Si une seule fonction est utilisée, elle est stockée avec comme nom 7 | % \tkzcname{tkzFcta}, si une deuxième fonction est utilisée, elle sera stockée avec comme nom \tkzcname{tkzFctb}, et ainsi de suite\ldots Si plusieurs fonctions sont présentent dans un même environnement alors l'option \tkzname{with} permet de choisir celle qui sera mise à contribution. 8 | 需要说明的是,在使用\tkzcname{tkzFct}命令定义函数后, 9 | 对第1个函数命名为\tkzcname{tkzFcta},第2个函数命名为\tkzcname{tkzFctb},以此类推\ldots。 10 | 如果一个环境中有多个函数,则可以使用\tkzname{with}指定需要使用的函数。 11 | 12 | \tkzHandBomb 在使用\tkzcname{tkzFct}命令和\tkzcname{tkzDrawTangentLine}命令之前, 13 | 需要使用\tkzcname{tkzInit}命令初始化绘图环境。 14 | 可以用\tkzname{kl}和\tkzname{kr}系数指定半切线矢量长度, 15 | 如$kl=0$或$kr=0$表示取消对应的半切线(l=left,r=right)。 16 | 如果\tkzname{xstep=1}和\tkzname{ystep=1},斜率为1,则半切线的长度是$\sqrt{2}$。 17 | 其他情况下,如果半切线向量$\vec{AT}$的斜率是$p$,则半切线向量是(\tkzname{kl},\tkzname{kl*p})。 18 | 19 | 20 | % \subsection{Représentation d'une tangente \tkzcname{tkzDrawTangentLine}} 21 | \subsection{\tkzcname{tkzDrawTangentLine}命令:绘制切线} 22 | \hypertarget{tdtl}{} 23 | % \begin{NewMacroBox}{tkzDrawTangentLine}{\oarg{命令选项}\parg{a}} 24 | % \emph{On l'emploie soit juste après l'utilisation de \tkzcname{tkzFct}, sinon il faut donner la référence de la fonction à l'aide de l'option \tkzname{with}.} 25 | % 26 | % \medskip 27 | % \begin{tabular}{lll} 28 | % \toprule 29 | % options & exemple & explication \\ 30 | % \midrule 31 | % \TAline{a}{\tkzcname{tkzDrawTangentLine(0)}}{tangente au point d'abscisse $0$} 32 | % \bottomrule 33 | % \end{tabular} 34 | % 35 | % Les options sont celles de \TIKZ comme \tkzname{color} ou \tkzname{style} plus les options suivantes 36 | % 37 | % \begin{tabular}{lll} 38 | % \toprule 39 | % options & défaut & définition \\ 40 | % \midrule 41 | % \TOline{draw}{false}{booléen si true alors le point de contact est tracé} 42 | % \TOline{with}{a}{permet de choisir une fonction} 43 | % \TOline{kr}{1}{coefficient pour la longueur de la demi-tangente à droite} 44 | % \TOline{kl} {1}{coefficient pour la longueur de la demi-tangente à gauche} 45 | % \end{tabular} 46 | % \end{NewMacroBox} 47 | %<---------------------------------------------------------------------------> 48 | \begin{NewMacroBox}{tkzDrawTangentLine}{\oarg{命令选项}\parg{切点横坐标}} 49 | \emph{ 50 | 如果直接在\tkzcname{tkzFct}命令后使用该命令,表示使用当前函数。 51 | 否则,需要用\tkzname{with}选项指定函数。} 52 | 53 | \medskip 54 | \begin{tabular}{lll} 55 | \toprule 56 | 参数 & 样例 & 说明 \\ 57 | \midrule 58 | \TAline{切点横坐标}{\tkzcname{tkzDrawTangentLine(0)}}{横坐标为$0$的函数点处的切线} 59 | \bottomrule 60 | \end{tabular} 61 | 62 | 可以使用所有类似\tkzname{color}或\tkzname{style}的有效\TIKZ 选项。 63 | 64 | \begin{tabular}{lll} 65 | \toprule 66 | 选项 & 默认值 & 含义 \\ 67 | \midrule 68 | \TOline{draw}{false}{布尔值,如为true,则绘制切点} 69 | \TOline{with}{a}{选择指定的函数} 70 | \TOline{kr}{1}{右半切线长度系数} 71 | \TOline{kl} {1}{左半切线长度系数} 72 | \end{tabular} 73 | \end{NewMacroBox} 74 | % \subsection{Tangente avec \tkzname{xstep} et \tkzname{ystep} différents de 1} 75 | \subsection{\tkzname{xstep}和\tkzname{ystep}不为1的切线} 76 | 77 | \begin{tikzpicture}[xscale=1.5] 78 | \tikzset{tan style/.style={-}} 79 | \tkzInit[xmin=0,xmax=800,xstep=100,ymin=0,ymax=1800,ystep=400] 80 | \tkzGrid[color=brown,sub,subxstep=50,subystep=200](0,0)(800,1800) 81 | \tkzAxeXY 82 | \tkzFct[color=red,samples=100,domain = 0:800]% 83 | {(1./90000)*\x*\x*\x-(1./100)*\x*\x+(113./36)*\x} 84 | \tkzDrawTangentLine[draw,color=blue,kr=300,kl=450](450) 85 | \tkzText[draw,color = black,fill = brown!50,opacity = 0.8](300,1200)% 86 | {$f(x)=\dfrac{1}{90000}x^3 -\dfrac{1}{{100}}x^2 +\dfrac{113}{36}x$} 87 | \end{tikzpicture} 88 | 89 | % Il faut remarquer qu'il n'est point nécessaire de faire des calculs. Il suffit d'utiliser les valeurs qui correspondent aux graduations. 90 | 要说明的是,没有必要计算坐标真实值,只需要直接指定与刻度对应的坐标值即可。 91 | 92 | % On peut changer le styavec le des tangentes avec, par exemple, 93 | 例如,可以使用如下类似代码修改切线样式: 94 | 95 | \tkzcname{tikzset\{tan style/.style=\{-\}\}} 的默认设置为: 96 | 97 | \tkzcname{tikzset\{tan style/.style=\{->,>=latex\}\}} 98 | 99 | \begin{tkzexample}[code only] 100 | \begin{tikzpicture}[xscale=1.5] 101 | \tikzset{tan style/.style={-}} 102 | \tkzInit[xmin=0,xmax=800,xstep=100, 103 | ymin=0,ymax=1800,ystep=400] 104 | \tkzGrid[color=brown,sub,subxstep=50,subystep=200](0,0)(800,1800) 105 | \tkzAxeXY 106 | \tkzFct[color=red,samples=100,domain = 0:800]% 107 | {(1./90000)*\x*\x*\x-(1./100)*\x*\x+(113./36)*\x} 108 | \tkzDrawTangentLine[color=blue,kr=300,kl=450,coord](450) 109 | \tkzText[draw, color = black,% 110 | fill = brown!50, opacity = 0.8](300,1200)% 111 | {$f(x)=\dfrac{1}{90000}x^3 -\dfrac{1}{{100}}x^2 +\dfrac{113}{36}x$} 112 | \end{tikzpicture} 113 | \end{tkzexample} 114 | %<---------------------------------------------------------------------------> 115 | % \subsection{Les options \tkzname{kl}, \tkzname{kr} et l'option \tkzname{draw}} 116 | \subsection{\tkzname{kl}、\tkzname{kr}和\tkzname{draw}选项} 117 | % Si l'un des deux nombres \tkzname{kl} ou \tkzname{kr} est nul alors seulement une demi-tangente est tracée sinon ces nombres représentent un pourcentage de la longueur initiale de la tangente. L'option \tkzname{draw} permet de tracer le point de contact. 118 | 如果\tkzname{kl}或\tkzname{kr}为0,则只绘制半切线,否则,可以用数字表示切线长度与切向量长度的百分比。 119 | \tkzname{draw}选项表示需要绘制切点。 120 | 121 | \begin{tkzexample}[] 122 | \begin{tikzpicture}[scale=1.5] 123 | \tkzInit[xmin=-3,xmax=4,ymin=-4,ymax=2] 124 | \tkzGrid \tkzDrawXY \tkzClip 125 | \tkzFct[domain = -2.15:3.2]{(-x*x)+2*x} 126 | \tkzDefPointByFct[draw](2) 127 | \tkzDrawTangentLine[kl=0,draw](-1) 128 | \tkzDrawTangentLine[draw](1) 129 | \tkzDrawTangentLine[kr=0,draw](3) 130 | \tkzRep 131 | \end{tikzpicture} 132 | \end{tkzexample} 133 | 134 | %<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> 135 | % \subsection{Tangente et l'option \tkzname{with}} 136 | \subsection{\tkzname{with}选项} 137 | % Soit on place la macro \tkzcname{tkzDrawTangentLine} après la ligne 138 | % qui définit la première fonction $(a)$, soit on trace une autre fonction avant, et dans ce cas, il est nécessaire de préciser quelle fonction sera utilisée. pour se faire, on utilise l'option \tkzname{with}. 139 | 可以将\tkzcname{tkzDrawTangentLine}放在第一个函数定义代码行之后,表示使用该函数, 140 | 当然,也可以使用\tkzname{with}选项指定需要绘制切线的函数。 141 | 142 | \begin{tkzexample}[] 143 | \begin{tikzpicture}[scale=4] 144 | \tkzInit[xmax=3,ymax=2] 145 | \tkzAxeXY 146 | \tkzGrid(0,0)(3,2) 147 | \tkzFct[color = red, domain = 1/3:3]{0.125*(3*x-1)+0.375*(3*x-1)/(x*x)} 148 | \tkzFct[color = blue, domain = 1/3:3]{0.125*(3*x-1)} 149 | \tkzDrawTangentLine[with=a, 150 | color=blue](1) 151 | \tkzText[draw, 152 | color= red](1,1.5)% 153 | {$f(x)=\frac{1}{8}(3x-1)+\frac{3}{8}\left(\frac{3x-1}{x^2}\right)$} 154 | \tkzText[draw, 155 | color= blue](2,0.3)% 156 | {$g(x)=\frac{1}{8}(3x-1)$} 157 | \end{tikzpicture} 158 | \end{tkzexample} 159 | %<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> 160 | \subsection{切线示例} 161 | 162 | \begin{tkzexample}[] 163 | \begin{tikzpicture}[scale=2] 164 | \tkzInit[xmin=-5,xmax=2,ymin=-1, ymax=3] 165 | \tkzDrawX 166 | \tkzDrawY 167 | \tkzText[draw,color = red,fill = orange!20]( 1.5,1.5){$y = xe^x$} 168 | \tkzFct[color = red, domain = -5:1]{x*exp(x)}% 169 | \tkzDrawTangentLine[color=blue,kr=2,kl=2](-2) 170 | \tkzDrawTangentLine[color=green,kr=2,kl=2](-1) 171 | \tkzDrawTangentLine[color=blue](0) 172 | \tkzDrawTangentLine[color=blue,kr=0](1) 173 | \end{tikzpicture} 174 | \end{tkzexample} 175 | %<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> 176 | % \subsection{Demi-tangentes } 177 | \subsection{半切线} 178 | % Il faut remarquer que les tangentes sont en réalité deux demi-tangentes ce qui permet d'obtenir simplement le résultat ci-dessous. 179 | 注意,切线有两条半切线,例如对于函数: 180 | 181 | % Poosible sont les écritures \tkzname{(((x+1)*x)*x)**0.5}, \tkzname{(x**3+x**2)**0.5} et \tkzname{(x*x*x+x*x)**(0.5)}. 182 | \tkzname{(((x+1)*x)*x)**0.5}(\tkzname{(x**3+x**2)**0.5}或\tkzname{(x*x*x+x*x)**(0.5)}). 183 | 184 | % Dans cet exemple, les deux demi-tangentes sont obtenues automatiquement : 185 | 在本例中,能够自动得到两条半切线。 186 | 187 | \begin{tkzexample}[] 188 | \begin{tikzpicture}[scale=2.75] 189 | \tkzInit[xmin=-2,xmax=3,ymax=3] 190 | \tkzGrid[color=orange](-2,0)(3,3) 191 | \tkzAxeX 192 | \tkzAxeY 193 | \tkzFct[color = red ,domain = -1:2]{(((x+1)*x)*x)**0.5} 194 | \tkzDrawTangentLine(0) 195 | \tkzText[draw,color = red,fill = orange!20](2,1){$f(x)=\sqrt{x^3+x^2}$} 196 | \end{tikzpicture} 197 | \end{tkzexample} 198 | %<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––> 199 | % \subsection{Demi-tangentes Courbe de Lorentz } 200 | \subsection{Lorentz曲线的半切线} 201 | 202 | % Ici, on ne veut que les demi-tangentes comprises entre 0 et 1, pour cela il suffit dans un cas de donner la valeur 0 à \tkzname{kr} et dans l'autre à \tkzname{kl}. 203 | 在此,只需得到0和1之间的半切线,为此,仅需\tkzname{kr}和\tkzname{kl}取合适的值即可。 204 | 205 | \begin{center} 206 | \begin{tkzexample}[vbox] 207 | \begin{tikzpicture}[scale=1.25] 208 | \tkzInit[xmax=1,ymax=1,xstep=0.1,ystep=0.1] 209 | \tkzGrid(0,0)(1,1) 210 | \tkzAxeXY 211 | \tkzFct[color = red,thick, domain =0:1]{(exp(\x)-1)/(exp(1)-1)} 212 | \tkzSetUpPoint[size=4] 213 | \tkzDrawTangentLine[draw, kl = 0, kr = 0.4](0) 214 | \tkzDrawTangentLine[draw, kl = 0.4,kr = 0 ](1) 215 | \tkzText[draw,color = red,fill = orange!20](0.5,0.6)% 216 | {$f(x)=\dfrac{\text{e}^x-1}{\text{e}-1}$} 217 | \end{tikzpicture} 218 | \end{tkzexample} 219 | \end{center} 220 | %<---------------------------------------------------------------------------> 221 | \subsection{切线族示例} 222 | 223 | 224 | \begin{tkzexample}[vbox] 225 | \begin{tikzpicture}[scale=2] 226 | \tikzstyle{tan style}=[-] 227 | \tkzInit[xmin=-5,xmax=2,ymin=-1,ymax=3] 228 | \tkzDrawXY 229 | \tkzText[draw,color = red, fill = orange!20](1.5,1.5){$y = xe^x$} 230 | \tkzFct[line width = 0.01 pt,color = red, domain = -5:1]{x*exp(x)} 231 | \foreach \x in {-4,-3.8,...,0}{% 232 | \tkzDrawTangentLine[color=blue,line width=.4pt,kr=1,kl=0.5](\x)} 233 | \foreach \x in {0.6,0.8,1}{% 234 | \tkzDrawTangentLine[color=blue,line width=.4pt, kr=0,kl=0.5](\x)} 235 | \end{tikzpicture} 236 | \end{tkzexample} 237 | %<---------------------------------------------------------------------------> 238 | \subsection{无曲线切线族} 239 | 240 | % Pour cela, il faut définir la dernière expression avec la syntaxe de \tkzname{fp.sty}. 241 | 由于不需要绘制函数曲线,因此不能使用\tkzcname{tkzFct}命令定义函数, 242 | 为此,必须使用符合\tkzname{fp.sty}语法的表达式定义函数。 243 | 244 | 需要定义\tkzcname{tkzFctLast}全局宏以保存函数表达式。 245 | 246 | \begin{tkzltxexample}[] 247 | \global\edef\tkzFctLast{x*exp(x)} 248 | \end{tkzltxexample} 249 | 250 | % \subsubsection{Utilisation de \tkzcname{tkzFctLast}} 251 | \subsubsection{\tkzcname{tkzFctLast}宏} 252 | \begin{tkzexample}[vbox] 253 | \begin{tikzpicture}[scale=2] 254 | \tikzstyle{tan style}=[-] 255 | \tkzInit[xmin=-5,xmax=2,ymin=-1,ymax=3] 256 | \tkzDrawXY 257 | \tkzText[draw,color = red, fill = orange!20](1.5,1.5){$y = xe^x$} 258 | \global\edef\tkzFctLast{x*exp(x)}% 这一行代码非常重要 259 | \foreach \v in {-4,-3.8,...,0}{% 260 | \tkzDrawTangentLine[color=blue,line width=.4pt,kl=1](\v)} 261 | \foreach \v in {0.6,0.8,1}{% 262 | \tkzDrawTangentLine[color=blue,line width=.4pt,kr=0,kl=.75](\v)} 263 | \end{tikzpicture} 264 | \end{tkzexample} 265 | 266 | 267 | \newpage 268 | \subsection{历史记录} 269 | 270 | % Un problème surgit si on emploie une expression contenant des parenthèses dans l'argument, ainsi \tkzname{(\{1/exp(1)\})} est correct mais \tkzname{(1/exp(1))} donne une erreur. Il est aussi possible d'évaluer l'antécédent postérieurement comme cela~: 271 | 如果在参数中使用带有括号的表达式,则会出现问题。 272 | 所以,\tkzname{(\{1/exp(1)\})}是正确的,但\tkzname{(1/exp(1))}则会引发错误。 273 | 在后续计算中,也需要注意该问题。 274 | 275 | \subsubsection{保存计算结果} 276 | \begin{tkzltxexample}[] \FPeval\vx{1/exp(1)} 277 | \end{tkzltxexample} 278 | 279 | \subsubsection{使用计算结果} 280 | \begin{center} 281 | \begin{tkzexample}[] 282 | \begin{tikzpicture}[scale=1] 283 | \tkzInit[xmax=1,xstep=0.1,ymin=0.5,ymax=1,ystep=0.1] 284 | \tkzGrid \tkzAxeXY 285 | \tkzFct[domain = 0.00001:1]{(\x**\x)} 286 | \tkzDrawTangentLine[draw,color = red, kr = 0.2,kl = 0.2]({1/exp(1)}) 287 | \end{tikzpicture} 288 | \end{tkzexample} 289 | \end{center} 290 | 291 | 292 | 293 | \end{document} 294 | \endinput 295 | -------------------------------------------------------------------------------- /doc-zh-cn/tkz-doc-zh.cls: -------------------------------------------------------------------------------- 1 | % tkz-doc.cls 2 | % encoding: utf8 3 | % Copyright 2020 Alain Matthes 4 | % This work may be distributed and/or modified under the 5 | % conditions of the LaTeX Project Public License, either version 1.3 6 | % of this license or (at your option) any later version. 7 | % The latest version of this license is in 8 | % http://www.latex-project.org/lppl.txt 9 | % and version 1.3 or later is part of all distributions of LaTeX 10 | % version 2005/12/01 or later. 11 | % This work has the LPPL maintenance status “maintained”. 12 | % The Current Maintainer of this work is Alain Matthes. 13 | % tkz-doc class for use with the tkz documentation 14 | % ( AlterMundus Collection ). 15 | % 16 | %% Objet : Classe LaTeX et Styles pour créer des documentations. 17 | %<-------------- Définitions relatives au package ---------------------------> 18 | \newcommand*{\PackageName}{tkz-doc-zh} 19 | \newcommand*{\PackageVersion}{1.43c} 20 | \newcommand*{\filedate}{2020/04/10} 21 | 22 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}} 23 | 24 | %<---------------------- Identification Part --------------------------------> 25 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 26 | \ProvidesClass{\PackageName}[% 27 | \filedate\space Version:\space\PackageVersion\space % 28 | tkz documentation class based on scrartcl] 29 | \newif\if@tkzcadre 30 | \@tkzcadrefalse 31 | \DeclareOption{cadre}{\@tkzcadretrue} 32 | \ProcessOptions\relax 33 | \LoadClass[titlepage,a4paper]{scrartcl} 34 | %<----------------- loading some packages ----------------------------------> 35 | % dvipsnames loads a set of 68 cmyk colors as defined in the dvips driver. 36 | % svgnames loads a set of 151 rgb color names 37 | % obsolete usenames 38 | \PassOptionsToPackage{dvipsnames,svgnames}{xcolor} 39 | %<----------------- loading Chinese packages ----------------------------------> 40 | % \RequirePackage[scheme=plain, fontset=windows]{ctex}% 支持中文,[scheme=plain]表示不改变原排版风格 41 | %\RequirePackage[scheme=plain]{ctex}% 支持中文,[scheme=plain]表示不改变原排版风格 42 | \RequirePackage[scheme=plain,fontset=fandol]{ctex}% 支持中文,[scheme=plain]表示不改变原排版风格 43 | %<-------------------------------------------------------------------------->- 44 | \KOMAoptions{twoside=false} 45 | %<-------------------------------------------------------------------------->- 46 | \RequirePackage{framed,eso-pic} 47 | \RequirePackage[bottom,stable,ragged]{footmisc} 48 | \RequirePackage[automark,markcase=ignoreuppercase]{scrlayer-scrpage} 49 | %<------------- define important words ----------------------------------> 50 | \InputIfFileExists{tkz-doc.cfg}{\typeout{Local configuration file tkz-doc.cfg found and used}}{\typeout{tkz-doc.cfg not found}} 51 | %<-------------------------------------------------------------------------->- 52 | \pagestyle{scrheadings} 53 | \clearscrheadings 54 | \clearscrplain 55 | \ohead{\textcolor{sectioncolor}{\pagemark}} 56 | \ihead{\textcolor{sectioncolor}{\headmark}} 57 | \rofoot{\textcolor{sectioncolor}{\tkznamecollection}} 58 | \lofoot{\textcolor{sectioncolor}{\tkznameofpack}} 59 | 60 | \automark[subsection]{section} 61 | \KOMAoptions{headsepline=.4pt} 62 | \addtokomafont{headsepline}{\color{sectioncolor}} 63 | 64 | \KOMAoptions{footsepline=.4pt} 65 | \addtokomafont{footsepline}{\color{sectioncolor}} 66 | 67 | \setheadwidth[0pt]{text} 68 | \setfootwidth[0pt]{text} 69 | \renewcommand{\footnoterule}{\vspace*{-3pt}{% 70 | \color{sectioncolor}\hrule width 2in height 0.4pt}\vspace*{2.6pt}} 71 | \deffootnote{1.5em}{1em}{\makebox[1.5em][l]{\thefootnotemark}} 72 | \addtolength{\skip\footins}{\baselineskip}% 73 | %<------------------– En-tête et pied de page ------------------------------ 74 | \pagenumbering{arabic} 75 | \newcommand\SectionFontStyle{\ttfamily} 76 | \setkomafont{sectioning}{\bfseries\SectionFontStyle} 77 | \setkomafont{pagenumber}{\bfseries\SectionFontStyle} 78 | \setkomafont{pagehead}{\small\ttfamily} 79 | \setkomafont{pagefoot}{\small\ttfamily} 80 | \setkomafont{descriptionlabel}{\itshape} 81 | \addtokomafont{sectioning}{\color{sectioncolor}} 82 | \renewcommand*{\raggedsection}{\raggedright} 83 | %<--------------------------------------------------------------------------- 84 | \newcounter{cnt}\setcounter{cnt}{1} 85 | \setcounter{secnumdepth}{3}% 86 | \setcounter{tocdepth}{3} 87 | %<------------------ Éxécution et chargement ----------------------------- 88 | \RequirePackage{tikz} 89 | \usetikzlibrary{decorations.shapes, 90 | decorations.text, 91 | decorations.pathreplacing, 92 | decorations.pathmorphing, 93 | decorations.markings, 94 | shadows} 95 | \RequirePackage{tabularx,ragged2e} 96 | \RequirePackage[bottom,stable,ragged]{footmisc} 97 | \raggedbottom 98 | \newbox\tkzbox 99 | %<--------------- some macros -------------------------------------------- 100 | \def\nodeshadowedone(#1,#2)#3{% 101 | \node[myblue,above,inner sep=0pt]{\global\setbox\tkzbox=\hbox{#3}\copy\tkzbox}; 102 | \node[above,yscale=#2,inner sep=0pt,xslant=#1,myblue!60]{\box\tkzbox}; 103 | }% 104 | % some of the macros below are absolete 105 | \def\nameoffile#1{\gdef\@nameoffile{#1}} 106 | \def\@nameoffile{\@latex@warning@no@line{No \noexpand\nameoffile given}} 107 | \long\def\defoffile#1{\protected@xdef\@defoffile{\@defoffile{#1}}} 108 | \let\@defoffile\@empty 109 | %<------------------------------------------------------------------------- 110 | \newcommand*{\addbs}[1]{\texttt{\textbackslash#1}} 111 | \newcommand*{\@CellCode}[1]{} 112 | \newcommand*{\thead}{\noalign{\iffalse}\fi\@thead} 113 | \newcommand*{\@thead}[1][\em\ttfamily]{\gdef\@CellCode{#1}\iffalse{\fi}} 114 | \newcommand*{\tbody}{\noalign{\gdef\@CellCode{}}} 115 | \newcolumntype{I}{>{\@CellCode}} 116 | %<-------------------------- NewMacroBox -----------------------------------> 117 | \newcommand*{\ActivBoxName}{} 118 | \newenvironment{NewMacroBox}[2]{% 119 | \parindent=0pt 120 | \renewcommand*{\ActivBoxName}{#1} 121 | \def\FrameCommand{\color{MidnightBlue}{\vrule width 1pt\hspace{3pt}}}% 122 | \MakeFramed{\advance\hsize-\width}% 123 | \noindent 124 | \makebox[0pt][l]{% 125 | \hspace{-4pt}% 126 | \setlength{\fboxrule}{1pt}% 127 | \setlength{\fboxsep}{3pt}% 128 | \fcolorbox{sectioncolor}{titlecolorbox}{% 129 | \rule{6pt}{0pt}% 130 | \makebox[\width+6pt][l]{\tkzcname{#1#2}}% 131 | }% 132 | }\\*[.5\baselineskip]% 133 | \noindent 134 | % \ignorespaces\tkzcname{#1#3} 135 | \Imacro{#1}% 136 | }% 137 | {% 138 | \par\noindent% 139 | \makebox[0pt][l]{% 140 | \hspace{-6pt}% 141 | \rule{6pt}{1pt}% 142 | \rule{\textwidth}{1pt}% 143 | \hspace{-1pt}% 144 | \rule{1pt}{10pt}% 145 | }% 146 | \endMakeFramed 147 | \noindent 148 | \ignorespacesafterend 149 | \par\medskip 150 | }% 151 | %<----------------- end NewMacroBox -----------------------------------------> 152 | 153 | %<----------------------------- NewEnvBox -----------------------------------> 154 | \let\fram@d=\MakeFramed \let\endfram@d=\endMakeFramed 155 | 156 | \newenvironment{NewEnvBox}[1]{% 157 | \parindent=0pt 158 | \renewcommand*{\ActivBoxName}{#1} 159 | %\gdef\tkzEnvMacro{#1} 160 | \def\FrameCommand{\color{sectioncolor}{\vrule width 1pt\hspace{3pt}}}% 161 | \MakeFramed{\advance\hsize-\width}% 162 | \noindent 163 | \makebox[0pt][l]{% 164 | \hspace{-4pt}% 165 | \setlength{\fboxrule}{1pt}% 166 | \setlength{\fboxsep}{3pt}% 167 | \fcolorbox{sectioncolor}{titlecolorbox}{% 168 | \rule{6pt}{0pt}% 169 | \makebox[\width+6pt][l]{% 170 | \tkzcname{\textcolor{sectioncolor}{begin}\{\ActivBoxName\}}{\oarg{options}}% 171 | \hspace*{.25cm}\meta{environment contents}\hspace*{.25cm}% 172 | \tkzcname{\textcolor{sectioncolor}{end}\{\ActivBoxName\}}}% 173 | }% 174 | }\\*[.5\baselineskip]% 175 | \noindent 176 | % \ignorespaces\tkzcname{#1#3} 177 | \Ienv{#1} 178 | \color{MidnightBlue}}{% 179 | \par\noindent% 180 | \makebox[0pt][l]{% 181 | \hspace{-6pt}% 182 | \rule{6pt}{1pt}% 183 | \rule{\textwidth}{1pt}% 184 | \hspace{-1pt}% 185 | \rule{1pt}{10pt}% 186 | }% 187 | \endMakeFramed 188 | \noindent 189 | \ignorespacesafterend 190 | \par\medskip 191 | } 192 | %<------------------- end NewEnvBox -----------------------------------------> 193 | %<----------------------------- def macro arg opt----------------------------> 194 | \def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}} 195 | \def\cmd@to@cs#1#2{\char\number`#2\relax} 196 | \DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}} 197 | \providecommand\marg[1]{{\ttfamily\char`\{}\opt{\meta{#1}}{\ttfamily\char`\}}} 198 | \providecommand\oarg[1]{{\ttfamily[}\opt{\meta{#1}}{\ttfamily]}} 199 | \providecommand\parg[1]{{\ttfamily(}\opt{\meta{#1}}{\ttfamily)}} 200 | \newcommand\opt[1]{{\color{myblue}#1}} 201 | \newcommand\ooarg[1]{{\ttfamily[}\meta{#1}{\ttfamily]}} 202 | \newcommand*{\var}[1]{\{\opt{\meta{#1}}\}} 203 | \newcommand*{\varp}[1]{\big(\opt{\meta{#1}}\big)} 204 | \newcommand*{\vara}[1]{\{#1\}} 205 | % -- Macros pour indexation ------------------------------------------------- 206 | \newcommand*{\tkzNamePack}[1]{\NamePack{#1}} 207 | \newcommand*{\tkzNameMacro}[1]{\tkzcname{#1}\Imacro{#1}} 208 | \newcommand*{\tkzNameEnv}[1]{\tkzname{#1}\Ienv{#1}} 209 | \newcommand*{\Ilib}[1]{\index{Library_1@\texttt{Library}!\texttt{#1}}} 210 | \newcommand*{\Ienv}[1]{\index{Environment_1@\texttt{Environment}!\texttt{#1}}} 211 | \newcommand*{\IargEnv}[2]{\index{#1_2@\texttt{#1: arguments}!\texttt{#2}}} 212 | \newcommand*{\IargNameEnv}[2]{\texttt{#2}\index{#1_2@\texttt{#1: arguments}!\texttt{#2}}} 213 | \newcommand*{\IoptEnv}[2]{\index{#1_3@\texttt{#1: options}!\texttt{#2}}} 214 | \newcommand*{\IoptNameEnv}[2]{\texttt{#2}\index{#1_3@\texttt{#1: options}!\texttt{#2}}} 215 | \newcommand*{\Imacro}[1]{\index{#1_1@\texttt{\textbackslash#1}}}%n 216 | \newcommand*{\Iarg}[2]{\index{#1_2@\texttt{\textbackslash#1: arguments}!\texttt{#2}}} 217 | \newcommand*{\IargName}[2]{\texttt{#2}\index{#1_2@\texttt{\textbackslash#1: arguments}!\texttt{#2}}} 218 | \newcommand*{\IoptName}[2]{\texttt{#2}\index{#1_3@\texttt{\textbackslash#1: options}!\texttt{#2}}} 219 | \newcommand*{\Iopt}[2]{\index{#1_3@\texttt{\textbackslash#1: options}!\texttt{#2}}} 220 | \newcommand*{\Istyle}[2]{\index{#1_3@\texttt{\textbackslash#1: styles}!\texttt{#2}}} 221 | \newcommand*{\IstyleEnv}[2]{\index{#1_3@\texttt{#1: styles}!\texttt{#2}}} 222 | \newcommand*{\Iaccent}[2]{\index{#1@\texttt{#2}}} 223 | \newcommand*{\NameLib}[1]{\texttt{\textcolor{MidnightBlue}{#1}}\index{Ti\emph{k}Z Library !#1@\texttt{#1}}} 224 | \newcommand*{\NameSys}[1]{\texttt{#1}\index{Operating System !#1@\texttt{#1}}} 225 | \newcommand*{\NameDist}[1]{\texttt{\textcolor{MidnightBlue}{#1}}\index{TeX Distributions !#1@\texttt{#1}}} 226 | \newcommand*{\NameFonct}[1]{\texttt{\textcolor{MidnightBlue}{#1}}\index{Functions !#1@\texttt{#1}}} 227 | \newcommand*{\NamePack}[1]{\texttt{\textcolor{MidnightBlue}{#1}}\index{Package !#1@\texttt{#1}}} 228 | \newcommand*{\TOenvline}[3]{\IoptNameEnv{\ActivBoxName}{#1}&\tkzdft{#2}&\ttfamily #3\\} 229 | \newcommand*{\TOline}[3]{\IoptName{\ActivBoxName}{#1}&\tkzdft{#2}&\ttfamily #3\\} 230 | \newcommand*{\TAline}[3]{\IargName{\ActivBoxName}{#1}&\tkzdft{#2}&\ttfamily #3\\} 231 | \newcommand*{\TMline}[3]{\tkzcname{#1}\index{#1_1@\texttt{\textbackslash#1}}&\tkzdft{#2}&\ttfamily #3\\} 232 | \newcommand*{\tkzcname}[1]{\Imacro{#1}\textbf{\texttt{\textcolor{MidnightBlue}{% 233 | \textbackslash#1}}}} 234 | \newcommand*{\tkzhname}[1]{\textbf{\texttt{\textcolor{MidnightBlue}{% 235 | \textbackslash#1}}}} 236 | 237 | \DeclareRobustCommand\meta[1]{% 238 | \ensuremath\langle 239 | \ifmmode \expandafter \nfss@text \fi 240 | {% 241 | \meta@font@select 242 | \edef\meta@hyphen@restore 243 | {\hyphenchar\the\font\the\hyphenchar\font}% 244 | \hyphenchar\font\m@ne 245 | \language\l@nohyphenation 246 | \/#1\/% 247 | \meta@hyphen@restore 248 | }\ensuremath\rangle 249 | } 250 | \def\meta@font@select{} 251 | 252 | \renewcommand*{\idx@heading}{% 253 | \idx@@heading{\indexname}% 254 | } 255 | \renewenvironment{theindex}{% 256 | \@restonecoltrue 257 | \columnseprule \z@ 258 | \columnsep 35\p@ 259 | \idx@heading% 260 | \index@preamble\par\nobreak 261 | \thispagestyle{\indexpagestyle}\parindent\z@ 262 | \setlength{\parskip}{\z@ \@plus .3\p@}% 263 | \setlength{\parfillskip}{\z@ \@plus 1fil}% 264 | \let\item\@idxitem 265 | }{% 266 | \if@restonecol\onecolumn\else\clearpage\fi 267 | } 268 | %<----------- set colors of the document -------------------------- 269 | \pgfkeys{/tkzsetupcolor/.cd, 270 | background/.code = {\global\edef\tkz@suc@bkc{#1}}, 271 | text/.code = {\global\edef\tkz@suc@txt{#1}}} 272 | \def\tkzSetUpColors{\pgfutil@ifnextchar[{\tkz@SetUpColors}{% 273 | \tkz@SetUpColors[]}} 274 | \def\tkz@SetUpColors[#1]{% 275 | \begingroup 276 | \pgfkeys{tkzsetupcolor/.cd, 277 | background = \tkz@background@color, 278 | text = \tkz@text@color} 279 | \pgfqkeys{/tkzsetupcolor}{#1} 280 | \pagecolor{\tkz@suc@bkc} 281 | \color{\tkz@suc@txt} 282 | \endgroup} 283 | 284 | %<--------------------------------------------------------------------- 285 | \input{couverture} 286 | %<--------- presentation première page ---------------------------------> 287 | \newcommand\presentation{% 288 | \thispagestyle{empty}% 289 | \par\vspace*{3 cm} 290 | \begin{center} 291 | {\textcolor{myblue}{\Huge \@nameoffile}} 292 | \end{center} 293 | \par\vspace*{3 cm} 294 | \noindent 295 | \newlength{\tkz@lx}\settowidth{\tkz@lx}{\huge \tkznamecollection}% 296 | \advance\tkz@lx3em\quad 297 | \href{\tkzurlauthor}{% 298 | \rotatebox{90}{\hspace*{1.5em}{% 299 | \textcolor{sectioncolor}{\Huge \tkznamecollection}}}} 300 | \textcolor{sectioncolor}{\rule{2pt}{\tkz@lx}}\quad% 301 | \begin{minipage}[b]{.90\textwidth} 302 | {% 303 | \noindent\hfill 304 | \raggedleft\Large 305 | \href{mailto:al.ma@mac.com}{\textcolor{sectioncolor}{\tkzauthorofpack}}\par 306 | }% 307 | {\@defoffile} 308 | \par 309 | \end{minipage} 310 | } 311 | \endinput 312 | --------------------------------------------------------------------------------