diff options
author | Karl Berry <karl@freefriends.org> | 2008-01-23 00:40:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-01-23 00:40:35 +0000 |
commit | d579186be6c4710e3d8e2c041dc74bf74268181b (patch) | |
tree | 08efa1f153ab834674731da7421136ab399281b7 /Master/texmf-dist/tex/latex | |
parent | 429c5536fba6b00fc5d57fd7da982d8f1e8a2f58 (diff) |
tablor update (22jan08)
git-svn-id: svn://tug.org/texlive/trunk@6375 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/tablor/tablor.sty | 123 |
1 files changed, 74 insertions, 49 deletions
diff --git a/Master/texmf-dist/tex/latex/tablor/tablor.sty b/Master/texmf-dist/tex/latex/tablor/tablor.sty index fa48fb7905c..914fa524efa 100644 --- a/Master/texmf-dist/tex/latex/tablor/tablor.sty +++ b/Master/texmf-dist/tex/latex/tablor/tablor.sty @@ -1,7 +1,7 @@ \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{tablor} - [17/01/2008 v1.2 + [21/01/2008 v1.3 la machine à créer des tableaux de signes et variations] @@ -9,27 +9,27 @@ %% Crée 5 environnements : %% tableau de signes de 2 facteurs affines % \begin{TSa} -% TSa(-2,3,-1,5,1); +% TSa(-2,3,-1,5,\tv); % \end{TSa} % %%%%%% Pour des tableaux de plus de 2 facteurs % % \begin{TS} -% TS([-2*x+3,x^2-1,x^2+1,x-1,x^2-2],2); +% TS([-2*x+3,x^2-1,x^2+1,x-1,x^2-2],\tv); % \end{TS} % % pour les tableaux de signes avec quotient %\begin{TSq} -%TSq("Q",[-2*x+3,-4*x+5],[x^2-16,x-2],3) +%TSq("Q",[-2*x+3,-4*x+5],[x^2-16,x-2],\tv) %%\end{TSq} % un tableau de variation : % % \begin{TV} -% TV([0,+infinity],[0],"h","x",ln(x)-(ln(x))^2,1,4) +% TV([0,+infinity],[0],"h","x",ln(x)-(ln(x))^2,1,\tv) % \end{TV} % % tableau avec valeurs intermédiares %\begin{TVI} -%TVI([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,1) +%TVI([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,\tv) %\end{TVI} %%% @@ -37,7 +37,7 @@ \newcommand{\nettoyer}{ \immediate\write18{rm XCasmp.mp* XCasmp.log XCasmp?.mp* XCasmp?.log XCasmpTV.mp* XCasmpTV.log *.out XCasmpTVI.mp* XCasmpTVI.log - *.in *.meta *mpx*}} + *.in *.meta *mpx* *~}} \newcommand{\bouger}[1]{ \immediate\write18{cp XCas* #1}} @@ -50,6 +50,7 @@ \newcounter{TVn} +\newcommand{\tv}{\theTVn} \usepackage{fancyvrb} %\usepackage[upright]{fourier} @@ -83,12 +84,14 @@ pour u de 1 jusque nz-2 faire fpour; nz:=size(Z); l0:=" newLigneVariables(btex $"+nomv+"$ etex);";lp:=" "; lf:=" ";lsp:=" "; -pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex);";fpour; +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex); +";fpour; k0:= evalf(limite(f(x),x=Z[0],1))> evalf(limite(f(x),x=Z[1],-1)); kz:=evalf(limite(f(x),x=Z[nz-1],-1))> evalf(limite(f(x),x=Z[nz-2],1)); -lsi:="newLigneSignes(btex $\\hbox{ Signe de }\\atop{\\displaystyle "+nom+"'("+nomv+")}$ etex);"+ +lsi:=" +newLigneSignes(btex $\\hbox{ Signe de }\\atop{\\displaystyle "+nom+"'("+nomv+")}$ etex);"+ if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ if(sign(fp(Z[0]+10^(-5)))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ if(sign(fp((Z[0]+10^(-5))))==1){"plus;"}else{"moins;"} }} @@ -98,9 +101,11 @@ if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.01))>0; if(ksp==1){"plus;"}else{"moins;"} }; } -lsf:=if(member(Z[nz-1],F)==0){""}else{"nomDefBarre;"} +lsf:=if(member(Z[nz-1],F)==0){""}else{"nomDefBarre; +"} lm0:=limite(f(x),x=Z[0],1)==-infinity; - li:="newLigneVariations(btex $\\hbox{\\bf Variations de }\\atop{\\displaystyle \\Mathbold{"+nom+"}}$ etex);"+ + li:=" +newLigneVariations(btex $\\hbox{\\bf Variations de }\\atop{\\displaystyle \\Mathbold{"+nom+"}}$ etex);"+ if(member(Z[0],F)==0){"valPos(btex $"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$ etex,"} else{"nonDefBarre;limDroite(btex $"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$ etex,"}+ if(k0==1){"1"}else{"0"}+ @@ -111,12 +116,15 @@ lm0:=limite(f(x),x=Z[0],1)==-infinity; lmrm:=limite(f(x),x=Z[r],-1)==-infinity;lmrp:=limite(f(x),x=Z[r],1)==-infinity; lp:=lp+if(member(Z[r],F)){ "limGauche(btex $"+if(lmrm==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],-1)))}+"$ etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex $"+if(lmrp==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],1)))}+"$ etex,"+if(krp==1){"1);"}else{"0);"}} - else{"valPos(btex $"+latex(simplifier(f(Z[r])))+"$ etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}} + else{"valPos(btex $"+latex(simplifier(f(Z[r])))+"$ + etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); +"}}} }; } lnz:=limite(f(x),x=Z[nz-1],-1)==-infinity; lf:=if(member(Z[nz-1],F)==0){"valPos(btex $"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$ etex,"}else{"nonDefBarre;limGauche(btex $"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$ etex,"}+ - if(kz==1){"1);"}else{"0);"}; + if(kz==1){"1);"}else{"0); +"}; intro:="input tableauVariation; @@ -137,12 +145,14 @@ MetaL:= if(ftt==0){if(nz>2){intro+"beginTableau("+nmr+")"+ li+ lp+ lf -+"endTableau; ++" +endTableau; end";}else{intro+"beginTableau("+nmr+")"+ l0+ li+ lf -+"endTableau; ++" +endTableau; end";}}else{ if(nz>2){intro+"beginTableau("+nmr+")"+ l0+ @@ -150,13 +160,15 @@ lsi+lsp+lsf+ li+ lp+ lf -+"endTableau; ++" +endTableau; end";}else{intro+"beginTableau("+nmr+")"+ l0+ lsi+lsf+ li+ lf -+"endTableau; ++" +endTableau; end";} } @@ -212,7 +224,8 @@ if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1] TestL:=(abs(LL[k])==abs(LL[k+1])); if(TestS==0){ if( TestL==1 ){l0:=l0}else{ A:=A,aa;l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);"+"val(btex $\\alpha_"+aa+"$ etex);";aa:=aa+1;kk:=kk+1}}else{l0:=l0+"val(btex $"+latex(Z[kk])+"$ etex);";kk:=kk+1}} -l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex);"}; +l0:=l0+"val(btex $"+latex(Z[nz-1])+"$ etex); +"}; @@ -220,7 +233,8 @@ TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))= k0:= evalf(limite(f(x),x=Z[0],1))> evalf(limite(f(x),x=Z[1],-1)); kz:=evalf(limite(f(x),x=Z[nz-1],-1))> evalf(limite(f(x),x=Z[nz-2],1)); -lsi:="newLigneSignes(btex $\\hbox{ Signe de }\\atop{\\displaystyle "+nom+"'("+nomv+")}$ etex);"+ +lsi:=" +newLigneSignes(btex $\\hbox{ Signe de }\\atop{\\displaystyle "+nom+"'("+nomv+")}$ etex);"+ if(Z[0]==-infinity){if(sign(evalf(fp(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ if(sign(fp((Z[0]+10^(-10))))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ if(sign(fp(10^(-10)+Z[0]))==1){"plus;"}else{"moins;"} }}+if(TestS==0){"valBarre(btex$ $ etex);"+ if(sign(fp(10^(-10)+Z[0]))==1){"plus;"}else{"moins;"}}else{" "}; @@ -251,8 +265,9 @@ lm0:=limite(f(x),x=Z[0],1)==-infinity; TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-ao))==0.0); - li:="newLigneVariations(btex $\\hbox{\\bf Variations de }\\atop{\\displaystyle \\Mathbold{"+nom+"}}$ etex);"+ - if(member(Z[0],F)==0){"valPos(btex $"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$ etex,"} + li:=" +newLigneVariations(btex $\\hbox{\\bf Variations de }\\atop{\\displaystyle \\Mathbold{"+nom+"}}$ etex); +"+ if(member(Z[0],F)==0){"valPos(btex $"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$ etex,"} else{"nonDefBarre;limDroite(btex $"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$ etex,"}+ if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex $ "+ao+" $ etex,0.5);"}else{" "}; @@ -317,12 +332,14 @@ MetaL:= if(ftt==0){if(nz>2){intro+"beginTableau("+nmr+")"+ li+ lp+ lf -+"endTableau; ++" +endTableau; end";}else{intro+"beginTableau("+nmr+")"+ l0+ li+ lf -+"endTableau; ++" +endTableau; end";}}else{ if(nz>2){intro+"beginTableau("+nmr+")"+ l0+ @@ -330,13 +347,15 @@ lsi+lsp+lsf+ li+ lp+ lf -+"endTableau; ++" +endTableau; end";}else{intro+"beginTableau("+nmr+")"+ l0+ lsi+lsf+ li+ lf -+"endTableau; ++" +endTableau; end";} }; @@ -378,7 +397,8 @@ pour u de 1 jusque nz-2 faire fpour; nz:=size(Z); l0:=" ";li:=" ";lr:=" "; -pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex);";fpour; +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex); +";fpour; @@ -389,7 +409,8 @@ for(p:=0;p<=n-1;p++){lp:=" "; lp:=lp+if(simplifier(L[p](Z[r]))==0){"valBarre(btex 0 etex);"}else{"barre;"}+ if(L[p]((Z[r]+Z[r+1])*.5)>0){"plus;"}else{"moins;"}}+ if(simplifier(L[p](Z[nz-1]))==0){"valBarre(btex 0 etex);"}else{"barre;"}+ - if(L[p](Z[nz-1]+1.0)>0){"plus;"}else{"moins;"} + if(L[p](Z[nz-1]+1.0)>0){"plus;"}else{"moins; + "} }; @@ -469,12 +490,14 @@ pour u de 1 jusque nz-2 faire fpour; nz:=size(Z); l0:=" ";li:=" ";lr:=" "; -pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex);";fpour; +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex); +";fpour; for(p:=0;p<=n-1;p++){lp:=" "; - li:=li+"newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(L[p](x))+"}}$ etex);"+ + li:=li+" +newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(L[p](x))+"}}$ etex);"+ if(L[p](Z[0]-1.0)>0){"plus;"}else{"moins;"}+ for(r:=0; r<=nz-2;r++){ lp:=lp+if(simplifier(L[p](Z[r]))==0){" @@ -544,7 +567,8 @@ val(btex $+\\infty$ etex); else{si a>0 alors "moins;"; sinon "plus;"; fsi}+ if(zmin==zA){"barre;"}else{"valBarre(btex 0 etex);"}+ if(a>0){"plus;"}else{"moins;"} - +" newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{"+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+"}}$ etex);" + +" +newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{"+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+"}}$ etex);" + if(c>0){"moins"}else{"plus"}+";"+ if(zmin==zB){"valBarre(btex 0 etex);"}else{"barre;"}+ if(zmin==zB){si c>0 alors "plus;"; sinon "moins;";fsi} @@ -552,7 +576,8 @@ val(btex $+\\infty$ etex); if(zmin==zB){"barre;"}else{"valBarre(btex 0 etex);"}+ if(c>0){"plus;"}else{"moins;"} - +" newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{("+if(a==1){"x+"}else{if(a==-1){"-x+"}else{a+"x+"}}+b+")("+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+")}}$ etex);" + +" +newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{("+if(a==1){"x+"}else{if(a==-1){"-x+"}else{a+"x+"}}+b+")("+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+")}}$ etex);" + si a*c>0 alors plus; sinon moins;fsi+";"+ "valBarre(btex 0 etex);"+ si a*c>0 alors moins; sinon plus;fsi+";"+ @@ -584,7 +609,7 @@ fclose(Sortie); \end{VerbatimOut} \newenvironment{TSa} -{\stepcounter{TVn}\VerbatimEnvironment\begin{VerbatimOut}{XCas.out}} +{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCas.out}} {\end{VerbatimOut} \executGiacmp{XCas.in} @@ -593,7 +618,7 @@ fclose(Sortie); \begin{center} \includegraphics{XCasmp.\theTVn} \end{center} - +\stepcounter{TVn} } @@ -613,7 +638,7 @@ fclose(Sortie); \end{VerbatimOut} \newenvironment{TSq} -{\stepcounter{TVn}\VerbatimEnvironment\begin{VerbatimOut}{XCasQ.out}} +{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasQ.out}} {\end{VerbatimOut} \executGiacmp{XCasQ.in} @@ -622,7 +647,7 @@ fclose(Sortie); \begin{center} \includegraphics{XCasmpQ.\theTVn} \end{center} - +\stepcounter{TVn} } @@ -643,7 +668,7 @@ fclose(Sortie); \end{VerbatimOut} \newenvironment{TS} -{\stepcounter{TVn}\VerbatimEnvironment\begin{VerbatimOut}{XCasL.out}} +{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasL.out}} {\end{VerbatimOut} \executGiacmp{XCasL.in} @@ -652,7 +677,7 @@ fclose(Sortie); \begin{center} \includegraphics{XCasmpL.\theTVn} \end{center} - +\stepcounter{TVn} } @@ -674,17 +699,16 @@ Resultat:=cat(Resultat,RslT); fprint(Sortie,Unquoted,Resultat); fclose(Sortie); \end{VerbatimOut} -\newenvironment{TV} -{\stepcounter{TVn}\VerbatimEnvironment\begin{VerbatimOut}{XCasTV.out}} -{\end{VerbatimOut} - \executGiacmp{XCasTV.in} +\newenvironment{TV}% +{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTV.out}}% +{\end{VerbatimOut}% + \executGiacmp{XCasTV.in} \immediate\write18{mpost XCasmpTV} - \begin{center} \includegraphics{XCasmpTV.\theTVn} \end{center} - +\stepcounter{TVn} } @@ -704,17 +728,17 @@ Resultat:=cat(Resultat,RslT); fprint(Sortie,Unquoted,Resultat); fclose(Sortie); \end{VerbatimOut} -\newenvironment{TVI} -{\stepcounter{TVn}\VerbatimEnvironment\begin{VerbatimOut}{XCasTVI.out}} -{\end{VerbatimOut} - \executGiacmp{XCasTVI.in} - - \immediate\write18{mpost XCasmpTVI} +\newenvironment{TVI}% +{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVI.out}}% +{\end{VerbatimOut}% + \executGiacmp{XCasTVI.in} + \immediate\write18{mpost XCasmpTVI} \begin{center} \includegraphics{XCasmpTVI.\theTVn} \end{center} +\stepcounter{TVn} } @@ -722,5 +746,6 @@ fclose(Sortie); + %% %% Zi end |