summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tablor/tablor.sty
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-05-16 16:13:11 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2008-05-16 16:13:11 +0000
commit68c951c7f1014e7cfe936aa3de9e0b992280be10 (patch)
tree9408e2f89f85491587ba3350ce814f92bb3a5394 /Master/texmf-dist/tex/latex/tablor/tablor.sty
parent5fb6577c47cfacface48ccd80ba4b532b603cb08 (diff)
tablor v2.05 (2008/05/14)
git-svn-id: svn://tug.org/texlive/trunk@8181 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tablor/tablor.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tablor/tablor.sty140
1 files changed, 87 insertions, 53 deletions
diff --git a/Master/texmf-dist/tex/latex/tablor/tablor.sty b/Master/texmf-dist/tex/latex/tablor/tablor.sty
index d42c65e07c4..a62c439f72c 100644
--- a/Master/texmf-dist/tex/latex/tablor/tablor.sty
+++ b/Master/texmf-dist/tex/latex/tablor/tablor.sty
@@ -1,12 +1,12 @@
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{tablor}[24/03/2008 v2.03 la machine à créer des tableaux de signes et variations]
+\ProvidesPackage{tablor}[14/05/2008 v2.05 la machine à créer des tableaux de signes et variations]
% \copyleft Connan le Barbare \copyright
% avec l'efficace participation de Jean-Michel Boucart
-%% Crée 14 environnements :
+%% Crée 16 environnements :
%% tableau de signes de 2 facteurs affines
% \begin{TSa}
% TSa(-2,3,-1,5,\tv);
@@ -27,6 +27,13 @@
% TV([0,+infinity],[0],"h","x",ln(x)-(ln(x))^2,1,\tv)
% \end{TV}
%
+% tableau de variation avec zones interdites
+%
+% \begin{TVZ}
+% TVZ([-infinity,+infinity],[],[[-1,1]],"f","x",sqrt(x^2-1),1,\tv)
+% \end{TVZ}
+%
+%
% tableau avec valeurs intermédiares
%\begin{TVI}
%TVI([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,\tv)
@@ -99,12 +106,12 @@
%% En-tête pour le fichier metapost contenant les codes
%% de tous les tableaux produits
- \begin{VerbatimOut}[commandchars=?§£]{tete.mp}
+ \begin{VerbatimOut}[commandchars=?WW]{tete.mp}
input tableauVariation;
verbatimtex
%&latex
\documentclass{article}
- \\?fonte
+ \?fonte
\usepackage{amsmath}
\newcommand{\Mathbold}[1]{\mbox{\boldmath$#1$\unboldmath}}
\begin{document}
@@ -200,7 +207,7 @@
%%
-\begin{VerbatimOut}[commandchars=?§£]{XcasTV.cxx}
+\begin{VerbatimOut}[commandchars=?WW]{XcasTV.cxx}
TV(L,F,nom,nomv,f,ftt,nmr):={
nl:=size(L);
f:=unapply(f,x);
@@ -391,28 +398,44 @@ return(MetaL);
%%
%%
-%% TV avec une zone interdite : on rajoute comme argument l'intervalle interdit
-%% par exemple, pour sqrt(x^2-1) : TVZ([-infinity,100],[],[-1,1],"f","x",sqrt(x^2-1),1,1)
+%% TV avec une zone interdite : on rajoute comme argument la liste des intervalles interdits
+%% par exemple, pour sqrt(x^2-1) : TVZ([-infinity,100],[],[[-1,1]],"f","x",sqrt(x^2-1),1,1)
%%
-\begin{VerbatimOut}[commandchars=?§£]{XcasTVZ.cxx}
+\begin{VerbatimOut}[commandchars=?WW]{XcasTVZ.cxx}
+
TVZ(L,F,FF,nom,nomv,f,ftt,nmr):={
nl:=size(L);
-if(FF[0]>L[0]){Imin:=FF[0];LL:=L}else{Imin:=L[0];LL:=[L[1]]};
-if(FF[1]<L[1]){Imax:=FF[1];LL:=L}else{Imax:=L[1];LL:=[L[0]]};
-FF:=[Imin,Imax];
-f:=unapply(f,x);
+nf:=size(FF);
+ Ff:=NULL;IMIN:=NULL;IMAX:=NULL;
+for(k:=0;k<nf;k++){
+if(FF[k][0]>L[0]){Imin[k]:=FF[k][0];LL:=L}else{Imin[k]:=L[0];LL:=[L[1]]};
+if(FF[k][1]<L[1]){Imax[k]:=FF[k][1];LL:=L}else{Imax[k]:=L[1];LL:=[L[0]]};
+ Ff:=Ff,[Imin[k],Imax[k]];
+ IMIN:=IMIN,Imin[k];
+ IMAX:=IMAX,Imax[k];
+ }
+ FF:=[Ff];
+ IMIN:=[IMIN];
+ IMAX:=[IMAX];
+ f:=unapply(f,x);
fp:=fonction_derivee(f);
Z:=concat(LL,F);
-Z:=concat(Z,FF);
+
+for(k:=0;k<nf;k++){
+Z:=concat(Z,FF[k]);
+}
+
S:=resoudre(fp(x),x);
si size(S)>0 alors pour j de 0 jusque size(S)-1 faire
- kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1]));
- kK:=(evalf(S[j])<evalf(Imin)) or (evalf(S[j])>evalf(Imax));
+ for(k:=0;k<nf;k++){
+ kk:=(evalf(S[j])>=evalf(L[0])) and (evalf(S[j])<=evalf(L[nl-1]));
+ kK:=(evalf(S[j])<evalf(Imin[k])) or (evalf(S[j])>evalf(Imax[k]));
Kk:=(kk) and kK;
if(Kk==1){Z:=append(Z,simplifier(S[j]))};
- fpour
+ }
+ fpour
fsi;
Z:=sort(Z);
@@ -427,9 +450,12 @@ pour u de 1 jusque nz-2 faire
fsi;
fpour;
nz:=size(Z);
-for(k:=1;k<nz;k++){
-if ((Z[k]>Imin)and(Z[k]<Imax)){Z:=augment(Z[0..k-1],Z[k+1..nz-1]);nz:=nz-1;
-}
+
+for(j:=0;j<nf;j++){
+ for(k:=1;k<nz;k++){
+ if ((Z[k]>Imin[j])and(Z[k]<Imax[j])){Z:=augment(Z[0..k-1],Z[k+1..nz-1]);nz:=nz-1;
+ }
+ }
}
nz:=size(Z);
@@ -442,21 +468,27 @@ pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex);
lsi:="
newLigneSignes(btex $\\hbox{ Signe de }\\atop{\\displaystyle "+nom+"'("+nomv+")}$ etex);"+
- if(Z[0]==Imin){"debutNonDef;"}else{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(member(Z[0],IMIN)!=0){"debutNonDef;"}else{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(fp(Z[0])==0){"valBarre(btex 0 etex);"}else{" "}+
if(sign(fp(Z[0]+10^(-5)))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+
if(sign(fp((Z[0]+10^(-5))))==1){"plus;"}else{"moins;"} }}}
-
-if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.01))>0;
- lsp:=lsp+if(Z[r]==Imin){"debutNonDef;"}else{
- if(Z[r]==Imax){"finNonDef;"+
+
+
+
+if(nz>2){ for(r:=1; r<=nz-2;r++){ ksp:=evalf(fp(Z[r]+0.01))>0;
+ lsp:=lsp+if(member(Z[r],IMIN)!=0){"debutNonDef;"}else{
+ if(member(Z[r],IMAX)!=0){"finNonDef;"+
if(ksp==1){"plus;"}else{"moins;"}}else{
if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+
if(ksp==1){"plus;"}else{"moins;"}
}}}};
-lsf:=if(Z[0]==Imax){"finNonDef;"}else{if(member(Z[nz-1],F)==0){""}else{"nomDefBarre;
+
+
+lsf:=if(member(Z[0],IMAX)!=0){"finNonDef;"}else{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);"+
@@ -466,11 +498,12 @@ newLigneVariations(btex $\\hbox{\\bf Variations de }\\atop{\\displaystyle \\Math
");";
if(nz>2){
- for(r:=1; r<=nz-2;r++){
+ for(r:=1; r<=nz-2;r++){
krm:=evalf(limite(f(x),x=Z[r-1],1))< evalf(limite(f(x),x=Z[r],-1));
krp:=evalf(limite(f(x),x=Z[r],1))> evalf(limite(f(x),x=Z[r+1],-1)) ;
lmrm:=limite(f(x),x=Z[r],-1)==-infinity;lmrp:=limite(f(x),x=Z[r],1)==-infinity;
- lp:=lp+if(Z[r]==Imin){"limGauche(btex $"+if(lmrm==1){
+
+ lp:=lp+if(member(Z[r],IMIN)!=0){"limGauche(btex $"+if(lmrm==1){
"-\\infty"}else{
latex(simplifier(limite(f(x),x=Z[r],-1)))}
+"$ etex,"+if(krm==1){
@@ -478,7 +511,7 @@ if(nz>2){
+"debutNonDef;"
}//fsi Zr=Imin
else{
- if (Z[r]==Imax) {"finNonDef;limDroite(btex $"+if(lmrp==1){
+ if (member(Z[r],IMAX)!=0) {"finNonDef;limDroite(btex $"+if(lmrp==1){
"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],1)))}
+"$ etex,"+if(krp==1){
"1);"}else{"0);"}
@@ -504,7 +537,7 @@ if(nz>2){
}//felse(member Zr F)
} //felse(Zr=Imax)
}//felse(Zr=Imin)
- };//ffor
+ };//ffor
}//fsi nz
lnz:=limite(f(x),x=Z[nz-1],-1)==-infinity;
@@ -631,6 +664,7 @@ return(MetaL);
}
:;
+
\end{VerbatimOut}
@@ -641,7 +675,7 @@ return(MetaL);
-\begin{VerbatimOut}[commandchars=?§£]{XcasTVapp.cxx}
+\begin{VerbatimOut}[commandchars=?WW]{XcasTVapp.cxx}
@@ -874,7 +908,7 @@ return(MetaL);
-\begin{VerbatimOut}[commandchars=?§£]{XcasTVI.cxx}
+\begin{VerbatimOut}[commandchars=?WW]{XcasTVI.cxx}
TVI(L,F,nom,nomv,f,ftt,ao,nmr):={
@@ -1143,7 +1177,7 @@ return(MetaL);
-\begin{VerbatimOut}[commandchars=?§£]{XcasTVIapp.cxx}
+\begin{VerbatimOut}[commandchars=?WW]{XcasTVIapp.cxx}
TVIapp(L,F,nom,nomv,f,ftt,ao,nmr):={
@@ -1438,7 +1472,7 @@ return(MetaL);
-\begin{VerbatimOut}[commandchars=?§£]{XcasTabSignL.cxx}
+\begin{VerbatimOut}[commandchars=?WW]{XcasTabSignL.cxx}
TS(L,D,nmr):={
@@ -1616,7 +1650,7 @@ return(MetaL);
-\begin{VerbatimOut}[commandchars=?§£]{XcasTabSignQ.cxx}
+\begin{VerbatimOut}[commandchars=?WW]{XcasTabSignQ.cxx}
TSq(nomf,L,Fo,D,nmr):={
L:=apply(f->unapply(f,x),L);
Fo:=apply(f->unapply(f,x),Fo);
@@ -1843,7 +1877,7 @@ return(MetaL);
-\begin{VerbatimOut}[commandchars=?§£]{XcasTabSign.cxx}
+\begin{VerbatimOut}[commandchars=?WW]{XcasTabSign.cxx}
TSa(a,b,c,d,nmr):={
zA:=resoudre(a*x+b=0,x)[0];
zB:=resoudre(c*x+d=0,x)[0];
@@ -1905,7 +1939,7 @@ return(Meta);
-\begin{VerbatimOut}[commandchars=?§£]{XcasTSc.cxx}
+\begin{VerbatimOut}[commandchars=?WW]{XcasTSc.cxx}
TSc(g,D,nmr):={
f:=unapply(g,x);
Z:=NULL;
@@ -2121,7 +2155,7 @@ fclose(Sortie);
\end{VerbatimOut}
\newenvironment{TSa}
-{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCas.user}}
+{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCas.user}}
{\end{VerbatimOut}
\dresse{}
}
@@ -2150,7 +2184,7 @@ fclose(Sortie);
\end{VerbatimOut}
\newenvironment{TSq}%
-{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasQ.user}}
+{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasQ.user}}
{\end{VerbatimOut}\dresse{Q}}
@@ -2158,7 +2192,7 @@ fclose(Sortie);
\newenvironment{TSq*}[1]%
{\setcounter{TVnbis}{\theTVn}
\setcounter{TVn}{#1}
-\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasQ.user}}
+\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasQ.user}}
{\end{VerbatimOut}\dressetoile{Q}}
@@ -2178,14 +2212,14 @@ fclose(Sortie);
\end{VerbatimOut}
\newenvironment{TS}%
-{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasL.user}}
+{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasL.user}}
{\end{VerbatimOut}\dresse{L}}
\newenvironment{TS*}[1]
{\setcounter{TVnbis}{\theTVn}
\setcounter{TVn}{#1}
-\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasL.user}}
+\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasL.user}}
{\end{VerbatimOut}\dressetoile{L}}
@@ -2210,12 +2244,12 @@ fclose(Sortie);
\newenvironment{TSc*}[1]%
{\setcounter{TVnbis}{\theTVn}
\setcounter{TVn}{#1}
-\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTSc.user}}
+\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTSc.user}}
{\end{VerbatimOut}\dressetoile{TSc}}
\newenvironment{TSc}%
-{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTSc.user}}
+{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTSc.user}}
{\end{VerbatimOut}\dresse{TSc}}
@@ -2235,14 +2269,14 @@ fclose(Sortie);
\end{VerbatimOut}
\newenvironment{TV}%
-{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTV.user}}%
+{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTV.user}}%
{\end{VerbatimOut}
\dresse{TV}}
\newenvironment{TV*}[1]{%
\setcounter{TVnbis}{\theTVn}
\setcounter{TVn}{#1}
-\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTV.user}}%
+\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTV.user}}%
{\end{VerbatimOut}\dressetoile{TV}}
@@ -2271,14 +2305,14 @@ fclose(Sortie);
\end{VerbatimOut}
\newenvironment{TVZ}%
-{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVZ.user}}%
+{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTVZ.user}}%
{\end{VerbatimOut}
\dresse{TVZ}}
\newenvironment{TVZ*}[1]{%
\setcounter{TVnbis}{\theTVn}
\setcounter{TVn}{#1}
-\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVZ.user}}%
+\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTVZ.user}}%
{\end{VerbatimOut}\dressetoile{TVZ}}
@@ -2306,14 +2340,14 @@ fclose(Sortie);
\end{VerbatimOut}
\newenvironment{TVapp}%
-{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVapp.user}}%
+{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTVapp.user}}%
{\end{VerbatimOut}
\dresse{TVapp}}
\newenvironment{TVapp*}[1]{%
\setcounter{TVnbis}{\theTVn}
\setcounter{TVn}{#1}
-\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVapp.user}}%
+\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTVapp.user}}%
{\end{VerbatimOut}\dressetoile{TVapp}}
@@ -2342,14 +2376,14 @@ fclose(Sortie);
\end{VerbatimOut}
\newenvironment{TVI}%
-{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVI.user}}%
+{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTVI.user}}%
{\end{VerbatimOut}\dresse{TVI}}
\newenvironment{TVI*}[1]%
{\setcounter{TVnbis}{\theTVn}
\setcounter{TVn}{#1}
-\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVI.user}}%
+\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTVI.user}}%
{\end{VerbatimOut}\dressetoile{TVI}}
@@ -2373,14 +2407,14 @@ fclose(Sortie);
\end{VerbatimOut}
\newenvironment{TVIapp}%
-{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVIapp.user}}%
+{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTVIapp.user}}%
{\end{VerbatimOut}\dresse{TVIapp}}
\newenvironment{TVIapp*}[1]%
{\setcounter{TVnbis}{\theTVn}
\setcounter{TVn}{#1}
-\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVIapp.user}}%
+\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\WW]{XCasTVIapp.user}}%
{\end{VerbatimOut}\dressetoile{TVIapp}}