diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/tablor/Figures.zip | bin | 0 -> 123875 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tablor/tablor.html | 1166 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tablor/tablor.pdf | bin | 205297 -> 268849 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/tablor/tablor.tex | 212 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tablor/tablor.sty | 741 |
5 files changed, 1471 insertions, 648 deletions
diff --git a/Master/texmf-dist/doc/latex/tablor/Figures.zip b/Master/texmf-dist/doc/latex/tablor/Figures.zip Binary files differnew file mode 100644 index 00000000000..4063f1cf6a9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tablor/Figures.zip diff --git a/Master/texmf-dist/doc/latex/tablor/tablor.html b/Master/texmf-dist/doc/latex/tablor/tablor.html index 340911ae97f..928dc35faa2 100644 --- a/Master/texmf-dist/doc/latex/tablor/tablor.html +++ b/Master/texmf-dist/doc/latex/tablor/tablor.html @@ -1,5 +1,5 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<!-- Created by htmlize-1.34 in css mode. --> +<!-- Created by htmlize-1.27 in css mode. --> <html> <head> <title>tablor.sty</title> @@ -8,17 +8,16 @@ body { color: #f5deb3; background-color: #000000; - font-weight: bold; } .comment { /* font-lock-comment-face */ color: #ffd700; background-color: #525252; } - .comment-delimiter { - /* font-lock-comment-delimiter-face */ - color: #ffd700; - background-color: #525252; + .constant { + /* font-lock-constant-face */ + color: #9932cc; + font-weight: bold; } .flyspell-duplicate { /* flyspell-duplicate-face */ @@ -35,7 +34,6 @@ .font-latex-bold { /* font-latex-bold-face */ color: #6b8e23; - font-weight: bold; } .font-latex-math { /* font-latex-math-face */ @@ -46,13 +44,10 @@ color: #d3d3d3; } .font-latex-subscript { - /* font-latex-subscript-face */ - font-size: 80%; } .font-latex-warning { /* font-latex-warning-face */ color: #ff0000; - font-weight: bold; } .function-name { /* font-lock-function-name-face */ @@ -84,78 +79,217 @@ <pre> <span class="font-latex-sedate">\NeedsTeXFormat</span>{LaTeX2e}[1995/12/01] -<span class="font-latex-sedate">\ProvidesPackage</span>{tablor} - [02/02/2008 v1.5 - la machine à créer des tableaux de signes et variations] - - - -<span class="comment-delimiter">%% </span><span class="comment">Crée 10 environnements : -</span><span class="comment-delimiter">%% </span><span class="comment">tableau de signes de 2 facteurs affines -</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TSa} -</span><span class="comment-delimiter">% </span><span class="comment">TSa(-2,3,-1,5,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">); -</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TSa} -</span><span class="comment-delimiter">% </span><span class="comment">%%%%%% Pour des tableaux de plus de 2 facteurs -</span><span class="comment-delimiter">%</span><span class="comment"> -</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TS} -</span><span class="comment-delimiter">% </span><span class="comment">TS([-2*x+3,x^2-1,x^2+1,x-1,x^2-2],[a,b],</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">); -</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TS} -</span><span class="comment-delimiter">%</span><span class="comment"> -</span><span class="comment-delimiter">% </span><span class="comment">pour les tableaux de signes avec quotient -</span><span class="comment-delimiter">%</span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TSq} -</span><span class="comment-delimiter">%</span><span class="comment">TSq("Q",[-2*x+3,-4*x+5],[x^2-16,x-2],[a,b],</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) -</span><span class="comment-delimiter">%%</span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TSq} -</span><span class="comment-delimiter">% </span><span class="comment">un tableau de variation : -</span><span class="comment-delimiter">%</span><span class="comment"> -</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TV} -</span><span class="comment-delimiter">% </span><span class="comment">TV([0,+infinity],[0],"h","x",ln(x)-(ln(x))^2,1,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) -</span><span class="comment-delimiter">% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TV} -</span><span class="comment-delimiter">%</span><span class="comment"> -</span><span class="comment-delimiter">% </span><span class="comment">tableau avec valeurs </span><span class="comment"><span class="flyspell-incorrect">intermédiares</span></span><span class="comment"> -</span><span class="comment-delimiter">%</span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVI} -</span><span class="comment-delimiter">%</span><span class="comment">TVI([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) -</span><span class="comment-delimiter">%</span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVI} -</span><span class="comment-delimiter">%%%</span><span class="comment"> -</span><span class="comment-delimiter">%</span><span class="comment"> -</span><span class="comment-delimiter">% </span><span class="comment">et leurs pendants étoilés qui permet l'affichage intermédiaire du -</span><span class="comment-delimiter">% </span><span class="comment">fichier metapost pour le modifier -</span><span class="comment-delimiter">%</span><span class="comment"> -</span><span class="comment-delimiter">%</span><span class="comment"> -</span><span class="comment-delimiter">%</span><span class="comment"> -</span><span class="comment-delimiter">%</span><span class="comment"> +<span class="font-latex-sedate">\ProvidesPackage</span>{tablor}[19/02/2008 v1.7 la machine à créer des tableaux de signes et variations] + +<span class="comment">% </span><span class="font-latex-sedate"><span class="comment">\copyleft</span></span><span class="comment"> Connan le Barbare </span><span class="font-latex-sedate"><span class="comment">\copyright</span></span><span class="comment"> +% avec l'efficace participation de Jean-Michel </span><span class="comment"><span class="flyspell-incorrect">Boucart</span></span><span class="comment"> +</span> + +<span class="comment">%% Crée 10 environnements : +%% tableau de signes de 2 facteurs affines +% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TSa} +% TSa(-2,3,-1,5,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">); +% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TSa} +% %%%%%% Pour des tableaux de plus de 2 facteurs +% +% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TS} +% TS([-2*x+3,x^</span><span class="comment">2</span><span class="comment">-1,x^</span><span class="comment">2</span><span class="comment">+1,x-1,x^</span><span class="comment">2</span><span class="comment">-2],[a,b],</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">); +% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TS} +% +% pour les tableaux de signes avec quotient +%</span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TSq} +%TSq("Q",[-2*x+3,-4*x+5],[x^</span><span class="comment">2</span><span class="comment">-16,x-2],[a,b],</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +%%</span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TSq} +% un tableau de variation : +% +% </span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TV} +% TV([0,+infinity],[0],"h","x",ln(x)-(ln(x))^</span><span class="comment">2</span><span class="comment">,1,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +% </span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TV} +% +% tableau avec valeurs </span><span class="comment"><span class="flyspell-incorrect">intermédiares</span></span><span class="comment"> +%</span><span class="font-latex-sedate"><span class="comment">\begin</span></span><span class="comment">{TVI} +%TVI([-1,+infinity],[-1],"f","x",x2/sqrt(x+1)-1,1,2,</span><span class="font-latex-sedate"><span class="comment">\tv</span></span><span class="comment">) +%</span><span class="font-latex-sedate"><span class="comment">\end</span></span><span class="comment">{TVI} +%%% +% +% et leurs pendants étoilés qui permet l'affichage intermédiaire du +% fichier metapost pour le modifier +% +% +% +% +</span> + + + +<span class="comment">%% extensions requises +%% Il faudra rajouter dans le préambule </span><span class="font-latex-sedate"><span class="comment">\usepackage</span></span><span class="comment">{graphicx} si vous +%% ne l'avez pas de base +</span> + +<span class="font-latex-sedate">\RequirePackage</span>{ifthen} +<span class="font-latex-sedate">\RequirePackage</span>{fancyvrb} +<span class="font-latex-sedate">\RequirePackage</span>{<span class="flyspell-duplicate">ifpdf</span>} + +<span class="comment">%% liste des options : os et éditeur rapide </span> +<span class="font-latex-sedate">\newboolean</span>{xcas}<span class="font-latex-sedate">\setboolean</span>{xcas}{false} +<span class="font-latex-sedate">\newboolean</span>{linux}<span class="font-latex-sedate">\setboolean</span>{linux}{false} +<span class="font-latex-sedate">\newboolean</span>{windows}<span class="font-latex-sedate">\setboolean</span>{windows}{<span class="flyspell-duplicate">false</span>} +<span class="font-latex-sedate">\newboolean</span>{macosx}<span class="font-latex-sedate">\setboolean</span>{macosx}{<span class="flyspell-duplicate">false</span>} +<span class="font-latex-sedate">\newboolean</span>{emacs}<span class="font-latex-sedate">\setboolean</span>{emacs}{false} +<span class="font-latex-sedate">\newboolean</span>{xemacs}<span class="font-latex-sedate">\setboolean</span>{xemacs}{false} +<span class="font-latex-sedate">\newboolean</span>{texmaker}<span class="font-latex-sedate">\setboolean</span>{texmaker}{<span class="flyspell-duplicate">false</span>} +<span class="font-latex-sedate">\newboolean</span>{vi}<span class="font-latex-sedate">\setboolean</span>{vi}{false} +<span class="font-latex-sedate">\newboolean</span>{winshell}<span class="font-latex-sedate">\setboolean</span>{winshell}{<span class="flyspell-duplicate">false</span>} +<span class="font-latex-sedate">\newboolean</span>{notepad}<span class="font-latex-sedate">\setboolean</span>{notepad}{<span class="flyspell-duplicate">false</span>} +<span class="font-latex-sedate">\newboolean</span>{vim}<span class="font-latex-sedate">\setboolean</span>{vim}{false} +<span class="font-latex-sedate">\newboolean</span>{kate}<span class="font-latex-sedate">\setboolean</span>{kate}{<span class="flyspell-duplicate">false</span>} +<span class="font-latex-sedate">\newboolean</span>{gedit}<span class="font-latex-sedate">\setboolean</span>{gedit}{<span class="flyspell-duplicate">false</span>} +<span class="font-latex-sedate">\newboolean</span>{<span class="flyspell-duplicate">textmate</span>}<span class="font-latex-sedate">\setboolean</span>{<span class="flyspell-duplicate">textmate</span>}{<span class="flyspell-duplicate">false</span>} +<span class="font-latex-sedate">\newboolean</span>{<span class="flyspell-duplicate">texshop</span>}<span class="font-latex-sedate">\setboolean</span>{<span class="flyspell-duplicate">texshop</span>}{<span class="flyspell-duplicate">false</span>} + +<span class="font-latex-sedate">\DeclareOption</span>{xcas}{<span class="font-latex-sedate">\setboolean</span>{xcas}{<span class="flyspell-duplicate">true</span>}} +<span class="font-latex-sedate">\DeclareOption</span>{linux}{<span class="font-latex-sedate">\setboolean</span>{linux}{<span class="flyspell-duplicate">true</span>}} +<span class="font-latex-sedate">\DeclareOption</span>{windows}{<span class="font-latex-sedate">\setboolean</span>{windows}{true}} +<span class="font-latex-sedate">\DeclareOption</span>{mac}{<span class="font-latex-sedate">\setboolean</span>{macosx}{true}} +<span class="font-latex-sedate">\DeclareOption</span>{emacs}{<span class="font-latex-sedate">\setboolean</span>{emacs}{<span class="flyspell-duplicate">true</span>}} +<span class="font-latex-sedate">\DeclareOption</span>{xemacs}{<span class="font-latex-sedate">\setboolean</span>{xemacs}{true}} +<span class="font-latex-sedate">\DeclareOption</span>{<span class="flyspell-duplicate">texmaker</span>}{<span class="font-latex-sedate">\setboolean</span>{texmaker}{<span class="flyspell-duplicate">true</span>}} +<span class="font-latex-sedate">\DeclareOption</span>{vi}{<span class="font-latex-sedate">\setboolean</span>{vi}{<span class="flyspell-duplicate">true</span>}} +<span class="font-latex-sedate">\DeclareOption</span>{winshell}{<span class="font-latex-sedate">\setboolean</span>{winshell}{true}} +<span class="font-latex-sedate">\DeclareOption</span>{notepad}{<span class="font-latex-sedate">\setboolean</span>{notepad}{true}} +<span class="font-latex-sedate">\DeclareOption</span>{vim}{<span class="font-latex-sedate">\setboolean</span>{vim}{<span class="flyspell-duplicate">true</span>}} +<span class="font-latex-sedate">\DeclareOption</span>{<span class="flyspell-duplicate">kate</span>}{<span class="font-latex-sedate">\setboolean</span>{<span class="flyspell-duplicate">kate</span>}{<span class="flyspell-duplicate">true</span>}} +<span class="font-latex-sedate">\DeclareOption</span>{gedit}{<span class="font-latex-sedate">\setboolean</span>{gedit}{<span class="flyspell-duplicate">true</span>}} +<span class="font-latex-sedate">\DeclareOption</span>{<span class="flyspell-duplicate">textmate</span>}{<span class="font-latex-sedate">\setboolean</span>{<span class="flyspell-incorrect">textmate</span>}{<span class="flyspell-duplicate">true</span>}} +<span class="font-latex-sedate">\DeclareOption</span>{<span class="flyspell-duplicate">texshop</span>}{<span class="font-latex-sedate">\setboolean</span>{<span class="flyspell-incorrect">texshop</span>}{<span class="flyspell-duplicate">true</span>}} + + +<span class="comment">%% on peut configurer tablor dans un fichier extérieur +</span> +<span class="font-latex-sedate">\IfFileExists</span>{tablor.cfg}{<span class="font-latex-sedate"><span class="keyword">\input</span></span><span class="constant">{tablor.cfg}</span>}{<span class="font-latex-sedate">\typeout</span>{pas de fichier tablor.<span class="flyspell-duplicate">cfg</span>}} +<span class="font-latex-sedate">\ProcessOptions</span>\relax -<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\nettoyer</span></span><span class="function-name">}</span>{ -<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{rm XCasmp.mp* XCasmp.log XCasmp?.mp* XCasmp?.log XCasmpTV.mp* XCasmpTV.log *.user XCasmpTVI.mp* XCasmpTVI.log - *.giac *.cxx *<span class="flyspell-incorrect">mpx</span>* *~}} +<span class="comment">%% pour ceux compilant via </span><span class="comment"><span class="flyspell-incorrect">pdflatex</span></span><span class="comment"> +</span> +<span class="font-latex-sedate">\ifpdf</span> +<span class="font-latex-sedate">\DeclareGraphicsRule</span>{*}{<span class="flyspell-incorrect">mps</span>}{*}{} +<span class="font-latex-sedate">\fi</span> -<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\bouger</span></span><span class="function-name">}</span>[1]{ -<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{cp XCas* #1}} +<span class="comment">%% pour nettoyer les fichiers auxiliaires +</span> +<span class="font-latex-sedate">\AtEndDocument</span>{<span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{<span class="flyspell-duplicate">windows</span>}}<span class="comment">% +</span>{<span class="font-latex-sedate">\immediate</span>\write18{DEL tete.* *.user XCas*.* Xcas*.* *.<span class="flyspell-duplicate">mpx</span>} } <span class="comment">% +</span>{<span class="font-latex-sedate">\immediate</span>\write18{rm tete.* *.user XCas* Xcas* *.<span class="flyspell-duplicate">mpx</span>} }} -<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\recup</span></span><span class="function-name">}</span>[2]{ -<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="flyspell-duplicate">cp</span> #1 #2}} +<span class="comment">%% En-tête pour le fichier metapost contenant les codes +%% de tous les tableaux produits +</span> + <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{tete.mp} + input tableauVariation; + <span class="flyspell-duplicate">verbatimtex</span> +<span class="comment">%&latex +</span> <span class="font-latex-sedate"><span class="keyword">\documentclass</span></span><span class="function-name">{article}</span> + <span class="font-latex-sedate"><span class="keyword">\usepackage</span></span><span class="variable-name">[upright]</span><span class="function-name">{fourier}</span> + <span class="font-latex-sedate"><span class="keyword">\usepackage</span></span><span class="function-name">{amsmath}</span> + <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\Mathbold</span></span><span class="function-name">}</span>[1]{<span class="font-latex-sedate"><span class="keyword">\mbox</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\boldmath</span></span><span class="function-name"><span class="font-latex-math">$#1$</span></span><span class="font-latex-sedate"><span class="function-name">\unboldmath</span></span><span class="function-name">}</span>} + <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{document}</span> + <span class="flyspell-duplicate">etex</span> + + <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + +<span class="comment">%% Nettoie les fichiers log dont le nom dépend du choix de l'utilisateur +%% Par défaut, c'est le nom du fichier tex courant (</span><span class="font-latex-sedate"><span class="comment">\jobname</span></span><span class="comment">) +%% Clôt le fichier metapost contenant le récapitulatif de tous les tableaux +</span> +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\nettoyer</span></span><span class="function-name">}</span>[1][<span class="font-latex-sedate">\jobname</span>]<span class="comment">% +</span>{<span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{windows}}<span class="comment">% +</span>{<span class="font-latex-sedate">\immediate</span>\write18{DEL #1.Tab.<span class="flyspell-duplicate">log</span>} +<span class="font-latex-sedate">\immediate</span>\write18{echo end >> #1.Tab.<span class="flyspell-duplicate">mp</span>}}<span class="comment">% +</span>{<span class="font-latex-sedate">\immediate</span>\write18{rm #1.Tab.<span class="flyspell-duplicate">log</span>} +<span class="font-latex-sedate">\immediate</span>\write18{echo end >> #1.Tab.<span class="flyspell-duplicate">mp</span>} +} +} -<span class="font-latex-sedate"><span class="keyword">\newcounter</span></span><span class="function-name">{TVn}</span> +<span class="comment">%% Donne comme prefixe aux tableaux le prefixe courant +%% Peut-être modifié par </span><span class="font-latex-sedate"><span class="comment">\initablor</span></span><span class="comment"> +</span> +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\Tableaux</span></span><span class="function-name">}</span>{<span class="font-latex-sedate">\jobname</span>} +<span class="comment">%% initialise les compteurs +</span> +<span class="font-latex-sedate"><span class="keyword">\newcounter</span></span><span class="function-name">{</span><span class="function-name"><span class="flyspell-duplicate">TVn</span></span><span class="function-name">}</span> <span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\tv</span></span><span class="function-name">}</span>{<span class="font-latex-sedate">\theTVn</span>} -<span class="font-latex-sedate"><span class="keyword">\usepackage</span></span><span class="function-name">{fancyvrb}</span> -<span class="comment-delimiter">%</span><span class="font-latex-sedate"><span class="comment">\usepackage</span></span><span class="comment">[upright]{fourier} +<span class="font-latex-sedate"><span class="keyword">\newcounter</span></span><span class="function-name">{TVnbis}</span> +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\tvbis</span></span><span class="function-name">}</span>{<span class="font-latex-sedate">\theTVnbis</span>} + + +<span class="comment">%% permet de donner un prefixe aux tableaux produits (</span><span class="font-latex-sedate"><span class="comment">\jobname</span></span><span class="comment"> par défaut) +%% effectue quelques vérifications : +</span> + +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\initablor</span></span><span class="function-name">}</span>[1][<span class="font-latex-sedate">\jobname</span>]{<span class="comment">% +</span><span class="font-latex-sedate"><span class="keyword">\renewcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\Tableaux</span></span><span class="function-name">}</span>{#1}<span class="comment">% Arret du nom des tableaux +</span><span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{0}</span><span class="comment">% Initialisation du compteur de tableaux. +</span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{xcas}}<span class="comment">% Avec l'option XCas +</span>{<span class="font-latex-sedate">\IfFileExists</span>{<span class="font-latex-sedate">\Tableaux</span>.Tab.mp}<span class="comment">% Si Tableaux.mp est présent... +</span> {<span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{<span class="flyspell-duplicate">windows</span>}} + {<span class="font-latex-sedate">\immediate</span>\write18{DEL <span class="font-latex-sedate">\Tableaux</span>.Tab.mp}}<span class="comment">% le détruire +</span> {<span class="font-latex-sedate">\immediate</span>\write18{rm <span class="font-latex-sedate">\Tableaux</span>.Tab.mp}}}<span class="comment">% +</span> {}<span class="comment">% +</span> +<span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{<span class="flyspell-duplicate">windows</span>}} + {<span class="font-latex-sedate">\immediate</span>\write18{COPY -f tete.mp <span class="font-latex-sedate">\Tableaux</span>.Tab.mp}}<span class="comment">% Reconstituer +</span> <span class="comment">% l'entête de Tableaux.mp +</span> {<span class="font-latex-sedate">\immediate</span>\write18{cp -f tete.mp <span class="font-latex-sedate">\Tableaux</span>.Tab.mp}}} +{<span class="font-latex-sedate">\IfFileExists</span>{<span class="font-latex-sedate">\Tableaux</span>.Tab.mp}<span class="comment">% Sans l'option XCas, si Tableaux.mp existe +</span> {<span class="font-latex-sedate">\immediate</span>\write18{mpost -interaction=batchmode <span class="font-latex-sedate">\Tableaux</span>.Tab}}<span class="comment">% l'exécuter pour reconstituer les figures +</span> {<span class="font-latex-sedate">\PackageWarning</span>{tablor}{Pas de source metapost pour creer les tableaux.}}<span class="comment">% sinon message d'erreur +</span> <span class="comment">% (mais pas d'arret car les tableaux +</span> <span class="comment">% peuvent être présents ) +</span>}}<span class="comment">% +</span> + + +<span class="comment">%% commande pour lancer giac selon l'OS </span> <span class="font-latex-sedate">\makeatletter</span> -<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\executGiacmp</span></span><span class="function-name">}</span>[1]{ -<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{giac <#1 } } +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\executGiacmp</span></span><span class="function-name">}</span>[1]{<span class="comment">% +</span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{<span class="flyspell-duplicate">windows</span>}}<span class="comment">% +</span>{<span class="font-latex-sedate">\immediate</span>\write18{giac #1 }}<span class="comment">% +</span>{<span class="font-latex-sedate">\immediate</span>\write18{giac <#1 }}} <span class="font-latex-sedate">\makeatother</span> + + +<span class="comment">%%% +% +%%% LES SCRIPTS GIAC/</span><span class="comment"><span class="flyspell-incorrect">XCAS</span></span><span class="comment"> +% +%%% +</span> + + + + + + +<span class="comment">%% +%% Code giac/Xcas pour les Tableaux de Variations +%% +</span> + <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTV.cxx} TV(L,F,nom,nomv,f,ftt,nmr):={ -<span class="flyspell-duplicate">nl</span>:=size(L); +nl:=size(L); f:=unapply(f,x); fp:=fonction_derivee(f); Z:=concat(L,F); @@ -163,42 +297,42 @@ 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])); if(kk==1){Z:=append(Z,simplifier(S[j]))}; - fpour + <span class="flyspell-duplicate">fpour</span> fsi; Z:=sort(Z); -<span class="flyspell-duplicate">nz</span>:=size(Z); +nz:=size(Z); si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; fsi; pour u de 1 jusque nz-2 faire si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; fsi; -<span class="flyspell-duplicate">fpour</span>; +fpour; nz:=size(Z); l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); -";<span class="flyspell-duplicate">fpour</span>; +";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:=" +<span class="flyspell-duplicate">lsi</span>:=" newLigneSignes(btex <span class="font-latex-math">$\\hbox{ Signe de }\\atop{\\displaystyle "+nom+"'("+nomv+")}$</span> etex);"+ - if(Z[0]==-<span class="flyspell-duplicate">infinity</span>){if(<span class="flyspell-duplicate">sign</span>(<span class="flyspell-duplicate">evalf</span>(<span class="flyspell-duplicate">fp</span>(if(Z[1]==+infinity){0}else{Z[1]-10^(-5)})))==1){"plus;"}else{"moins;"}}else{if(member(Z[0],F)==0){ - if(<span class="flyspell-duplicate">fp</span>(Z[0])==0){"<span class="flyspell-duplicate">valBarre</span>(<span class="flyspell-duplicate">btex</span> 0 <span class="flyspell-duplicate">etex</span>);"}<span class="flyspell-duplicate">else</span>{" "}+ + 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);"}<span class="flyspell-duplicate">else</span>{" "}+ 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(member(Z[r],F)==0){"valBarre(btex 0 etex);"}<span class="flyspell-duplicate">else</span>{"<span class="flyspell-duplicate">nonDefBarre</span>;"}+ + lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ 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{"<span class="flyspell-duplicate">nomDefBarre</span>; "} -lm0:=limite(f(x),x=Z[0],1)==-<span class="flyspell-duplicate">infinity</span>; +lm0:=limite(f(x),x=Z[0],1)==-infinity; li:=" -<span class="flyspell-duplicate">newLigneVariations</span>(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Variations de }\\atop{\\displaystyle \\Mathbold{"+nom+"}}$</span> etex);"+ +newLigneVariations(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Variations de }\\atop{\\displaystyle \\Mathbold{"+nom+"}}$</span> etex);"+ if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$</span> etex,"} else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$</span> etex,"}+ if(k0==1){"1"}<span class="flyspell-duplicate">else</span>{"0"}+ @@ -206,29 +340,29 @@ lm0:=limite(f(x),x=Z[0],1)==-<span class="flyspell-duplicate">infinity</span>; if(nz>2){ 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; + lmrm:=limite(f(x),x=Z[r],-1)==-infinity;lmrp:=limite(f(x),x=Z[r],1)==-<span class="flyspell-duplicate">infinity</span>; lp:=lp+if(member(Z[r],F)){ - "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}<span class="flyspell-duplicate">else</span>{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}<span class="flyspell-duplicate">else</span>{"0);"}} + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplifier(f(Z[r])))+"$</span> etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); "}}} }; } -<span class="flyspell-duplicate">lnz</span>:=limite(f(x),x=Z[nz-1],-1)==-<span class="flyspell-duplicate">infinity</span>; +lnz:=limite(f(x),x=Z[nz-1],-1)==-infinity; lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"}else{"nonDefBarre;limGauche(btex <span class="font-latex-math">$"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"}+ - if(kz==1){"1);"}<span class="flyspell-duplicate">else</span>{"0); + if(kz==1){"1);"}else{"0); "}; -<span class="flyspell-duplicate">intro</span>:="input tableauVariation; +intro:="input tableauVariation; verbatimtex -<span class="comment-delimiter">%</span><span class="comment">&latex +<span class="comment">%&latex </span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">documentclass</span><span class="function-name">{article}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="variable-name">[upright]</span><span class="function-name">{fourier}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="function-name">{amsmath}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">newcommand</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">Mathbold}</span>[1]{<span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">mbox</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">boldmath</span><span class="function-name"><span class="font-latex-math">$#1$</span></span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">unboldmath}</span>} <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">begin</span><span class="function-name">{document}</span> - <span class="flyspell-duplicate">etex</span> + etex; " @@ -236,57 +370,125 @@ lm0:=limite(f(x),x=Z[0],1)==-<span class="flyspell-duplicate">infinity</span>; MetaL:=if(ftt==2){if(nz>2){intro+"beginTableau("+nmr+")"+ l0+lsi+lsp+lsf+" endTableau; -end";}else{ -<span class="flyspell-duplicate">intro</span>+"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +end +";}else{ +intro+"beginTableau("+nmr+")"+ l0+ lsi+lsf+" endTableau; <span class="flyspell-duplicate">end</span>"; } -}else{ if(ftt==0){if(nz>2){intro+"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +}else{ if(ftt==0){if(nz>2){intro+"beginTableau("+nmr+")"+ l0+ li+ lp+ lf +" -<span class="flyspell-duplicate">endTableau</span>; -<span class="flyspell-duplicate">end</span>";}else{intro+"beginTableau("+nmr+")"+ +endTableau; +end";}else{intro+"beginTableau("+nmr+")"+ l0+ li+ lf +" -<span class="flyspell-duplicate">endTableau</span>; -<span class="flyspell-duplicate">end</span>";}}else{ +endTableau; +end";}}else{ if(nz>2){intro+"beginTableau("+nmr+")"+ l0+ lsi+lsp+lsf+ li+ -<span class="flyspell-duplicate">lp</span>+ -<span class="flyspell-duplicate">lf</span> +lp+ +lf +" endTableau; end";}else{intro+"beginTableau("+nmr+")"+ l0+ -<span class="flyspell-duplicate">lsi</span>+lsf+ +lsi+lsf+ li+ lf +" endTableau; -<span class="flyspell-duplicate">end</span>";} +end";} }} -return(<span class="flyspell-duplicate">MetaL</span>); - }:; +MetaLfc:=if(ftt==2){if(nz>2){" + +beginTableau("+nmr+")"+ + l0+lsi+lsp+lsf+" +endTableau; + +";}else{ +intro+"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+" +endTableau; + +"; +} +}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; + +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi+lsp+lsf+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+ +li+ +lf ++" +endTableau; + +";} +}} + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + +return(MetaL); + }:; <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + +<span class="comment">%% +%% Code giac/Xcas pour les Tableaux de Variations avec +%% Valeurs intermédiaires +%% +</span> + + + + <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTVI.cxx} -<span class="flyspell-duplicate">TVI</span>(L,F,nom,nomv,f,ftt,ao,nmr):={ -<span class="flyspell-duplicate">nl</span>:=size(L); +TVI(L,F,nom,nomv,f,ftt,ao,nmr):={ +nl:=size(L); f:=unapply(f,x); fp:=fonction_derivee(f); Z:=concat(L,F); @@ -298,82 +500,82 @@ S:=resoudre(fp(x),x); fsi; Z:=sort(Z); -<span class="flyspell-duplicate">nz</span>:=size(Z); +nz:=size(Z); si Z[0]==Z[1] alors Z:=augment(Z[0],Z[2..nz-1]);nz:=nz-1; fsi; pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=<span class="flyspell-duplicate">nz</span>-1; + si Z[u]==Z[u+1] alors Z:=augment(Z[0..u-1],Z[u+1..nz-1]);nz:=nz-1; fsi; -<span class="flyspell-duplicate">fpour</span>; +fpour; nz:=size(Z); -l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";<span class="flyspell-duplicate">lsp</span>:=" "; +l0:=" newLigneVariables(btex <span class="font-latex-math">$"+nomv+"$</span> etex);";lp:=" "; lf:=" ";lsp:=" "; LI:=limite(f(x),x,Z[0],1); LF:=limite(f(x),x,Z[nz-1],-1); -<span class="flyspell-duplicate">LP</span>:=NULL; +LP:=NULL; if(nz>2){ for(r:=1; r<=nz-2;r++){LP:=LP,if(member(Z[r],F)){limite(f(x),x,Z[r],-1),limite(f(x),x,Z[r],1)}else{f(Z[r])}}}; -if(nz>2){ LL:=[LI,LP,LF]}else{LL:=[LI,<span class="flyspell-duplicate">LF</span>]}; +if(nz>2){ LL:=[LI,LP,LF]}else{LL:=[LI,LF]}; -<span class="flyspell-duplicate">NL</span>:=size(LL); -A:=NULL;aa:=1;<span class="flyspell-duplicate">kk</span>:=0; +NL:=size(LL); +A:=NULL;aa:=1;kk:=0; if(NL==nz){for(k:=0;k<nz-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0); -if(TestS==0){A:=A,aa;l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";aa:=<span class="flyspell-duplicate">aa</span>+1;}else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"}} -l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> <span class="flyspell-duplicate">etex</span>);"}; +if(TestS==0){A:=A,aa;l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";aa:=aa+1;}else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[k])+"$</span> etex);"}} +l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> etex);"}; if(NL>nz){for(k:=0;k<NL-1;k++){TestS:=(sign(evalf(LL[k]-ao))==sign(evalf(LL[k+1]-ao))) or (sign(evalf(LL[k]-ao))==0.0)or (sign(evalf(LL[k+1]-ao))==0.0); -<span class="flyspell-duplicate">TestL</span>:=(abs(LL[k])==abs(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 <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);"+"val(btex <span class="font-latex-math">$\\alpha_</span><span class="font-latex-subscript"><span class="font-latex-math">"</span></span><span class="font-latex-math">+aa+"$</span> etex);";aa:=aa+1;kk:=kk+1}}else{l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[kk])+"$</span> etex);";kk:=kk+1}} -l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> <span class="flyspell-duplicate">etex</span>); +l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[nz-1])+"$</span> etex); "}; -TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-<span class="flyspell-duplicate">ao</span>))==0.0); +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); 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[<span class="flyspell-duplicate">nz</span>-2],1)); + kz:=evalf(limite(f(x),x=Z[nz-1],-1))> evalf(limite(f(x),x=Z[nz-2],1)); lsi:=" -<span class="flyspell-duplicate">newLigneSignes</span>(btex <span class="font-latex-math">$\\hbox{ Signe de }\\atop{\\displaystyle "+nom+"'("+nomv+")}$</span> etex);"+ - if(Z[0]==-<span class="flyspell-duplicate">infinity</span>){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);"}<span class="flyspell-duplicate">else</span>{" "}+ - if(sign(fp((Z[0]+10^(-10))))==1){"plus;"}else{"moins;"}}else{"<span class="flyspell-duplicate">nonDefBarre</span>;"+ - if(sign(fp(10^(-10)+Z[0]))==1){"plus;"}else{"moins;"} }}+if(TestS==0){"valBarre(btex<span class="font-latex-math">$ $</span> etex);"+ if(sign(<span class="flyspell-duplicate">fp</span>(10^(-10)+Z[0]))==1){"plus;"}else{"moins;"}}<span class="flyspell-duplicate">else</span>{" "}; +newLigneSignes(btex <span class="font-latex-math">$\\hbox{ Signe de }\\atop{\\displaystyle "+nom+"'("+nomv+")}$</span> <span class="flyspell-duplicate">etex</span>);"+ + 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^(-10))))==1){"plus;"}else{"moins;"}}else{"nonDefBarre;"+ + if(sign(fp(10^(-10)+Z[0]))==1){"plus;"}else{"moins;"} }}+if(TestS==0){"valBarre(btex<span class="font-latex-math">$ $</span> etex);"+ if(sign(fp(10^(-10)+Z[0]))==1){"plus;"}else{"moins;"}}else{" "}; -if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-<span class="flyspell-duplicate">ao</span>))==0.0); +if(nz>2){rr:=1; if(nz==NL){for(r:=1; r<=NL-2;r++){ TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); ksp:=evalf(fp(Z[r]+0.01))>0; TestL:=(abs(LL[r])==abs(LL[r+1])); lsp:=lsp+if(member(Z[r],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(ksp==1){"plus;"}else{"moins;"}+if(TestS==0){"valBarre(btex <span class="font-latex-math">$ $</span> etex);"}else{" "}+if(TestS==0){if(ksp==1){"plus;"}else{"moins;"}}else{" "}; }} -<span class="flyspell-duplicate">else</span>{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-<span class="flyspell-duplicate">ao</span>))==0.0); +else{for(r:=1; r<=NL-2;r++){kspp:=evalf(fp(Z[rr]+0.01))>0;TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); TestL:=(abs(LL[r])==abs(LL[r+1])); - if(TestS==0){if( TestL==1 ){lsp:=lsp}else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"<span class="flyspell-duplicate">nonDefBarre</span>;"}+ + if(TestS==0){if( TestL==1 ){lsp:=lsp}else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ if(kspp==1){"plus;"}else{"moins;"}+"valBarre(btex <span class="font-latex-math">$ $</span> etex);"+if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} - } else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"<span class="flyspell-duplicate">nonDefBarre</span>;"}+ - if(kspp==1){"plus;"}else{"moins;"};rr:=<span class="flyspell-duplicate">rr</span>+1;} + } else{lsp:=lsp+if(member(Z[rr],F)==0){"valBarre(btex 0 etex);"}else{"nonDefBarre;"}+ + if(kspp==1){"plus;"}else{"moins;"};rr:=rr+1;} }} }; -<span class="flyspell-duplicate">lsf</span>:=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; -TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))==0.0) or (sign(evalf(LL[1]-<span class="flyspell-duplicate">ao</span>))==0.0); +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:=" -<span class="flyspell-duplicate">newLigneVariations</span>(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Variations de }\\atop{\\displaystyle \\Mathbold{"+nom+"}}$</span> etex); +newLigneVariations(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Variations de }\\atop{\\displaystyle \\Mathbold{"+nom+"}}$</span> etex); "+ if(member(Z[0],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$</span> etex,"} else{"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lm0==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[0],1)))}+"$</span> etex,"}+ - if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);"}<span class="flyspell-duplicate">else</span>{" "}; + if(k0==1){"1);"}else{"0);"}+if(TestS==0){"valPos(btex <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);"}else{" "}; if(nz>2){if(nz==NL){for(r:=1; r<=nz-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); @@ -383,50 +585,50 @@ TestS:=(sign(evalf(LL[0]-ao))==sign(evalf(LL[1]-ao))) or (sign(evalf(LL[0]-ao))= lp:=lp+if(member(Z[r],F)) { "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[r],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplifier(f(Z[r])))+"$</span> - etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+if(TestS==0){"<span class="flyspell-duplicate">valPos</span>(btex - <span class="font-latex-math">$ "+ao+" $</span> <span class="flyspell-duplicate">etex</span>,0.5);" + etex,"+if(sign(evalf(fp(Z[r]-0.01)))==sign(fp(Z[r]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+if(TestS==0){"valPos(btex + <span class="font-latex-math">$ "+ao+" $</span> etex,0.5);" }else{" "}; };//for }else{rr:=1;for(r:=1; r<=NL-2;r++){TestS:=(sign(evalf(LL[r]-ao))==sign(evalf(LL[r+1]-ao))) or (sign(evalf(LL[r]-ao))==0.0)or (sign(evalf(LL[r+1]-ao))==0.0); - krm:=evalf(limite(f(x),x=Z[rr-1],1))< evalf(limite(f(x),x=Z[<span class="flyspell-duplicate">rr</span>],-1)); + krm:=evalf(limite(f(x),x=Z[rr-1],1))< evalf(limite(f(x),x=Z[rr],-1)); krp:=evalf(limite(f(x),x=Z[rr],1))> evalf(limite(f(x),x=Z[rr+1],-1)) ; lmrm:=limite(f(x),x=Z[rr],-1)==-infinity;lmrp:=limite(f(x),x=Z[rr],1)==-infinity; TestL:=(abs(LL[r])==abs(LL[r+1])); if(TestS==0){if( TestL==1 ){lp:=lp}else{ lp:=lp+if(member(Z[rr],F)) { "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplifier(f(Z[rr])))+"$</span> etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0);"}}}+"valPos(btex - <span class="font-latex-math">$ "+ao+" $</span> <span class="flyspell-duplicate">etex</span>,0.5); + <span class="font-latex-math">$ "+ao+" $</span> etex,0.5); ";rr:=rr+1; }// else testL==1 }//testS==0 else{lp:=lp+if(member(Z[rr],F)){ - "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}<span class="flyspell-duplicate">else</span>{"0);"}} + "limGauche(btex <span class="font-latex-math">$"+if(lmrm==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[rr],-1)))}+"$</span> etex,"+if(krm==1){"1);"}else{"0);"}+"nonDefBarre;limDroite(btex <span class="font-latex-math">$"+if(lmrp==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[rr],1)))}+"$</span> etex,"+if(krp==1){"1);"}else{"0);"}} else{"valPos(btex <span class="font-latex-math">$"+latex(simplifier(f(Z[rr])))+"$</span> etex,"+if(sign(evalf(fp(Z[rr]-0.01)))==sign(fp(Z[rr]+0.01))){"0.5);"}else{if(krp==1){"1);"}else{"0); "}}};rr:=rr+1; -}//else <span class="flyspell-duplicate">testS</span>==0 +}//else testS==0 }//for nz<NL -}// else nz<<span class="flyspell-duplicate">NL</span> +}// else nz<NL //if nz=NL };//if nz>2 -<span class="flyspell-duplicate">lnz</span>:=limite(f(x),x=Z[nz-1],-1)==-infinity; - lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"}else{"<span class="flyspell-duplicate">nonDefBarre</span>;limGauche(btex <span class="font-latex-math">$"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$</span> <span class="flyspell-duplicate">etex</span>,"}+ - if(kz==1){"1);"}<span class="flyspell-duplicate">else</span>{"0);"}; +lnz:=limite(f(x),x=Z[nz-1],-1)==-infinity; + lf:=if(member(Z[nz-1],F)==0){"valPos(btex <span class="font-latex-math">$"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"}else{"nonDefBarre;limGauche(btex <span class="font-latex-math">$"+if(lnz==1){"-\\infty"}else{latex(simplifier(limite(f(x),x=Z[nz-1],-1)))}+"$</span> etex,"}+ + if(kz==1){"1);"}else{"0);"}; intro:=" input tableauVariation; verbatimtex -<span class="comment-delimiter">%</span><span class="comment">&latex +<span class="comment">%&latex </span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">documentclass</span><span class="function-name">{article}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="variable-name">[upright]</span><span class="function-name">{fourier}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="function-name">{amsmath}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">newcommand</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">Mathbold}</span>[1]{<span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">mbox</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">boldmath</span><span class="function-name"><span class="font-latex-math">$#1$</span></span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">unboldmath}</span>} <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">begin</span><span class="function-name">{document}</span> - <span class="flyspell-duplicate">etex</span> + etex; "; @@ -434,60 +636,116 @@ verbatimtex MetaL:= if(ftt==2){if(nz>2){intro+"beginTableau("+nmr+")"+ l0+lsi+lsp+lsf+" endTableau; -<span class="flyspell-duplicate">end</span>";}else{ -intro+"beginTableau("+<span class="flyspell-duplicate">nmr</span>+")"+ +end";}else{ +intro+"beginTableau("+nmr+")"+ l0+ lsi+lsf+" endTableau; -<span class="flyspell-duplicate">end</span>"; +end"; } }else{ if(ftt==0){if(nz>2){intro+"beginTableau("+nmr+")"+ l0+ li+ lp+ -<span class="flyspell-duplicate">lf</span> +lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; end";}else{intro+"beginTableau("+nmr+")"+ l0+ li+ -<span class="flyspell-duplicate">lf</span> +lf +" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; end";}}else{ if(nz>2){intro+"beginTableau("+nmr+")"+ l0+ -<span class="flyspell-duplicate">lsi</span>+lsp+lsf+ +lsi+lsp+lsf+ li+ -<span class="flyspell-duplicate">lp</span>+ +lp+ lf +" endTableau; -<span class="flyspell-duplicate">end</span>";}else{intro+"beginTableau("+nmr+")"+ +end";}else{intro+"beginTableau("+nmr+")"+ l0+ -<span class="flyspell-duplicate">lsi</span>+lsf+ +lsi+lsf+ li+ lf +" -<span class="flyspell-duplicate">endTableau</span>; -<span class="flyspell-duplicate">end</span>";} +endTableau; +end";} }}; -return(<span class="flyspell-duplicate">MetaL</span>); - }:; +MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+ + l0+lsi+lsp+lsf+" +endTableau; +";}else{ +"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+" +endTableau; -<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> +"; +} +}else{ +if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi+lsp+lsf+ +li+ +lp+ +lf ++" +endTableau; +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+ +li+ +lf ++" +endTableau; + +";} +}}; + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); +return(MetaL); + }:; + +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> +<span class="comment">%% +%% Code giac/Xcas pour les Tableaux de signes de produits +%% +</span> + <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTabSignL.cxx} @@ -506,13 +764,13 @@ pour k de 0 jusque n-1 faire if(S[j]>mini and S[j]<maxi){Z:=Z,simplifier(S[j]);} fpour; fsi; -<span class="flyspell-duplicate">fpour</span>; +fpour; Z:=sort(Z); -<span class="flyspell-duplicate">nz</span>:=size(Z); +nz:=size(Z); if(nz>2){pour u de 1 jusque nz-2 faire si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1; fsi; -<span class="flyspell-duplicate">fpour</span>;}; +fpour;}; nz:=size(Z); if(nz==0){li:="";l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; @@ -522,40 +780,54 @@ if(mini!=-infinity and L[p](mini)==0){" valBarre(btex 0 etex);"}else{" "}+ if(L[p]((mini+maxi)*0.5>0)){"plus;"}else{"moins;"}+if(maxi!=+infinity and L[p](maxi)==0){" - valBarre(btex 0 etex);"}<span class="flyspell-duplicate">else</span>{" + valBarre(btex 0 etex);"}else{" "} } lf:=if(product(L[s]((mini+maxi)*.5),s,0,n-1)>0){"plus;"}else{"moins;"}; MetaL:=" input tableauVariation; - <span class="flyspell-duplicate">verbatimtex</span> -<span class="comment-delimiter">%</span><span class="comment">&latex + verbatimtex +<span class="comment">%&latex </span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">documentclass</span><span class="function-name">{article}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="variable-name">[upright]</span><span class="function-name">{fourier}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="function-name">{amsmath}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">newcommand</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">Mathbold}</span>[1]{<span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">mbox</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">boldmath</span><span class="function-name"><span class="font-latex-math">$#1$</span></span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">unboldmath}</span>} <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">begin</span><span class="function-name">{document}</span> - etex - beginTableau("+nmr+") + etex; + +beginTableau("+nmr+") newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex); "+l0+li+ " - newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe du }\\atop{{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> produit}}$</span> <span class="flyspell-duplicate">etex</span>);"+ + newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe du }\\atop{{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> produit}}$</span> etex);"+ if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" valBarre(btex 0 etex);"}else{" "}+ lf+ if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" valBarre(btex 0 etex);"}else{" "}+" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; end" ; -}<span class="flyspell-duplicate">else</span>{ - +MetaLfc:=" beginTableau("+nmr+") +newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex); + "+l0+li+ + " + newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe du }\\atop{{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> produit}}$</span> etex);"+ + if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}+ lf+ + if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}+" +endTableau; +" +; +}else{ l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);";li:=" ";lr:=" "; pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); @@ -565,9 +837,9 @@ l0:=l0+"val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; for(p:=0;p<=n-1;p++){lp:=""; li:=li+" -newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(L[p](x))+"}}$</span> <span class="flyspell-duplicate">etex</span>);"+ +newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(L[p](x))+"}}$</span> etex);"+ if(mini!=-infinity and L[p](mini)==0){" - valBarre(btex 0 etex);"}else{" + valBarre(btex 0 etex);"}<span class="flyspell-duplicate">else</span>{" "}+ if(L[p](Z[0]-0.01)>0){"plus;"}else{"moins;"}; @@ -580,7 +852,7 @@ newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="f li:=li+lp+ 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(maxi!=+infinity and L[p](maxi)==0){" - valBarre(btex 0 etex);"}<span class="flyspell-duplicate">else</span>{" + valBarre(btex 0 etex);"}else{" "} }; @@ -589,15 +861,15 @@ pour t de 0 jusque nz-2 faire lr:=lr+if(product(L[s]((Z[t]+Z[t+1])*.5),s,0,n-1)>0){"plus;"}else{"moins;"}+"valBarre(btex 0 etex);" fpour -MetaL:=" input <span class="flyspell-duplicate">tableauVariation</span>; +MetaL:=" input tableauVariation; verbatimtex -<span class="comment-delimiter">%</span><span class="comment">&latex +<span class="comment">%&latex </span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">documentclass</span><span class="function-name">{article}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="variable-name">[upright]</span><span class="function-name">{fourier}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="function-name">{amsmath}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">newcommand</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">Mathbold}</span>[1]{<span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">mbox</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">boldmath</span><span class="function-name"><span class="font-latex-math">$#1$</span></span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">unboldmath}</span>} <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">begin</span><span class="function-name">{document}</span> - etex + etex; beginTableau("+nmr+") newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex); "+l0+ @@ -606,18 +878,41 @@ newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex " newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe du }\\atop{{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> produit}}$</span> etex);"+ if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" - valBarre(btex 0 etex);"}<span class="flyspell-duplicate">else</span>{" + valBarre(btex 0 etex);"}else{" "}+ - if(product(L[s](Z[0]-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+"valBarre(btex 0 etex);"+ + if(product(L[s](Z[0]-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+"valBarre(<span class="flyspell-duplicate">btex</span> 0 etex);"+ lr+ if(product(L[s](Z[nz-1]+0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" valBarre(btex 0 etex);"}else{" "}+" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; end" -;} -return(<span class="flyspell-duplicate">MetaL</span>); +; +MetaLfc:=" beginTableau("+nmr+") +newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex); + "+l0+ + li + + + " + newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe du }\\atop{{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> produit}}$</span> etex);"+ + if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}+ + if(product(L[s](Z[0]-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+"valBarre(btex 0 etex);"+ + lr+ + if(product(L[s](Z[nz-1]+0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ + if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}+" +endTableau; + + "; +} +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); +return(MetaL); }:; <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> @@ -625,9 +920,10 @@ return(<span class="flyspell-duplicate">MetaL</span>); - - - +<span class="comment">%% +%% Code giac/Xcas pour les Tableaux de signes de quotients +%% +</span> <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTabSignQ.cxx} @@ -648,7 +944,7 @@ pour k de 0 jusque n-1 faire if(S[j]>mini and S[j]<maxi){Z:=Z,simplifier(S[j]);} fpour; fsi; -<span class="flyspell-duplicate">fpour</span>; +fpour; pour k de 0 jusque m-1 faire @@ -667,39 +963,39 @@ nz:=size(Z); if(nz>2){pour u de 1 jusque nz-2 faire si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1; // pour les zéros en double fsi; -<span class="flyspell-duplicate">fpour</span>;} +fpour;} Z:=sort(Z); nz:=size(Z); if(nz>2){pour u de 1 jusque nz-2 faire - si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=<span class="flyspell-duplicate">nz</span>-1; + si Z[u]==Z[u+1] alors Z:=Z[0..u-1],Z[u+1..nz-1];nz:=nz-1; fsi; fpour;}; nz:=size(Z); if(nz==0){li:="";l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; for(p:=0;p<=n-1;p++){li:=li+" -<span class="flyspell-duplicate">newLigneSignes</span>(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(L[p](x))+"}}$</span> etex);"+ +newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(L[p](x))+"}}$</span> etex);"+ if(mini!=-infinity and L[p](mini)==0){" valBarre(btex 0 etex);"}else{" "}+ if(L[p]((mini+maxi)*0.5>0)){"plus;"}else{"moins;"}+if(maxi!=+infinity and L[p](maxi)==0){" - valBarre(btex 0 etex);"}<span class="flyspell-duplicate">else</span>{" + valBarre(btex 0 etex);"}else{" "} } lf:=if(product(L[s]((mini+maxi)*.5),s,0,n-1)>0){"plus;"}else{"moins;"}; -MetaL:=" input <span class="flyspell-duplicate">tableauVariation</span>; +MetaL:=" input tableauVariation; verbatimtex -<span class="comment-delimiter">%</span><span class="comment">&latex +<span class="comment">%&latex </span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">documentclass</span><span class="function-name">{article}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="variable-name">[upright]</span><span class="function-name">{fourier}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="function-name">{amsmath}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">newcommand</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">Mathbold}</span>[1]{<span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">mbox</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">boldmath</span><span class="function-name"><span class="font-latex-math">$#1$</span></span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">unboldmath}</span>} <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">begin</span><span class="function-name">{document}</span> - etex + etex; beginTableau("+nmr+") newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex); @@ -708,20 +1004,44 @@ newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe }\\atop{{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> de "+nomf+"(x)}}$</span> etex);"+ if(member(mini,FF)==0){if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" valBarre(btex 0 etex);"}else{" - "}}else{"nonDefBarre;"}+ <span class="flyspell-duplicate">lf</span>+ + "}}else{"nonDefBarre;"}+ lf+ if(member(maxi,FF)==0){if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+" endTableau; end" ; -}<span class="flyspell-duplicate">else</span>{ + + + + +MetaLfc:=" +beginTableau("+nmr+") +newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex); + "+l0+li+ + " + newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe }\\atop{{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> de "+nomf+"(x)}}$</span> etex);"+ + if(member(mini,FF)==0){if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}}else{"nonDefBarre;"}+ lf+ + if(member(maxi,FF)==0){if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}}else{"nonDefBarre;"}+" +endTableau; + +" +; + + + + +}else{ l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);";li:=" ";lr:=" "; pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); ";fpour; -l0:=l0+"val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> <span class="flyspell-duplicate">etex</span>);"; +l0:=l0+"val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; for(p:=0;p<=n-1;p++){lp:=""; @@ -748,18 +1068,18 @@ newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="f pour t de 0 jusque nz-2 faire lr:=lr+if(product(L[s]((Z[t]+Z[t+1])*.5),s,0,n-1)>0){"plus;"}else{"moins;"}+ - if(member(Z[t+1],FF)==0){"valBarre(btex 0 etex);"}else{ "<span class="flyspell-duplicate">nonDefBarre</span>;"} + if(member(Z[t+1],FF)==0){"valBarre(btex 0 etex);"}else{ "nonDefBarre;"} fpour MetaL:=" input tableauVariation; -<span class="flyspell-duplicate">verbatimtex</span> -<span class="comment-delimiter">%</span><span class="comment">&latex +verbatimtex +<span class="comment">%&latex </span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">documentclass</span><span class="function-name">{article}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="variable-name">[upright]</span><span class="function-name">{fourier}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="function-name">{amsmath}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">newcommand</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">Mathbold}</span>[1]{<span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">mbox</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">boldmath</span><span class="function-name"><span class="font-latex-math">$#1$</span></span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">unboldmath}</span>} <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">begin</span><span class="function-name">{document}</span> - etex + etex; beginTableau("+nmr+") newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex); "+l0+ @@ -769,37 +1089,86 @@ newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe }\\atop{{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> de"+nomf+"(x)}}$</span> etex);"+ if(member(mini,FF)==0){if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" valBarre(btex 0 etex);"}else{" - "}}else{"<span class="flyspell-duplicate">nonDefBarre</span>;"}+ + "}}else{"nonDefBarre;"}+ if(product(L[s](Z[0]-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ if(member(Z[0],FF)==0){"valBarre(btex 0 etex);"}else{ "nonDefBarre;"}+ lr+ if(product(L[s](Z[nz-1]+0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ if(member(maxi,FF)==0){if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+" -<span class="flyspell-duplicate">endTableau</span>; +endTableau; end" -;} -return(<span class="flyspell-duplicate">MetaL</span>); +; + + + + +MetaLfc:=" +beginTableau("+nmr+") +newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex); + "+l0+ + li + + + " + newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe }\\atop{{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> de"+nomf+"(x)}}$</span> etex);"+ + if(member(mini,FF)==0){if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}}else{"nonDefBarre;"}+ + if(product(L[s](Z[0]-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ + if(member(Z[0],FF)==0){"valBarre(btex 0 etex);"}else{ "nonDefBarre;"}+ + lr+ + if(product(L[s](Z[nz-1]+0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ + if(member(maxi,FF)==0){if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+" +endTableau; + +" + + +} + + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + + + + +return(MetaL); }:; <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> + + + +<span class="comment">%% Code giac/Xcas pour les Tableaux de signes du produit +%% de 2 facteurs affines +%% +</span> + + + <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XcasTabSign.cxx} TSa(a,b,c,d,nmr):={ zA:=resoudre(a*x+b=0,x)[0]; zB:=resoudre(c*x+d=0,x)[0]; -<span class="flyspell-duplicate">zmin</span>:=min(zA,zB); +zmin:=min(zA,zB); zmax:=max(zA,zB); - Meta:= " input <span class="flyspell-duplicate">tableauVariation</span>; + Meta:= " input tableauVariation; verbatimtex -<span class="comment-delimiter">%</span><span class="comment">&latex +<span class="comment">%&latex </span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">documentclass</span><span class="function-name">{article}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="variable-name">[upright]</span><span class="function-name">{fourier}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="function-name">{amsmath}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">newcommand</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">Mathbold}</span>[1]{<span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">mbox</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">boldmath</span><span class="function-name"><span class="font-latex-math">$#1$</span></span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">unboldmath}</span>} <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">begin</span><span class="function-name">{document}</span> - etex - beginTableau("+<span class="flyspell-duplicate">nmr</span>+") + etex; + beginTableau("+nmr+") newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex); val(btex <span class="font-latex-math">$-\\infty$</span> etex);val(btex <span class="font-latex-math">$"+latex(zmin)+"$</span> etex); val(btex <span class="font-latex-math">$"+latex(zmax)+"$</span>etex); @@ -812,25 +1181,25 @@ val(btex <span class="font-latex-math">$+\\infty$</span> etex); if(zmin==zA){"barre;"}else{"valBarre(btex 0 etex);"}+ if(a>0){"plus;"}else{"moins;"} +" -<span class="flyspell-duplicate">newLigneSignes</span>(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe de }\\atop{\\displaystyle \\Mathbold{"+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+"}}$</span> etex);" +newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe de }\\atop{\\displaystyle \\Mathbold{"+if(c==1){"x+"}else{if(c==-1){"-x+"}else{c+"x+"}}+d+"}}$</span> 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} else{si c>0 alors "moins;"; sinon "plus;"; fsi}+ - if(zmin==zB){"barre;"}else{"valBarre(btex 0 <span class="flyspell-duplicate">etex</span>);"}+ + if(zmin==zB){"barre;"}else{"valBarre(btex 0 etex);"}+ if(c>0){"plus;"}else{"moins;"} +" newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> 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+")}}$</span> etex);" - + si a*c>0 alors plus; sinon moins;<span class="flyspell-duplicate">fsi</span>+";"+ + + si a*c>0 alors plus; sinon moins;fsi+";"+ "valBarre(btex 0 etex);"+ si a*c>0 alors moins; sinon plus;fsi+";"+ "valBarre(btex 0 etex);"+ si a*c>0 alors plus; sinon moins;fsi+";"+" endTableau; -<span class="flyspell-duplicate">end</span>" +end" ; -return(<span class="flyspell-duplicate">Meta</span>); +return(Meta); }:; <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> @@ -839,12 +1208,10 @@ return(<span class="flyspell-duplicate">Meta</span>); - - - - - - +<span class="comment">%% +%% Code giac/Xcas pour les Tableaux de Signes d'expression ne contenant +%% qu'un seul terme +</span> @@ -873,53 +1240,78 @@ nz:=size(Z); l0:=" ";li:=" ";lr:=" "; if(nz==0){l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; li:=if(mini!=-infinity and f(mini)==0){" - valBarre(btex 0 etex);"}<span class="flyspell-duplicate">else</span>{" + valBarre(btex 0 etex);"}else{" "}+ if(f((mini+maxi)*0.5>0)){"plus;"}else{"moins;"}; -lf:=if(maxi!=+infinity and f(<span class="flyspell-duplicate">maxi</span>)==0){" +lf:=if(maxi!=+infinity and f(maxi)==0){" valBarre(btex 0 etex);"}else{" "}; }else{ l0:="val(btex <span class="font-latex-math">$"+latex(D[0])+"$</span> etex);";li:=" "; -pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> <span class="flyspell-duplicate">etex</span>); +pour m de 0 jusque nz-1 faire l0:=l0+"val(btex <span class="font-latex-math">$"+latex(Z[m])+"$</span> etex); "; fpour; l0:=l0+"val(btex <span class="font-latex-math">$"+latex(D[1])+"$</span> etex);"; li:= if(mini!=-infinity and f(mini)==0){" - valBarre(btex 0 etex);"}<span class="flyspell-duplicate">else</span>{" + valBarre(btex 0 etex);"}else{" "}+ if(f(Z[0]-0.01)>0){"plus;"}else{"moins;"}+if(simplifier(f(Z[0]))==0){"valBarre(btex 0 etex);"}else{"barre;"}; lm:=if(nz>=2){for(r:=0; r<=nz-2;r++){if(f((Z[r]+Z[r+1])*.5)>0){"plus;"}else{"moins;"}+ if(simplifier(f(Z[r+1]))==0){"valBarre(btex 0 etex);"}else{"barre;"} - }}<span class="flyspell-duplicate">else</span>{" "}; + }}else{" "}; lf:=if(f(Z[nz-1]+1.0)>0){"plus;"}else{"moins;"}+if(maxi!=+infinity and f(maxi)==0){"valBarre(btex 0 etex);"}else{" "}; }}; -<span class="flyspell-duplicate">MetaL</span>:=" input tableauVariation; +MetaL:=" input tableauVariation; verbatimtex -<span class="comment-delimiter">%</span><span class="comment">&latex +<span class="comment">%&latex </span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">documentclass</span><span class="function-name">{article}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="variable-name">[upright]</span><span class="function-name">{fourier}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">usepackage</span><span class="function-name">{amsmath}</span> <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">newcommand</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">Mathbold}</span>[1]{<span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">mbox</span><span class="function-name">{</span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">boldmath</span><span class="function-name"><span class="font-latex-math">$#1$</span></span><span class="function-name"><span class="font-latex-warning">\\</span></span><span class="function-name">unboldmath}</span>} <span class="font-latex-warning">\</span><span class="keyword"><span class="font-latex-warning">\</span></span><span class="keyword">begin</span><span class="function-name">{document}</span> - etex + etex; beginTableau("+nmr+") newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex); "+l0+" -<span class="flyspell-duplicate">newLigneSignes</span>(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(f(x))+"}}$</span> <span class="flyspell-duplicate">etex</span>);"+ +newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(f(x))+"}}$</span> etex);"+ li+lm+lf +" endTableau; end" ; -<span class="flyspell-duplicate">return</span>(MetaL); + + +MetaLfc:=" + +beginTableau("+nmr+") +newLigneVariables(btex <span class="font-latex-math">$\\Mathbold{x}$</span> etex); + "+l0+" +newLigneSignes(btex <span class="font-latex-math">$\\hbox{\</span><span class="font-latex-bold"><span class="font-latex-math">\bf</span></span><span class="font-latex-math"> Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(f(x))+"}}$</span> etex);"+ + li+lm+lf + +" +endTableau; + +" +; + + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + + + +return(MetaL); }:; <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> @@ -929,14 +1321,84 @@ end" +<span class="comment">%% +%% +%% traitement des fichiers produits par giac/</span><span class="comment"><span class="flyspell-duplicate">xcas</span></span><span class="comment"> +%% +%% +</span> -<span class="comment-delimiter">%%% </span><span class="comment">les "</span><span class="comment"><span class="flyspell-duplicate">giac</span></span><span class="comment">" -</span> +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\dresse</span></span><span class="function-name">}</span>[1]{<span class="comment">% +</span><span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{xcas}}{<span class="comment">% Avec l'option "XCas présent" +</span> <span class="font-latex-sedate">\executGiacmp</span>{XCas#1.giac}<span class="comment">% reconstituer le tableau +</span> <span class="comment">% exporter le source mp +</span> <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{windows}}<span class="comment">% +</span> {<span class="font-latex-sedate">\immediate</span>\write18{TYPE XCasmpfc.mp >> <span class="font-latex-sedate">\Tableaux</span>.Tab.<span class="flyspell-duplicate">mp</span>}}<span class="comment">% +</span> {<span class="font-latex-sedate">\immediate</span>\write18{cat XCasmpfc.mp >> <span class="font-latex-sedate">\Tableaux</span>.Tab.mp}}<span class="comment">% +</span> <span class="font-latex-sedate">\immediate</span>\write18{mpost -interaction=batchmode -jobname=<span class="font-latex-sedate">\Tableaux</span>.Tab XCasmp#1}}<span class="comment">% +</span> {<span class="comment">% sinon, si le tableau est absent, alerte. +</span> <span class="font-latex-sedate">\IfFileExists</span>{<span class="font-latex-sedate">\Tableaux</span>.Tab.<span class="font-latex-sedate">\theTVn</span>}{}{<span class="comment">% +</span> <span class="font-latex-sedate">\PackageError</span>{tablor}{Tableau absent non + reconstituable.}{Pour compiler il faut, soit les fichiers de + tableaux, soit le fichier <span class="font-latex-sedate">\Tableaux</span>.Tab.mp, soit disposer de + XCas.}}} + +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> + <span class="font-latex-sedate">\includegraphics</span>{<span class="font-latex-sedate">\Tableaux</span>.Tab.<span class="font-latex-sedate">\theTVn</span>} +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> +<span class="font-latex-sedate">\stepcounter</span>{<span class="flyspell-duplicate">TVn</span>}} + + +<span class="comment">%% +%% traitement des fichiers produits par giac/xcas avec possibilité +%% de modifier le fichier metapost (environnement étoilé)) +%% +</span> + +<span class="font-latex-sedate"><span class="keyword">\newcommand</span></span><span class="function-name">{</span><span class="font-latex-sedate"><span class="function-name">\dressetoile</span></span><span class="function-name">}</span>[1]{<span class="comment">% +</span><span class="font-latex-sedate">\IfFileExists</span>{<span class="font-latex-sedate">\Tableaux</span>.Tab.<span class="font-latex-sedate">\theTVn</span>}{<span class="comment">% Test sur l'existence du tableau +% Si oui, inclusion du fichier source de sauvegarde mp dans Tableaux +</span><span class="font-latex-sedate">\immediate</span>\write18{cat TSav-<span class="font-latex-sedate">\theTVn</span>.mp >> <span class="font-latex-sedate">\Tableaux</span>.Tab.mp}} +<span class="comment">% Si non, lancement des opérations de fabrication +</span>{<span class="font-latex-sedate">\executGiacmp</span>{XCas#1.giac}<span class="comment">% +</span> <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{emacs}}{<span class="font-latex-sedate">\immediate</span>\write18{emacs XCasmpfc.mp}}{} + <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{xemacs}}{<span class="font-latex-sedate">\immediate</span>\write18{xemacs XCasmpfc.<span class="flyspell-duplicate">mp</span>}}{} + <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{texmaker}}{<span class="font-latex-sedate">\immediate</span>\write18{texmaker XCasmpfc.<span class="flyspell-duplicate">mp</span>}}{} + <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{vi}}{<span class="font-latex-sedate">\immediate</span>\write18{vi XCasmpfc.mp}}{} + <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{winshell}}{<span class="font-latex-sedate">\immediate</span>\write18{winshell XCasmpfc.mp}}{} + <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{notepad}}{<span class="font-latex-sedate">\immediate</span>\write18{notepad XCasmpfc.mp}}{} + <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{vim}}{<span class="font-latex-sedate">\immediate</span>\write18{vim XCasmpfc.mp}}{} + <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{<span class="flyspell-duplicate">kate</span>}}{<span class="font-latex-sedate">\immediate</span>\write18{kate XCasmpfc.<span class="flyspell-duplicate">mp</span>}}{} + <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{gedit}}{<span class="font-latex-sedate">\immediate</span>\write18{gedit XCasmpfc.<span class="flyspell-duplicate">mp</span>}}{} + <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{<span class="flyspell-duplicate">textmate</span>}}{<span class="font-latex-sedate">\immediate</span>\write18{<span class="flyspell-duplicate">textmate</span> <span class="flyspell-duplicate">XCasmpfc</span>.<span class="flyspell-duplicate">mp</span>}}{} + <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{<span class="flyspell-duplicate">texshop</span>}}{<span class="font-latex-sedate">\immediate</span>\write18{<span class="flyspell-duplicate">texshop</span> <span class="flyspell-duplicate">XCasmpfc</span>.<span class="flyspell-duplicate">mp</span>}}{} + <span class="comment">% Modification avec l'éditeur choisi +</span> + <span class="font-latex-sedate">\ifthenelse</span>{<span class="font-latex-sedate">\boolean</span>{windows}}<span class="comment">% +</span> {<span class="font-latex-sedate">\immediate</span>\write18{cp -f XCasmpfc.mp TSav-<span class="font-latex-sedate">\theTVn</span>.<span class="flyspell-duplicate">mp</span>} + <span class="font-latex-sedate">\immediate</span>\write18{cat XCasmpfc.mp >> <span class="font-latex-sedate">\Tableaux</span>.Tab.<span class="flyspell-duplicate">mp</span>}}<span class="comment">% +</span> {<span class="font-latex-sedate">\immediate</span>\write18{cp -f XCasmpfc.mp TSav-<span class="font-latex-sedate">\theTVn</span>.mp} <span class="comment">% Sauvegarde du +</span> <span class="comment">% source mp sur le disque pour une +</span> <span class="comment">% inclusion ultérieure dans Tableaux.mp. +</span> <span class="font-latex-sedate">\immediate</span>\write18{cat XCasmpfc.mp >> <span class="font-latex-sedate">\Tableaux</span>.Tab.mp}} <span class="comment">% Inclusion du +</span> <span class="comment">% source dans le +</span> <span class="comment">% fichier +</span> <span class="comment">% Tableaux +</span> <span class="font-latex-sedate">\immediate</span>\write18{mpost -interaction=batchmode <span class="font-latex-sedate">\Tableaux</span>.Tab}}<span class="comment">% Reconstitution des tableaux +</span> <span class="comment">% et création du dernier. L'option +</span> <span class="comment">% pallie l'absence de end en fin de +</span> <span class="comment">% fichier +</span> +<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> + <span class="font-latex-sedate">\includegraphics</span>{<span class="font-latex-sedate">\Tableaux</span>.Tab.<span class="font-latex-sedate">\theTVn</span>} +<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVnbis</span></span><span class="variable-name">}</span> <span class="comment">% Restauration du compteur </span><span class="comment"><span class="flyspell-duplicate">TVn</span></span><span class="comment"> +</span>} @@ -944,30 +1406,39 @@ end" +<span class="comment">%% +%% +%%% +%%% +%%% les "giac" qui permettent d'exécuter la commande rentrée dans le fichier </span><span class="comment"><span class="flyspell-duplicate">tex</span></span><span class="comment"> +%%% suivis des environnements qui permettront la saisie du code giac/xcas +%%% Les versions étoilées permettent de modifier le code metapost produit initialement +%%% +</span> <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCas.giac} maple_mode(0); -<span class="flyspell-duplicate">read</span>("XcasTabSign.cxx"); +read("XcasTabSign.cxx"); Sortie:=fopen("XCasmp.mp"); -vect.xcas.user := read("XCas.user"); -vxo := vect.xcas.user; +<span class="flyspell-duplicate">vect</span>.xcas.user := read("XCas.user"); +<span class="flyspell-duplicate">vxo</span> := vect.xcas.user; dim.vxo := dim(vxo); nbr.line.vxo := dim.vxo; -<span class="flyspell-duplicate">Resultat</span>:=cat(" "); +Resultat:=cat(" "); rslt := vxo[0]; RslT:=cat(rslt); <span class="flyspell-duplicate">Resultat</span>:=cat(Resultat,RslT); <span class="flyspell-duplicate">fprint</span>(Sortie,Unquoted,Resultat); fclose(Sortie); <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> -<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TSa}</span> -{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCas.user}} +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{</span><span class="function-name"><span class="flyspell-duplicate">TSa</span></span><span class="function-name">}</span> +{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="keyword">\begin</span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCas.user}} {<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> - <span class="font-latex-sedate">\executGiacmp</span>{XCas.<span class="flyspell-duplicate">giac</span>} + <span class="font-latex-sedate">\executGiacmp</span>{XCas.giac} - <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost XCasmp} + <span class="font-latex-sedate">\immediate</span>\write18{mpost <span class="flyspell-duplicate">XCasmp</span>} <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> <span class="font-latex-sedate">\includegraphics</span>{XCasmp.<span class="font-latex-sedate">\theTVn</span>} @@ -985,204 +1456,114 @@ fclose(Sortie); <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasQ.giac} maple_mode(0); -<span class="flyspell-duplicate">read</span>("XcasTabSignQ.cxx"); +read("XcasTabSignQ.cxx"); Sortie:=fopen("XCasmpQ.mp"); -vect.xcas.user := read("XCasQ.user"); -vxo := vect.xcas.user; +<span class="flyspell-duplicate">vect</span>.xcas.user := read("XCasQ.user"); +<span class="flyspell-duplicate">vxo</span> := vect.xcas.user; dim.vxo := dim(vxo); nbr.line.vxo := dim.vxo; -<span class="flyspell-duplicate">Resultat</span>:=cat(" "); +Resultat:=cat(" "); rslt := vxo[0]; RslT:=cat(rslt); -Resultat:=cat(Resultat,RslT); -fprint(Sortie,Unquoted,Resultat); +<span class="flyspell-duplicate">Resultat</span>:=cat(Resultat,RslT); +<span class="flyspell-duplicate">fprint</span>(Sortie,Unquoted,Resultat); fclose(Sortie); <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> -<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TSq}</span> -{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasQ.user}} -{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> - <span class="font-latex-sedate">\executGiacmp</span>{XCasQ.<span class="flyspell-duplicate">giac</span>} - - <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost XCasmpQ} - -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> - <span class="font-latex-sedate">\includegraphics</span>{XCasmpQ.<span class="font-latex-sedate">\theTVn</span>} -<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> -<span class="font-latex-sedate">\stepcounter</span>{<span class="flyspell-duplicate">TVn</span>} -} - - - -<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{</span><span class="function-name"><span class="flyspell-duplicate">TSq</span></span><span class="function-name">*}</span> -{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasQ.user}} -{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> - <span class="font-latex-sedate">\executGiacmp</span>{XCasQ.<span class="flyspell-duplicate">giac</span>} - - - - -<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{texmaker XCasmpQ.mp} - - <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost XCasmpQ} - -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> - <span class="font-latex-sedate">\includegraphics</span>{XCasmpQ.<span class="font-latex-sedate">\theTVn</span>} -<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> -<span class="font-latex-sedate">\stepcounter</span>{<span class="flyspell-duplicate">TVn</span>} -} +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{</span><span class="function-name"><span class="flyspell-duplicate">TSq</span></span><span class="function-name">}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="keyword">\begin</span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasQ.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dresse</span>{Q}} +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{</span><span class="function-name"><span class="flyspell-duplicate">TSq</span></span><span class="function-name">*}</span>[1]<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="keyword">\begin</span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasQ.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{Q}} <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasL.giac} -maple_mode(0); +<span class="flyspell-duplicate">maple</span>_mode(0); read("XcasTabSignL.cxx"); Sortie:=fopen("XCasmpL.mp"); -<span class="flyspell-duplicate">vect</span>.xcas.user := read("XCasL.user"); +vect.xcas.user := read("XCasL.user"); vxo := vect.xcas.user; -dim.vxo := dim(vxo); -nbr.line.vxo := dim.vxo; +<span class="flyspell-duplicate">dim</span>.vxo := dim(vxo); +<span class="flyspell-duplicate">nbr</span>.line.vxo := dim.vxo; Resultat:=cat(" "); rslt := vxo[0]; RslT:=cat(rslt); -<span class="flyspell-duplicate">Resultat</span>:=cat(Resultat,RslT); +Resultat:=cat(Resultat,RslT); fprint(Sortie,Unquoted,Resultat); -fclose(Sortie); +<span class="flyspell-duplicate">fclose</span>(Sortie); <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> -<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{</span><span class="function-name"><span class="flyspell-duplicate">TS</span></span><span class="function-name">}</span> -{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasL.user}} -{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> - <span class="font-latex-sedate">\executGiacmp</span>{XCasL.giac} - - <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost <span class="flyspell-duplicate">XCasmpL</span>} - -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> - <span class="font-latex-sedate">\includegraphics</span>{XCasmpL.<span class="font-latex-sedate">\theTVn</span>} -<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> -<span class="font-latex-sedate">\stepcounter</span>{<span class="flyspell-duplicate">TVn</span>} -} - - - -<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TS*}</span> -{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasL.user}} -{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> - <span class="font-latex-sedate">\executGiacmp</span>{XCasL.<span class="flyspell-duplicate">giac</span>} - -<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{texmaker XCasmpL.mp} - - <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost XCasmpL} - -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> - <span class="font-latex-sedate">\includegraphics</span>{XCasmpL.<span class="font-latex-sedate">\theTVn</span>} -<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> -<span class="font-latex-sedate">\stepcounter</span>{<span class="flyspell-duplicate">TVn</span>} -} - - +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TS}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="keyword">\begin</span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasL.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dresse</span>{L}} +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TS*}</span>[1] +{<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="keyword">\begin</span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasL.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{L}} <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTSc.giac} maple_mode(0); -<span class="flyspell-duplicate">read</span>("XcasTSc.cxx"); +read("XcasTSc.cxx"); Sortie:=fopen("XCasmpTSc.mp"); -vect.xcas.user := read("XCasTSc.user"); +<span class="flyspell-duplicate">vect</span>.xcas.user := read("XCasTSc.user"); vxo := vect.xcas.user; dim.vxo := dim(vxo); nbr.line.vxo := dim.vxo; -<span class="flyspell-duplicate">Resultat</span>:=cat(" "); -rslt := vxo[0]; RslT:=cat(rslt); -Resultat:=cat(Resultat,RslT); +Resultat:=cat(" "); +<span class="flyspell-duplicate">rslt</span> := vxo[0]; RslT:=cat(rslt); +<span class="flyspell-duplicate">Resultat</span>:=cat(Resultat,RslT); fprint(Sortie,Unquoted,Resultat); fclose(Sortie); <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> -<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TSc*}</span> -{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTSc.user}} -{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> - <span class="font-latex-sedate">\executGiacmp</span>{XCasTSc.<span class="flyspell-duplicate">giac</span>} - -<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="flyspell-duplicate">texmaker</span> XCasmpTSc.mp} - - - <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost XCasmpTSc} - -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> - <span class="font-latex-sedate">\includegraphics</span>{XCasmpTSc.<span class="font-latex-sedate">\theTVn</span>} -<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> -<span class="font-latex-sedate">\stepcounter</span>{<span class="flyspell-duplicate">TVn</span>} -} - - - - - - -<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TSc}</span> -{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTSc.user}} -{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> - <span class="font-latex-sedate">\executGiacmp</span>{XCasTSc.giac} - - <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost XCasmpTSc} - -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> - <span class="font-latex-sedate">\includegraphics</span>{XCasmpTSc.<span class="font-latex-sedate">\theTVn</span>} -<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> -<span class="font-latex-sedate">\stepcounter</span>{TVn} -} +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TSc*}</span>[1]<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{</span><span class="variable-name"><span class="flyspell-duplicate">TVn</span></span><span class="variable-name">}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="keyword">\begin</span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTSc.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{TSc}} +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TSc}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="keyword">\begin</span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTSc.user}} +{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dresse</span>{<span class="flyspell-duplicate">TSc</span>}} <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTV.giac} maple_mode(0); read("XcasTV.cxx"); Sortie:=fopen("XCasmpTV.mp"); -vect.xcas.user := read("XCasTV.user"); +<span class="flyspell-duplicate">vect</span>.xcas.user := read("XCasTV.user"); vxo := vect.xcas.user; dim.vxo := dim(vxo); -<span class="flyspell-duplicate">nbr</span>.line.vxo := dim.vxo; +nbr.line.vxo := dim.vxo; Resultat:=cat(" "); -rslt := vxo[0]; RslT:=cat(rslt); -Resultat:=cat(Resultat,RslT); +<span class="flyspell-duplicate">rslt</span> := vxo[0]; RslT:=cat(rslt); +<span class="flyspell-duplicate">Resultat</span>:=cat(Resultat,RslT); fprint(Sortie,Unquoted,Resultat); fclose(Sortie); <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> -<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TV}</span><span class="comment">% -</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTV.user}}<span class="comment">% -</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="comment">% -</span> <span class="font-latex-sedate">\executGiacmp</span>{XCasTV.giac} - <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost XCasmpTV} -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> - <span class="font-latex-sedate">\includegraphics</span>{XCasmpTV.<span class="font-latex-sedate">\theTVn</span>} -<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> -<span class="font-latex-sedate">\stepcounter</span>{<span class="flyspell-duplicate">TVn</span>} -} - - - - -<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TV*}</span><span class="comment">% -</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTV.user}}<span class="comment">% -</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="comment">% -</span> <span class="font-latex-sedate">\executGiacmp</span>{XCasTV.<span class="flyspell-duplicate">giac</span>} - -<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="flyspell-incorrect">texmaker</span> <span class="flyspell-duplicate">XCasmpTV</span>.<span class="flyspell-duplicate">mp</span>} - - <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost XCasmpTV} -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> - <span class="font-latex-sedate">\includegraphics</span>{XCasmpTV.<span class="font-latex-sedate">\theTVn</span>} -<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> -<span class="font-latex-sedate">\stepcounter</span>{TVn} -} +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{</span><span class="function-name"><span class="flyspell-duplicate">TV</span></span><span class="function-name">}</span><span class="comment">% +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="keyword">\begin</span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTV.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> +<span class="font-latex-sedate">\dresse</span>{TV}} +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{</span><span class="function-name"><span class="flyspell-duplicate">TV</span></span><span class="function-name">*}</span>[1]{<span class="comment">% +</span><span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="keyword">\begin</span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTV.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="flyspell-duplicate">TV</span>}} <span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>{XCasTVI.giac} @@ -1197,43 +1578,30 @@ Resultat:=cat(" "); rslt := vxo[0]; RslT:=cat(rslt); Resultat:=cat(Resultat,RslT); fprint(Sortie,Unquoted,Resultat); -fclose(Sortie); +<span class="flyspell-duplicate">fclose</span>(Sortie); <span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span> <span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVI}</span><span class="comment">% -</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTVI.user}}<span class="comment">% -</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="comment">% -</span> <span class="font-latex-sedate">\executGiacmp</span>{XCasTVI.<span class="flyspell-duplicate">giac</span>} - <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost XCasmpTVI} -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> - <span class="font-latex-sedate">\includegraphics</span>{XCasmpTVI.<span class="font-latex-sedate">\theTVn</span>} -<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> +</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="keyword">\begin</span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTVI.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dresse</span>{<span class="flyspell-duplicate">TVI</span>}} -<span class="font-latex-sedate">\stepcounter</span>{<span class="flyspell-duplicate">TVn</span>} -} -<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVI*}</span><span class="comment">% -</span>{<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTVI.user}}<span class="comment">% -</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="comment">% -</span> <span class="font-latex-sedate">\executGiacmp</span>{XCasTVI.<span class="flyspell-duplicate">giac</span>} +<span class="font-latex-sedate"><span class="keyword">\newenvironment</span></span><span class="function-name">{TVI*}</span>[1]<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVnbis}{</span><span class="font-latex-sedate"><span class="variable-name">\theTVn</span></span><span class="variable-name">}</span> +<span class="font-latex-sedate"><span class="keyword">\setcounter</span></span><span class="variable-name">{TVn}{#1}</span> +<span class="font-latex-sedate">\VerbatimEnvironment</span><span class="keyword">\begin</span><span class="function-name">{VerbatimOut}</span>[commandchars=<span class="font-latex-warning">\\</span>£µ]{XCasTVI.user}}<span class="comment">% +</span>{<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{VerbatimOut}</span><span class="font-latex-sedate">\dressetoile</span>{<span class="flyspell-duplicate">TVI</span>}} -<span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{<span class="flyspell-duplicate">texmaker</span> XCasmpTVI.mp} - <span class="font-latex-sedate">\immediate</span><span class="font-latex-sedate">\write</span>18{mpost XCasmpTVI} -<span class="font-latex-sedate"><span class="keyword">\begin</span></span><span class="function-name">{center}</span> - <span class="font-latex-sedate">\includegraphics</span>{XCasmpTVI.<span class="font-latex-sedate">\theTVn</span>} -<span class="font-latex-sedate"><span class="keyword">\end</span></span><span class="function-name">{center}</span> -<span class="font-latex-sedate">\stepcounter</span>{<span class="flyspell-duplicate">TVn</span>} -} -<span class="comment-delimiter">%%</span><span class="comment"> -</span><span class="comment-delimiter">%% </span><span class="comment">Zi </span><span class="comment"><span class="flyspell-duplicate">end</span></span><span class="comment"> +<span class="comment">%% +%% Zi end -> </span><span class="comment"><span class="flyspell-incorrect">enjoy</span></span><span class="comment"> :) </span></pre> </body> </html> diff --git a/Master/texmf-dist/doc/latex/tablor/tablor.pdf b/Master/texmf-dist/doc/latex/tablor/tablor.pdf Binary files differindex be728b7f5ae..930fd232d83 100644 --- a/Master/texmf-dist/doc/latex/tablor/tablor.pdf +++ b/Master/texmf-dist/doc/latex/tablor/tablor.pdf diff --git a/Master/texmf-dist/doc/latex/tablor/tablor.tex b/Master/texmf-dist/doc/latex/tablor/tablor.tex index c7f07278895..6985fab4232 100644 --- a/Master/texmf-dist/doc/latex/tablor/tablor.tex +++ b/Master/texmf-dist/doc/latex/tablor/tablor.tex @@ -1,9 +1,9 @@ \documentclass[12pt]{article} \usepackage[height=250mm,width=183mm]{geometry} \usepackage[upright]{fourier} -\usepackage{tablor} +\usepackage[linux,xcas,texmaker]{tablor} \usepackage{preambule} -\usepackage[dvips,colorlinks=true]{hyperref} +\usepackage[dvips,colorlinks=true,linkcolor=orange]{hyperref} @@ -21,15 +21,16 @@ keywordstyle =\color{0.2white}\usefont{OT1}{cmtt}{b}{n},basicstyle=\ttfamily,com \title{\texttt{tablor.sty} \\La machine à créer des tableaux de signes et de variations } -\author{Guillaume \textsc{Connan} \\ \href{http://gconnan.free.fr}{http://gconnan.free.fr}} +\author{Guillaume \textsc{Connan} \\ \href{http://gconnan.free.fr}{http://gconnan.free.fr}\\ +avec l'efficace participation de Jean-Michel \textsc{Boucart}} -\date{23 janvier 2008 - Version 1.4} +\date{19 février 2008 - Version 1.7} \begin{document} \maketitle - +\initablor \section{Ça sert à quoi~?} @@ -101,10 +102,9 @@ pour installer une nouvelle extension \LaTeX{}. \item il faut avoir à disposition l'extension \texttt{fancyvrb}; -\item pour ceux qui compilent avec \texttt{pdf\LaTeX{}}, il faut avoir effectué les petits réglages - nécessaires à l'utilisation de figures produites par \Prog{MetaPOST}; Pour cela, il suffit de - rajouter dans le préambule~:\\ - \verb+\DeclareGraphicsRule{*}{mps}{*}{}+ +\item pour ceux qui compilent avec \texttt{pdf\LaTeX{}}, il n'y a aucun problème car \texttt{tablor} + contient déjà ce qu'il faut~: + \verb+\ifpdf \DeclareGraphicsRule{*}{mps}{*}{} \fi+ \item il faut installer le fichier \texttt{tablor.sty} dans son \texttt{texmf} personnel. @@ -116,10 +116,7 @@ pour installer une nouvelle extension \LaTeX{}. \begin{figure} \begin{DANGER} - Pour les utilisateurs de Microsoft Windows, remplacer \verb+\immediate\write18{giac<#1 }+ par \verb+\immediate\write18{giac #1 }+ -dans le fichier \texttt{tablor.sty} - pour permettre le \texttt{shell-escape} -\smallskip + Pour les utilisateurs de TeXnicCenter, observez cette \href{http://img221.imageshack.us/img221/27/capture20080114215233hu7.png}{explication} du paramétrage du \texttt{shell-escape}. On peut par exemple mettre~:\\ @@ -128,7 +125,7 @@ Sur TeXmaker, c'est \texttt{latex -enable-write18 --shell-escape -interaction=no \smallskip -Pour faire comprendre à XP où trouver \Prog{giac}, vous pouvez modifier le \texttt{path} en suivant +Pour faire comprendre à \texttt{Microsoft Windows XP} où trouver \Prog{giac}, vous pouvez modifier le \texttt{path} en suivant ces instructions~: \\ Demarrer->Panneau de configuration->Système onglet Avancé->Variable d'environnement.\\ Le séparateur est le point virgule. @@ -148,7 +145,8 @@ Le séparateur est le point virgule. \begin{figure} \begin{DANGER} - Quatre nouvelles commandes sont crées~:~\verb+\tv, \nettoyer, \bouger, \recup,\executGiacmp+. + Huit nouvelles commandes sont crées~:~\verb+\tv, \tvbis, \nettoyer, \initablor, \Tableaux,+ + \verb+ \dresse, \dressetoile, \executGiacmp+. Attention aux conflits si de tels noms existent quelque part dans vos fichiers personnels. \end{DANGER} @@ -170,8 +168,8 @@ Le fichier \texttt{tablor.sty} est codé en \texttt{latin-1}. Certains devront \subsection{Préambule} -Les ECM donnés en exemple correspondent à une compilation \texttt{\LaTeX{}+dvi+dvips}. Pour \texttt{pdf\LaTeX{}}, -rajouter \verb+\DeclareGraphicsRule{*}{mps}{*}{}+. +Les ECM donnés en exemple ne dépendent pas du moteur de compilation~:~\texttt{\LaTeX{}+dvi+dvips} ou +\texttt{pdf\LaTeX{}} conviennent. Le préambule sera toujours~: @@ -179,8 +177,10 @@ Le préambule sera toujours~: \begin{lstlisting} \documentclass{article} -\usepackage{graphicx,tablor} +\usepackage{graphicx} +\usepackage[french]{babel} \usepackage[upright]{fourier} +\usepackage[xcas,linux,emacs]{tablor} % options modifiables \end{lstlisting} @@ -196,6 +196,88 @@ Le préambule sera toujours~: \end{figure} + +\subsection{Les options}\label{option} + + +Il existe trois types d'options~: + +\begin{description} + \item[\texttt{xcas} ou rien] : on met \texttt{xcas} si l'on a installé \Prog{giac/XCAS} sur son + ordinateur et on ne met rien si \Prog{giac/XCAS} n'est pas installé et qu'on a récupéré un + fichier \texttt{tex} avec les fichiers sources \Prog{MetaPOST}; Ainsi, \texttt{tablor} ne fera + pas appel à \Prog{giac/XCAS} et se contentera de compiler les fichiers \Prog{MetaPOST}; + \item[OS] : on entrera en option selon les cas \texttt{linux}, \texttt{mac} ou \texttt{windows}; + \item[éditeur] : on entrera en option un éditeur qui sera appelé dans certains cas pour modifier + l'aspect des tableaux dans les fichiers sources \Prog{MetaPOST}. Il faudra choisir un éditeur + parmi \texttt{emacs, xemacs, texmaker, vi, winshell, notepad, vim, kate, gedit, + textmate,texshop}. Voir aussi le paragraphe~\vref{modif}. + +\end{description} + + +\subsection{Initialisation de \texttt{tablor} et préfixe des tableaux}\label{prefix} + + +Les fichiers \Prog{MetaPOST} des tableaux sont regroupés dans un fichier de suffixe +\texttt{.Tab.mp}. Le préfixe est par défaut celui du fichier \texttt{tex} appelant +\texttt{tablor}. Il est possible, pour des raisons de classement personnel, de modifier ce préfixe à +la suite du \verb+\begin{document}+ en entrant~: + + \begin{lstlisting} +\initablor + \end{lstlisting} + +si l'on veut avoir comme préfixe le préfixe courant (obtenu par \verb+\jobname+) ou bien~: + + \begin{lstlisting} +\initablor[Waouh] + \end{lstlisting} + +si l'on veut que le fichier \Prog{MetaPOST} des tableaux s'appelle \verb+Waouh.Tab.mp+ + +\medskip + +Si tout s'est bien passé, on doit supprimer les fichiers \texttt{log} de \Prog{MetaPOST} et clore le +fichier \texttt{.Tab.mp} en entrant juste avant \verb+\end{document}+ la commande~: + +\begin{lstlisting} + \nettoyer +\end{lstlisting} + + +ou bien, selon les cas~: + +\begin{lstlisting} +\nettoyer[Waouh] + \end{lstlisting} + + + +\medskip + +\textbf{En résumé}, notre fichier \texttt{tex} aura cette ossature~: + + +\begin{lstlisting} +\documentclass{article} +\usepackage{graphicx} +\usepackage[french]{babel} +\usepackage[upright]{fourier} +\usepackage[xcas,linux,emacs]{tablor} % options modifiables + +\begin{document} + +\initablor + +... + +\nettoyer + +\end{document} +\end{lstlisting} + + \subsection{Tableaux des variations} L'environnement s'appelle \texttt{TV}. On utilise une commande au format \texttt{XCAS}~: @@ -477,91 +559,88 @@ TSc((x-10)*(x+5),[-10,10],\tv) -\section{Nettoyage} +% \section{Nettoyage} -L'extension \texttt{tablor} contient également une commande \verb+\nettoyer+, qui, comme son nom -l'indique, fait le ménage~:~on efface tous les fichiers auxiliaires créés et on garde uniquement les -fichiers eps créés par \Prog{MetaPOST} ayant une extension sous forme de numéro. +% L'extension \texttt{tablor} contient également une commande \verb+\nettoyer+, qui, comme son nom +% l'indique, fait le ménage~:~on efface tous les fichiers auxiliaires créés et on garde uniquement les +% fichiers eps créés par \Prog{MetaPOST} ayant une extension sous forme de numéro. -Il suffit de taper \verb+\nettoyer+ juste avant le \verb+\end{document}+ +% Il suffit de taper \verb+\nettoyer+ juste avant le \verb+\end{document}+ -\begin{figure} - \begin{DANGER} - Pour les utilisateurs de Microsoft Windows, il faudra remplacer \texttt{rm} par \texttt{DEL} - \end{DANGER} - \end{figure} +% \begin{figure} +% \begin{DANGER} +% Pour les utilisateurs de Microsoft Windows, il faudra remplacer \texttt{rm} par \texttt{DEL} +% \end{DANGER} +% \end{figure} -\smallskip +% \smallskip -On peut également stocker les tableaux dans un autre dossier avec la commande -\verb+\bouger{destination}+, qui, comme son nom l'indique, copie les fichiers eps vers -\texttt{destination}. Il faudra le taper après \verb+\nettoyer+ +% On peut également stocker les tableaux dans un autre dossier avec la commande +% \verb+\bouger{destination}+, qui, comme son nom l'indique, copie les fichiers eps vers +% \texttt{destination}. Il faudra le taper après \verb+\nettoyer+ -\begin{lstlisting} -\nettoyer -\bouger{/home/moi/Desktop/} +% \begin{lstlisting} +% \nettoyer +% \bouger{/home/moi/Desktop/} -\end{document} +% \end{document} -\end{lstlisting} +% \end{lstlisting} -\begin{figure} - \begin{DANGER} - Pour les utilisateurs de Microsoft Windows, il faudra remplacer \texttt{cp} par \texttt{XCOPY} - \end{DANGER} - \end{figure} +% \begin{figure} +% \begin{DANGER} +% Pour les utilisateurs de Microsoft Windows, il faudra remplacer \texttt{cp} par \texttt{XCOPY} +% \end{DANGER} +% \end{figure} -\section{Comment modifier les tableaux à partir des fichiers MetaPOST~?} +\section{Comment modifier les tableaux à partir des fichiers MetaPOST~?}\label{modif} +\subsection{Tableau par tableau} + Il est impossible de prévoir toutes les requêtes des différents utilisateurs. Le style du tableau produit peut néanmoins vous déplaire. Vous pouvez le modifier en intervenant directement sur le -fichier MetaPOST crée pour chaque tableau. Pour cela, il suffit d'ajouter une étoile au nom de -l'environnement utilisé. +fichier \Prog{MetaPOST} créé pour chaque tableau. Pour cela, il suffit d'ajouter une étoile au nom de +l'environnement utilisé et de donner un numéro à votre nouvelle figure pour qu'elle ne soit pas +écrasée par les compilations suivantes. Numérotez à partir de 100 par exemple. Si vous tapez~: \begin{lstlisting} -\begin{TV*} +\begin{TV*}{100} TV([-1,+infinity],[],"f","x",x-ln(x+1),1,\tv) \end{TV*} \end{lstlisting} -le logiciel \TeX maker est directement lancé et le fichier MetaPOST correspondant à votre tableau +l'éditeur que vous avez mis en option (voir le paragraphe~\vref{option}) est directement lancé et le fichier +\Prog{MetaPOST} correspondant à votre tableau qui portera le numéro 100 est affiché. Vous pouvez alors le modifier, taper sur \Ctrl + \keystroke{S} pour l'enregistrer et -\Ctrl + \keystroke{Q} pour fermer \TeX maker. La compilation s'achève alors automatiquement comme +\Ctrl + \keystroke{Q} pour fermer l'éditeur\footnote{Ces combinaisons de touches correspondent à la + plupart des éditeurs mais ne sont pas universelles : vérifiez pour celui que vous avez choisi.}. La compilation s'achève alors automatiquement comme pour un environnement non étoilé. -\begin{figure} - \begin{Idee} - Le logiciel \TeX maker a été choisi car il est libre, multi-plateforme et très rapide - de chargement. Vous pouvez tout à fait changer d'éditeur en modifiant le fichier - \texttt{tablor.sty}~:~il suffit de remplacer chaque occurrence de \texttt{texmaker} - par le nom de votre éditeur. - \end{Idee} - \end{figure} Par exemple, je tape~: \begin{lstlisting} -\begin{TS*} +\begin{TS*}{100} TS([3*x+2,5*x^2-1],[-50,50],\tv) \end{TS*} \end{lstlisting} -et apparaît une fenêtre \TeX maker avec le fichier correspondant au tableau. Je le modifie à +et apparaît une fenêtre de l'éditeur (ici \TeX maker) avec le fichier correspondant au tableau. Je le modifie à volonté~: \begin{center} - \includegraphics{capture.eps} + \includegraphics[height=9cm]{capture.eps} \end{center} @@ -570,12 +649,23 @@ automatiquement pour m'afficher le tableau voulu~: \begin{center} - \begin{TS*} + \begin{TS*}{101} TS([3*x+2,5*x^2-1],[-50,50],\tv) \end{TS*} \end{center} + +Une fois la modification faite, on ne vous redemandera pas d'effectuer de modifications, sauf si +vous changez le numéro de la figure. + +\subsection{Traitement global dans un unique fichier MetaPOST}\label{global} + +Un fichier \texttt{préfixe.Tab.mp} est créé où sont copiés les sources de chaque tableau. Vous pouvez +ainsi retravailler globalement sur les tableaux si besoin ou les transmettre à une personne n'ayant +pas installé \Prog{XCAS}. Voir le paragraphe~\vref{prefix} pour plus de détails. + + \section{Merci...} \bez @@ -795,7 +885,7 @@ TSc((x-10)*(x+10),[-10,10],\tv) \tableofcontents -%\nettoyer +\nettoyer diff --git a/Master/texmf-dist/tex/latex/tablor/tablor.sty b/Master/texmf-dist/tex/latex/tablor/tablor.sty index e6e687caf78..d83cf27ab00 100644 --- a/Master/texmf-dist/tex/latex/tablor/tablor.sty +++ b/Master/texmf-dist/tex/latex/tablor/tablor.sty @@ -1,9 +1,9 @@ \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{tablor} - [02/02/2008 v1.5 - la machine à créer des tableaux de signes et variations] +\ProvidesPackage{tablor}[19/02/2008 v1.7 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 10 environnements : @@ -43,32 +43,171 @@ -\newcommand{\nettoyer}{ -\immediate\write18{rm XCasmp.mp* XCasmp.log XCasmp?.mp* XCasmp?.log XCasmpTV.mp* XCasmpTV.log *.user XCasmpTVI.mp* XCasmpTVI.log - *.giac *.cxx *mpx* *~}} +%% extensions requises +%% Il faudra rajouter dans le préambule \usepackage{graphicx} si vous +%% ne l'avez pas de base -\newcommand{\bouger}[1]{ -\immediate\write18{cp XCas* #1}} +\RequirePackage{ifthen} +\RequirePackage{fancyvrb} +\RequirePackage{ifpdf} -\newcommand{\recup}[2]{ -\immediate\write18{cp #1 #2}} +%% liste des options : os et éditeur rapide +\newboolean{xcas}\setboolean{xcas}{false} +\newboolean{linux}\setboolean{linux}{false} +\newboolean{windows}\setboolean{windows}{false} +\newboolean{macosx}\setboolean{macosx}{false} +\newboolean{emacs}\setboolean{emacs}{false} +\newboolean{xemacs}\setboolean{xemacs}{false} +\newboolean{texmaker}\setboolean{texmaker}{false} +\newboolean{vi}\setboolean{vi}{false} +\newboolean{winshell}\setboolean{winshell}{false} +\newboolean{notepad}\setboolean{notepad}{false} +\newboolean{vim}\setboolean{vim}{false} +\newboolean{kate}\setboolean{kate}{false} +\newboolean{gedit}\setboolean{gedit}{false} +\newboolean{textmate}\setboolean{textmate}{false} +\newboolean{texshop}\setboolean{texshop}{false} -\newcounter{TVn} +\DeclareOption{xcas}{\setboolean{xcas}{true}} +\DeclareOption{linux}{\setboolean{linux}{true}} +\DeclareOption{windows}{\setboolean{windows}{true}} +\DeclareOption{mac}{\setboolean{macosx}{true}} +\DeclareOption{emacs}{\setboolean{emacs}{true}} +\DeclareOption{xemacs}{\setboolean{xemacs}{true}} +\DeclareOption{texmaker}{\setboolean{texmaker}{true}} +\DeclareOption{vi}{\setboolean{vi}{true}} +\DeclareOption{winshell}{\setboolean{winshell}{true}} +\DeclareOption{notepad}{\setboolean{notepad}{true}} +\DeclareOption{vim}{\setboolean{vim}{true}} +\DeclareOption{kate}{\setboolean{kate}{true}} +\DeclareOption{gedit}{\setboolean{gedit}{true}} +\DeclareOption{textmate}{\setboolean{textmate}{true}} +\DeclareOption{texshop}{\setboolean{texshop}{true}} + + +%% on peut configurer tablor dans un fichier extérieur + +\IfFileExists{tablor.cfg}{\input{tablor.cfg}}{\typeout{pas de fichier tablor.cfg}} + +\ProcessOptions\relax + +%% pour ceux compilant via pdflatex + +\ifpdf +\DeclareGraphicsRule{*}{mps}{*}{} +\fi +%% pour nettoyer les fichiers auxiliaires + +\AtEndDocument{\ifthenelse{\boolean{windows}}% +{\immediate\write18{DEL tete.* *.user XCas*.* Xcas*.* *.mpx} } % +{\immediate\write18{rm tete.* *.user XCas* Xcas* *.mpx} }} + + + +%% En-tête pour le fichier metapost contenant les codes +%% de tous les tableaux produits + + \begin{VerbatimOut}{tete.mp} + input tableauVariation; + verbatimtex +%&latex + \documentclass{article} + \usepackage[upright]{fourier} + \usepackage{amsmath} + \newcommand{\Mathbold}[1]{\mbox{\boldmath$#1$\unboldmath}} + \begin{document} + etex + + \end{VerbatimOut} + +%% Nettoie les fichiers log dont le nom dépend du choix de l'utilisateur +%% Par défaut, c'est le nom du fichier tex courant (\jobname) +%% Clôt le fichier metapost contenant le récapitulatif de tous les tableaux + + +\newcommand{\nettoyer}[1][\jobname]% +{\ifthenelse{\boolean{windows}}% +{\immediate\write18{DEL #1.Tab.log} +\immediate\write18{echo end >> #1.Tab.mp}}% +{\immediate\write18{rm #1.Tab.log} +\immediate\write18{echo end >> #1.Tab.mp} +} +} + +%% Donne comme prefixe aux tableaux le prefixe courant +%% Peut-être modifié par \initablor + +\newcommand{\Tableaux}{\jobname} + +%% initialise les compteurs + +\newcounter{TVn} \newcommand{\tv}{\theTVn} -\usepackage{fancyvrb} -%\usepackage[upright]{fourier} +\newcounter{TVnbis} +\newcommand{\tvbis}{\theTVnbis} + + +%% permet de donner un prefixe aux tableaux produits (\jobname par défaut) +%% effectue quelques vérifications : + + +\newcommand{\initablor}[1][\jobname]{% +\renewcommand{\Tableaux}{#1}% Arret du nom des tableaux +\setcounter{TVn}{0}% Initialisation du compteur de tableaux. +\ifthenelse{\boolean{xcas}}% Avec l'option XCas +{\IfFileExists{\Tableaux.Tab.mp}% Si Tableaux.mp est présent... + {\ifthenelse{\boolean{windows}} + {\immediate\write18{DEL \Tableaux.Tab.mp}}% le détruire + {\immediate\write18{rm \Tableaux.Tab.mp}}}% + {}% + +\ifthenelse{\boolean{windows}} + {\immediate\write18{COPY -f tete.mp \Tableaux.Tab.mp}}% Reconstituer + % l'entête de Tableaux.mp + {\immediate\write18{cp -f tete.mp \Tableaux.Tab.mp}}} +{\IfFileExists{\Tableaux.Tab.mp}% Sans l'option XCas, si Tableaux.mp existe + {\immediate\write18{mpost -interaction=batchmode \Tableaux.Tab}}% l'exécuter pour reconstituer les figures + {\PackageWarning{tablor}{Pas de source metapost pour creer les tableaux.}}% sinon message d'erreur + % (mais pas d'arret car les tableaux + % peuvent être présents ) +}}% + + + +%% commande pour lancer giac selon l'OS \makeatletter -\newcommand{\executGiacmp}[1]{ -\immediate\write18{giac <#1 } } +\newcommand{\executGiacmp}[1]{% +\ifthenelse{\boolean{windows}}% +{\immediate\write18{giac #1 }}% +{\immediate\write18{giac <#1 }}} \makeatother + + +%%% +% +%%% LES SCRIPTS GIAC/XCAS +% +%%% + + + + + + + +%% +%% Code giac/Xcas pour les Tableaux de Variations +%% + + \begin{VerbatimOut}{XcasTV.cxx} TV(L,F,nom,nomv,f,ftt,nmr):={ nl:=size(L); @@ -144,7 +283,7 @@ intro:="input tableauVariation; \\usepackage{amsmath} \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}} \\begin{document} - etex + etex; " @@ -152,7 +291,8 @@ intro:="input tableauVariation; MetaL:=if(ftt==2){if(nz>2){intro+"beginTableau("+nmr+")"+ l0+lsi+lsp+lsf+" endTableau; -end";}else{ +end +";}else{ intro+"beginTableau("+nmr+")"+ l0+ lsi+lsf+" @@ -191,12 +331,79 @@ endTableau; end";} }} + + +MetaLfc:=if(ftt==2){if(nz>2){" + +beginTableau("+nmr+")"+ + l0+lsi+lsp+lsf+" +endTableau; + +";}else{ +intro+"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+" +endTableau; + +"; +} +}else{ if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; + +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi+lsp+lsf+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+ +li+ +lf ++" +endTableau; + +";} +}} + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + return(MetaL); }:; +\end{VerbatimOut} + + + +%% +%% Code giac/Xcas pour les Tableaux de Variations avec +%% Valeurs intermédiaires +%% + + -\end{VerbatimOut} \begin{VerbatimOut}{XcasTVI.cxx} @@ -342,7 +549,7 @@ verbatimtex \\usepackage{amsmath} \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}} \\begin{document} - etex + etex; "; @@ -390,18 +597,74 @@ endTableau; end";} }}; -return(MetaL); - }:; +MetaLfc:= if(ftt==2){if(nz>2){"beginTableau("+nmr+")"+ + l0+lsi+lsp+lsf+" +endTableau; +";}else{ +"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+" +endTableau; -\end{VerbatimOut} +"; +} +}else{ +if(ftt==0){if(nz>2){"beginTableau("+nmr+")"+ + l0+ +li+ +lp+ +lf ++" +endTableau; +";}else{"beginTableau("+nmr+")"+ + l0+ +li+ +lf ++" +endTableau; +";}}else{ +if(nz>2){"beginTableau("+nmr+")"+ + l0+ +lsi+lsp+lsf+ +li+ +lp+ +lf ++" +endTableau; + +";}else{"beginTableau("+nmr+")"+ + l0+ +lsi+lsf+ +li+ +lf ++" +endTableau; + +";} +}}; + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); +return(MetaL); + }:; + + + +\end{VerbatimOut} +%% +%% Code giac/Xcas pour les Tableaux de signes de produits +%% @@ -452,8 +715,9 @@ MetaL:=" input tableauVariation; \\usepackage{amsmath} \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}} \\begin{document} - etex - beginTableau("+nmr+") + etex; + +beginTableau("+nmr+") newLigneVariables(btex $\\Mathbold{x}$ etex); "+l0+li+ " @@ -467,11 +731,24 @@ newLigneVariables(btex $\\Mathbold{x}$ etex); endTableau; end" ; -}else{ - +MetaLfc:=" beginTableau("+nmr+") +newLigneVariables(btex $\\Mathbold{x}$ etex); + "+l0+li+ + " + newLigneSignes(btex $\\hbox{\\bf Signe du }\\atop{{\\bf produit}}$ etex);"+ + if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}+ lf+ + if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}+" +endTableau; +" +; +}else{ l0:="val(btex $"+latex(D[0])+"$ etex);";li:=" ";lr:=" "; pour m de 0 jusque nz-1 faire l0:=l0+"val(btex $"+latex(Z[m])+"$ etex); @@ -513,7 +790,7 @@ MetaL:=" input tableauVariation; \\usepackage{amsmath} \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}} \\begin{document} - etex + etex; beginTableau("+nmr+") newLigneVariables(btex $\\Mathbold{x}$ etex); "+l0+ @@ -532,7 +809,30 @@ newLigneVariables(btex $\\Mathbold{x}$ etex); "}+" endTableau; end" -;} +; +MetaLfc:=" beginTableau("+nmr+") +newLigneVariables(btex $\\Mathbold{x}$ etex); + "+l0+ + li + + + " + newLigneSignes(btex $\\hbox{\\bf Signe du }\\atop{{\\bf produit}}$ etex);"+ + if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}+ + if(product(L[s](Z[0]-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+"valBarre(btex 0 etex);"+ + lr+ + if(product(L[s](Z[nz-1]+0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ + if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}+" +endTableau; + + "; +} +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); return(MetaL); }:; @@ -541,8 +841,9 @@ return(MetaL); - - +%% +%% Code giac/Xcas pour les Tableaux de signes de quotients +%% @@ -615,7 +916,7 @@ MetaL:=" input tableauVariation; \\usepackage{amsmath} \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}} \\begin{document} - etex + etex; beginTableau("+nmr+") newLigneVariables(btex $\\Mathbold{x}$ etex); @@ -631,6 +932,30 @@ newLigneVariables(btex $\\Mathbold{x}$ etex); endTableau; end" ; + + + + +MetaLfc:=" +beginTableau("+nmr+") +newLigneVariables(btex $\\Mathbold{x}$ etex); + "+l0+li+ + " + newLigneSignes(btex $\\hbox{\\bf Signe }\\atop{{\\bf de "+nomf+"(x)}}$ etex);"+ + if(member(mini,FF)==0){if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}}else{"nonDefBarre;"}+ lf+ + if(member(maxi,FF)==0){if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}}else{"nonDefBarre;"}+" +endTableau; + +" +; + + + + }else{ @@ -675,7 +1000,7 @@ verbatimtex \\usepackage{amsmath} \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}} \\begin{document} - etex + etex; beginTableau("+nmr+") newLigneVariables(btex $\\Mathbold{x}$ etex); "+l0+ @@ -694,12 +1019,61 @@ newLigneVariables(btex $\\Mathbold{x}$ etex); valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+" endTableau; end" -;} +; + + + + +MetaLfc:=" +beginTableau("+nmr+") +newLigneVariables(btex $\\Mathbold{x}$ etex); + "+l0+ + li + + + " + newLigneSignes(btex $\\hbox{\\bf Signe }\\atop{{\\bf de"+nomf+"(x)}}$ etex);"+ + if(member(mini,FF)==0){if(mini!=-infinity and product(L[s](mini),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" + "}}else{"nonDefBarre;"}+ + if(product(L[s](Z[0]-0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ + if(member(Z[0],FF)==0){"valBarre(btex 0 etex);"}else{ "nonDefBarre;"}+ + lr+ + if(product(L[s](Z[nz-1]+0.01),s,0,n-1)>0){"plus;"}else{"moins;"}+ + if(member(maxi,FF)==0){if(maxi!=+infinity and product(L[s](maxi),s,0,n-1)==0){" + valBarre(btex 0 etex);"}else{" "}}else{"nonDefBarre;"}+" +endTableau; + +" + + +} + + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + + + + return(MetaL); }:; \end{VerbatimOut} + + + +%% Code giac/Xcas pour les Tableaux de signes du produit +%% de 2 facteurs affines +%% + + + + \begin{VerbatimOut}{XcasTabSign.cxx} TSa(a,b,c,d,nmr):={ zA:=resoudre(a*x+b=0,x)[0]; @@ -714,7 +1088,7 @@ zmax:=max(zA,zB); \\usepackage{amsmath} \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}} \\begin{document} - etex + etex; beginTableau("+nmr+") newLigneVariables(btex $\\Mathbold{x}$ etex); val(btex $-\\infty$ etex);val(btex $"+latex(zmin)+"$ etex); @@ -755,11 +1129,9 @@ return(Meta); - - - - - +%% +%% Code giac/Xcas pour les Tableaux de Signes d'expression ne contenant +%% qu'un seul terme @@ -825,7 +1197,7 @@ MetaL:=" input tableauVariation; \\usepackage{amsmath} \\newcommand{\\Mathbold}[1]{\\mbox{\\boldmath$#1$\\unboldmath}} \\begin{document} - etex + etex; beginTableau("+nmr+") newLigneVariables(btex $\\Mathbold{x}$ etex); "+l0+" @@ -835,6 +1207,31 @@ newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{"+la endTableau; end" ; + + +MetaLfc:=" + +beginTableau("+nmr+") +newLigneVariables(btex $\\Mathbold{x}$ etex); + "+l0+" +newLigneSignes(btex $\\hbox{\\bf Signe de }\\atop{\\displaystyle \\Mathbold{"+latex(f(x))+"}}$ etex);"+ + li+lm+lf + +" +endTableau; + +" +; + + + + +sortie:=fopen("XCasmpfc.mp"); +fprint(sortie,Unquoted,MetaLfc); +fclose(sortie); + + + + return(MetaL); }:; \end{VerbatimOut} @@ -845,24 +1242,103 @@ return(MetaL); +%% +%% +%% traitement des fichiers produits par giac/xcas +%% +%% -%%% les "giac" +\newcommand{\dresse}[1]{% +\ifthenelse{\boolean{xcas}}{% Avec l'option "XCas présent" + \executGiacmp{XCas#1.giac}% reconstituer le tableau + % exporter le source mp + \ifthenelse{\boolean{windows}}% + {\immediate\write18{TYPE XCasmpfc.mp >> \Tableaux.Tab.mp}}% + {\immediate\write18{cat XCasmpfc.mp >> \Tableaux.Tab.mp}}% + \immediate\write18{mpost -interaction=batchmode -jobname=\Tableaux.Tab XCasmp#1}}% + {% sinon, si le tableau est absent, alerte. + \IfFileExists{\Tableaux.Tab.\theTVn}{}{% + \PackageError{tablor}{Tableau absent non + reconstituable.}{Pour compiler il faut, soit les fichiers de + tableaux, soit le fichier \Tableaux.Tab.mp, soit disposer de + XCas.}}} + +\begin{center} + \includegraphics{\Tableaux.Tab.\theTVn} +\end{center} +\stepcounter{TVn}} +%% +%% traitement des fichiers produits par giac/xcas avec possibilité +%% de modifier le fichier metapost (environnement étoilé)) +%% +\newcommand{\dressetoile}[1]{% +\IfFileExists{\Tableaux.Tab.\theTVn}{% Test sur l'existence du tableau +% Si oui, inclusion du fichier source de sauvegarde mp dans Tableaux +\immediate\write18{cat TSav-\theTVn.mp >> \Tableaux.Tab.mp}} +% Si non, lancement des opérations de fabrication +{\executGiacmp{XCas#1.giac}% + \ifthenelse{\boolean{emacs}}{\immediate\write18{emacs XCasmpfc.mp}}{} + \ifthenelse{\boolean{xemacs}}{\immediate\write18{xemacs XCasmpfc.mp}}{} + \ifthenelse{\boolean{texmaker}}{\immediate\write18{texmaker XCasmpfc.mp}}{} + \ifthenelse{\boolean{vi}}{\immediate\write18{vi XCasmpfc.mp}}{} + \ifthenelse{\boolean{winshell}}{\immediate\write18{winshell XCasmpfc.mp}}{} + \ifthenelse{\boolean{notepad}}{\immediate\write18{notepad XCasmpfc.mp}}{} + \ifthenelse{\boolean{vim}}{\immediate\write18{vim XCasmpfc.mp}}{} + \ifthenelse{\boolean{kate}}{\immediate\write18{kate XCasmpfc.mp}}{} + \ifthenelse{\boolean{gedit}}{\immediate\write18{gedit XCasmpfc.mp}}{} + \ifthenelse{\boolean{textmate}}{\immediate\write18{textmate XCasmpfc.mp}}{} + \ifthenelse{\boolean{texshop}}{\immediate\write18{texshop XCasmpfc.mp}}{} + % Modification avec l'éditeur choisi + + \ifthenelse{\boolean{windows}}% + {\immediate\write18{cp -f XCasmpfc.mp TSav-\theTVn.mp} + \immediate\write18{cat XCasmpfc.mp >> \Tableaux.Tab.mp}}% + {\immediate\write18{cp -f XCasmpfc.mp TSav-\theTVn.mp} % Sauvegarde du + % source mp sur le disque pour une + % inclusion ultérieure dans Tableaux.mp. + \immediate\write18{cat XCasmpfc.mp >> \Tableaux.Tab.mp}} % Inclusion du + % source dans le + % fichier + % Tableaux + \immediate\write18{mpost -interaction=batchmode \Tableaux.Tab}}% Reconstitution des tableaux + % et création du dernier. L'option + % pallie l'absence de end en fin de + % fichier +\begin{center} + \includegraphics{\Tableaux.Tab.\theTVn} +\end{center} + +\setcounter{TVn}{\theTVnbis} % Restauration du compteur TVn +} + +%% +%% +%%% +%%% +%%% les "giac" qui permettent d'exécuter la commande rentrée dans le fichier tex +%%% suivis des environnements qui permettront la saisie du code giac/xcas +%%% Les versions étoilées permettent de modifier le code metapost produit initialement +%%% + + + + \begin{VerbatimOut}{XCas.giac} maple_mode(0); read("XcasTabSign.cxx"); @@ -880,15 +1356,7 @@ fclose(Sortie); \newenvironment{TSa} {\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCas.user}} -{\end{VerbatimOut} - \executGiacmp{XCas.giac} - - \immediate\write18{mpost XCasmp} - -\begin{center} - \includegraphics{XCasmp.\theTVn} -\end{center} -\stepcounter{TVn} +{\end{VerbatimOut}\dresse{} } @@ -914,41 +1382,17 @@ fprint(Sortie,Unquoted,Resultat); fclose(Sortie); \end{VerbatimOut} -\newenvironment{TSq} +\newenvironment{TSq}% {\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasQ.user}} -{\end{VerbatimOut} - \executGiacmp{XCasQ.giac} - - \immediate\write18{mpost XCasmpQ} - -\begin{center} - \includegraphics{XCasmpQ.\theTVn} -\end{center} -\stepcounter{TVn} -} - - - -\newenvironment{TSq*} -{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasQ.user}} -{\end{VerbatimOut} - \executGiacmp{XCasQ.giac} - - - - -\immediate\write18{texmaker XCasmpQ.mp} - - \immediate\write18{mpost XCasmpQ} - -\begin{center} - \includegraphics{XCasmpQ.\theTVn} -\end{center} -\stepcounter{TVn} -} +{\end{VerbatimOut}\dresse{Q}} +\newenvironment{TSq*}[1]% +{\setcounter{TVnbis}{\theTVn} +\setcounter{TVn}{#1} +\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasQ.user}} +{\end{VerbatimOut}\dressetoile{Q}} \begin{VerbatimOut}{XCasL.giac} @@ -966,39 +1410,16 @@ fprint(Sortie,Unquoted,Resultat); fclose(Sortie); \end{VerbatimOut} -\newenvironment{TS} +\newenvironment{TS}% {\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasL.user}} -{\end{VerbatimOut} - \executGiacmp{XCasL.giac} - - \immediate\write18{mpost XCasmpL} - -\begin{center} - \includegraphics{XCasmpL.\theTVn} -\end{center} -\stepcounter{TVn} -} - - - -\newenvironment{TS*} -{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasL.user}} -{\end{VerbatimOut} - \executGiacmp{XCasL.giac} - -\immediate\write18{texmaker XCasmpL.mp} - - \immediate\write18{mpost XCasmpL} - -\begin{center} - \includegraphics{XCasmpL.\theTVn} -\end{center} -\stepcounter{TVn} -} - - +{\end{VerbatimOut}\dresse{L}} +\newenvironment{TS*}[1] +{\setcounter{TVnbis}{\theTVn} +\setcounter{TVn}{#1} +\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasL.user}} +{\end{VerbatimOut}\dressetoile{L}} \begin{VerbatimOut}{XCasTSc.giac} @@ -1016,44 +1437,19 @@ fprint(Sortie,Unquoted,Resultat); fclose(Sortie); \end{VerbatimOut} -\newenvironment{TSc*} -{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTSc.user}} -{\end{VerbatimOut} - \executGiacmp{XCasTSc.giac} - -\immediate\write18{texmaker XCasmpTSc.mp} - \immediate\write18{mpost XCasmpTSc} -\begin{center} - \includegraphics{XCasmpTSc.\theTVn} -\end{center} -\stepcounter{TVn} -} +\newenvironment{TSc*}[1]% +{\setcounter{TVnbis}{\theTVn} +\setcounter{TVn}{#1} +\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTSc.user}} +{\end{VerbatimOut}\dressetoile{TSc}} - - - - -\newenvironment{TSc} +\newenvironment{TSc}% {\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTSc.user}} -{\end{VerbatimOut} - \executGiacmp{XCasTSc.giac} - - \immediate\write18{mpost XCasmpTSc} - -\begin{center} - \includegraphics{XCasmpTSc.\theTVn} -\end{center} -\stepcounter{TVn} -} - - - - - +{\end{VerbatimOut}\dresse{TSc}} \begin{VerbatimOut}{XCasTV.giac} @@ -1073,32 +1469,14 @@ fclose(Sortie); \newenvironment{TV}% {\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTV.user}}% -{\end{VerbatimOut}% - \executGiacmp{XCasTV.giac} - \immediate\write18{mpost XCasmpTV} -\begin{center} - \includegraphics{XCasmpTV.\theTVn} -\end{center} -\stepcounter{TVn} -} - - - - -\newenvironment{TV*}% -{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTV.user}}% -{\end{VerbatimOut}% - \executGiacmp{XCasTV.giac} - -\immediate\write18{texmaker XCasmpTV.mp} - - \immediate\write18{mpost XCasmpTV} -\begin{center} - \includegraphics{XCasmpTV.\theTVn} -\end{center} -\stepcounter{TVn} -} +{\end{VerbatimOut} +\dresse{TV}} +\newenvironment{TV*}[1]{% +\setcounter{TVnbis}{\theTVn} +\setcounter{TVn}{#1} +\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTV.user}}% +{\end{VerbatimOut}\dressetoile{TV}} \begin{VerbatimOut}{XCasTVI.giac} @@ -1118,35 +1496,22 @@ fclose(Sortie); \newenvironment{TVI}% {\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVI.user}}% -{\end{VerbatimOut}% - \executGiacmp{XCasTVI.giac} - \immediate\write18{mpost XCasmpTVI} -\begin{center} - \includegraphics{XCasmpTVI.\theTVn} -\end{center} +{\end{VerbatimOut}\dresse{TVI}} -\stepcounter{TVn} -} -\newenvironment{TVI*}% -{\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVI.user}}% -{\end{VerbatimOut}% - \executGiacmp{XCasTVI.giac} +\newenvironment{TVI*}[1]% +{\setcounter{TVnbis}{\theTVn} +\setcounter{TVn}{#1} +\VerbatimEnvironment\begin{VerbatimOut}[commandchars=\\£µ]{XCasTVI.user}}% +{\end{VerbatimOut}\dressetoile{TVI}} -\immediate\write18{texmaker XCasmpTVI.mp} - \immediate\write18{mpost XCasmpTVI} -\begin{center} - \includegraphics{XCasmpTVI.\theTVn} -\end{center} -\stepcounter{TVn} -} %% -%% Zi end +%% Zi end -> enjoy :) |