From: Maxime Chupin Date: Tue, 20 Sep 2011 21:57:24 +0000 (+0200) Subject: Type vecteur documenté X-Git-Url: https://melusine.eu.org/syracuse/G/git/?p=mp-gdd.git;a=commitdiff_plain;h=582bd872721899f23a1ef221b9d1abc57d39e759;hp=6639f7110576d52cbf6516ef3036bd769bb4cb46 Type vecteur documenté --- diff --git a/doc/mp-gdd-doc.log b/doc/mp-gdd-doc.log index 0f0f754..0cbe91a 100644 --- a/doc/mp-gdd-doc.log +++ b/doc/mp-gdd-doc.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=pdflatex 2011.8.8) 19 SEP 2011 23:04 +This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=pdflatex 2011.8.8) 20 SEP 2011 23:56 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -588,32 +588,32 @@ File: lstmisc.sty 2007/02/22 1.4 (Carsten Heinz) (./mp-gdd-doc.aux) \openout1 = `mp-gdd-doc.aux'. -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 57. -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for MDA/cmr/m/n on input line 57. -LaTeX Font Info: Try loading font information for MDA+cmr on input line 57. +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 58. +LaTeX Font Info: ... okay on input line 58. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 58. +LaTeX Font Info: ... okay on input line 58. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 58. +LaTeX Font Info: ... okay on input line 58. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 58. +LaTeX Font Info: ... okay on input line 58. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 58. +LaTeX Font Info: ... okay on input line 58. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 58. +LaTeX Font Info: ... okay on input line 58. +LaTeX Font Info: Checking defaults for MDA/cmr/m/n on input line 58. +LaTeX Font Info: Try loading font information for MDA+cmr on input line 58. (/usr/local/texlive/2011/texmf-dist/tex/latex/mathdesign/mdacmr.fd File: mdacmr.fd ) -LaTeX Font Info: ... okay on input line 57. -LaTeX Font Info: Checking defaults for MDB/cmr/m/n on input line 57. -LaTeX Font Info: Try loading font information for MDB+cmr on input line 57. +LaTeX Font Info: ... okay on input line 58. +LaTeX Font Info: Checking defaults for MDB/cmr/m/n on input line 58. +LaTeX Font Info: Try loading font information for MDB+cmr on input line 58. (/usr/local/texlive/2011/texmf-dist/tex/latex/mathdesign/mdbcmr.fd File: mdbcmr.fd ) -LaTeX Font Info: ... okay on input line 57. +LaTeX Font Info: ... okay on input line 58. *geometry* driver: auto-detecting *geometry* detected driver: pdftex @@ -707,172 +707,154 @@ G,.JBIG2,.JB2,.eps] File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv e )) -LaTeX Info: Redefining \degres on input line 57. -LaTeX Info: Redefining \dots on input line 57. -LaTeX Info: Redefining \up on input line 57. +LaTeX Info: Redefining \degres on input line 58. +LaTeX Info: Redefining \dots on input line 58. +LaTeX Info: Redefining \up on input line 58. LaTeX Font Info: Font shape `T1/mdbch/m/n' will be -(Font) scaled to size 13.82408pt on input line 59. +(Font) scaled to size 13.82408pt on input line 60. LaTeX Font Info: Font shape `T1/mdbch/bx/n' in size <14.4> not available -(Font) Font shape `T1/mdbch/b/n' tried instead on input line 59. +(Font) Font shape `T1/mdbch/b/n' tried instead on input line 60. LaTeX Font Info: Font shape `T1/mdbch/b/n' will be -(Font) scaled to size 13.82408pt on input line 59. +(Font) scaled to size 13.82408pt on input line 60. LaTeX Font Info: Font shape `T1/cmtt/m/n' will be -(Font) scaled to size 10.74997pt on input line 61. -LaTeX Font Info: Try loading font information for U+logo on input line 61. +(Font) scaled to size 10.74997pt on input line 62. +LaTeX Font Info: Try loading font information for U+logo on input line 62. (/usr/local/texlive/2011/texmf-dist/tex/latex/mflogo/ulogo.fd File: ulogo.fd 1999/03/10 v2.0 LaTeX font defs for Metafont and MetaPost logos ) LaTeX Font Info: Font shape `T1/mdbch/m/fsc' will be -(Font) scaled to size 9.60007pt on input line 82. +(Font) scaled to size 9.60007pt on input line 83. LaTeX Font Info: Font shape `OT1/mdbch/m/n' will be -(Font) scaled to size 6.72005pt on input line 94. +(Font) scaled to size 6.72005pt on input line 95. LaTeX Font Info: Font shape `OT1/mdbch/m/n' will be -(Font) scaled to size 4.80003pt on input line 94. -LaTeX Font Info: Try loading font information for OML+mdbch on input line 94 +(Font) scaled to size 4.80003pt on input line 95. +LaTeX Font Info: Try loading font information for OML+mdbch on input line 95 . (/usr/local/texlive/2011/texmf-dist/tex/latex/mathdesign/mdbch/omlmdbch.fd File: omlmdbch.fd 2006/01/28 Fontinst v1.928 font definitions for OML/mdbch. ) LaTeX Font Info: Font shape `OML/mdbch/m/it' will be -(Font) scaled to size 9.60007pt on input line 94. +(Font) scaled to size 9.60007pt on input line 95. LaTeX Font Info: Font shape `OML/mdbch/m/it' will be -(Font) scaled to size 6.72005pt on input line 94. +(Font) scaled to size 6.72005pt on input line 95. LaTeX Font Info: Font shape `OML/mdbch/m/it' will be -(Font) scaled to size 4.80003pt on input line 94. -LaTeX Font Info: Try loading font information for OMS+mdbch on input line 94 +(Font) scaled to size 4.80003pt on input line 95. +LaTeX Font Info: Try loading font information for OMS+mdbch on input line 95 . (/usr/local/texlive/2011/texmf-dist/tex/latex/mathdesign/mdbch/omsmdbch.fd File: omsmdbch.fd 2006/01/28 Fontinst v1.928 font definitions for OMS/mdbch. ) LaTeX Font Info: Font shape `OMS/mdbch/m/n' will be -(Font) scaled to size 9.60007pt on input line 94. +(Font) scaled to size 9.60007pt on input line 95. LaTeX Font Info: Font shape `OMS/mdbch/m/n' will be -(Font) scaled to size 6.72005pt on input line 94. +(Font) scaled to size 6.72005pt on input line 95. LaTeX Font Info: Font shape `OMS/mdbch/m/n' will be -(Font) scaled to size 4.80003pt on input line 94. -LaTeX Font Info: Try loading font information for OMX+mdbch on input line 94 +(Font) scaled to size 4.80003pt on input line 95. +LaTeX Font Info: Try loading font information for OMX+mdbch on input line 95 . (/usr/local/texlive/2011/texmf-dist/tex/latex/mathdesign/mdbch/omxmdbch.fd File: omxmdbch.fd 2006/01/28 Fontinst v1.928 font definitions for OMX/mdbch. ) LaTeX Font Info: Font shape `OMX/mdbch/m/n' will be -(Font) scaled to size 9.60007pt on input line 94. +(Font) scaled to size 9.60007pt on input line 95. LaTeX Font Info: Font shape `OMX/mdbch/m/n' will be -(Font) scaled to size 6.72005pt on input line 94. +(Font) scaled to size 6.72005pt on input line 95. LaTeX Font Info: Font shape `OMX/mdbch/m/n' will be -(Font) scaled to size 4.80003pt on input line 94. +(Font) scaled to size 4.80003pt on input line 95. LaTeX Font Info: Font shape `OML/mdbch/m/n' will be -(Font) scaled to size 9.60007pt on input line 94. +(Font) scaled to size 9.60007pt on input line 95. LaTeX Font Info: Font shape `OML/mdbch/m/n' will be -(Font) scaled to size 6.72005pt on input line 94. +(Font) scaled to size 6.72005pt on input line 95. LaTeX Font Info: Font shape `OML/mdbch/m/n' will be -(Font) scaled to size 4.80003pt on input line 94. -LaTeX Font Info: Try loading font information for MDA+mdbch on input line 94 +(Font) scaled to size 4.80003pt on input line 95. +LaTeX Font Info: Try loading font information for MDA+mdbch on input line 95 . (/usr/local/texlive/2011/texmf-dist/tex/latex/mathdesign/mdbch/mdamdbch.fd File: mdamdbch.fd 2006/01/28 Fontinst v1.928 font definitions for MDA/mdbch. ) LaTeX Font Info: Font shape `MDA/mdbch/m/n' will be -(Font) scaled to size 9.60007pt on input line 94. +(Font) scaled to size 9.60007pt on input line 95. LaTeX Font Info: Font shape `MDA/mdbch/m/n' will be -(Font) scaled to size 6.72005pt on input line 94. +(Font) scaled to size 6.72005pt on input line 95. LaTeX Font Info: Font shape `MDA/mdbch/m/n' will be -(Font) scaled to size 4.80003pt on input line 94. -LaTeX Font Info: Try loading font information for MDB+mdbch on input line 94 +(Font) scaled to size 4.80003pt on input line 95. +LaTeX Font Info: Try loading font information for MDB+mdbch on input line 95 . (/usr/local/texlive/2011/texmf-dist/tex/latex/mathdesign/mdbch/mdbmdbch.fd File: mdbmdbch.fd 2006/01/28 Fontinst v1.928 font definitions for MDB/mdbch. ) LaTeX Font Info: Font shape `MDB/mdbch/m/n' will be -(Font) scaled to size 9.60007pt on input line 94. +(Font) scaled to size 9.60007pt on input line 95. LaTeX Font Info: Font shape `MDB/mdbch/m/n' will be -(Font) scaled to size 6.72005pt on input line 94. +(Font) scaled to size 6.72005pt on input line 95. LaTeX Font Info: Font shape `MDB/mdbch/m/n' will be -(Font) scaled to size 4.80003pt on input line 94. +(Font) scaled to size 4.80003pt on input line 95. LaTeX Font Info: Font shape `T1/mdbch/m/n' will be -(Font) scaled to size 6.72005pt on input line 94. +(Font) scaled to size 6.72005pt on input line 95. LaTeX Font Info: Font shape `T1/mdbch/m/n' will be -(Font) scaled to size 7.68005pt on input line 95. +(Font) scaled to size 7.68005pt on input line 96. LaTeX Font Info: Font shape `T1/cmtt/m/n' will be -(Font) scaled to size 8.59998pt on input line 95. +(Font) scaled to size 8.59998pt on input line 96. LaTeX Font Info: Font shape `T1/mdbch/m/it' will be -(Font) scaled to size 9.60007pt on input line 114. +(Font) scaled to size 9.60007pt on input line 117. LaTeX Font Info: Font shape `T1/mdbch/bx/n' in size <10> not available -(Font) Font shape `T1/mdbch/b/n' tried instead on input line 122. +(Font) Font shape `T1/mdbch/b/n' tried instead on input line 125. LaTeX Font Info: Font shape `T1/mdbch/b/n' will be -(Font) scaled to size 9.60007pt on input line 122. +(Font) scaled to size 9.60007pt on input line 125. LaTeX Font Info: Font shape `T1/cmtt/bx/n' in size <10> not available -(Font) Font shape `T1/cmtt/m/n' tried instead on input line 122. +(Font) Font shape `T1/cmtt/m/n' tried instead on input line 125. LaTeX Font Info: Font shape `T1/cmtt/m/n' will be -(Font) scaled to size 10.74997pt on input line 122. +(Font) scaled to size 10.74997pt on input line 125. LaTeX Font Info: Font shape `T1/cmtt/m/n' will be -(Font) scaled to size 9.67497pt on input line 126. - -<../exemples/cercles/cercles1-1.pdf, id=1, 266.40137pt x 267.56633pt> -File: ../exemples/cercles/cercles1-1.pdf Graphic file (type pdf) - - -Package pdftex.def Info: ../exemples/cercles/cercles1-1.pdf used on input line -133. -(pdftex.def) Requested size: 236.01561pt x 237.05544pt. - --------------------------------- -pos=r -width=236.01561pt -hsep=10.0pt -vsep=12.0pt -overhang=0pt -rframe= -codefile=../exemples/cercles/cercles1.mp -\if@SX@wide=FALSE -\if@SX@rangeaccept=FALSE -\if@SX@varwidth=FALSE -graphicfile=../exemples/cercles/cercles1-1.pdf, graphicparameter=[width=\linewi -dth ] --------------------------------- -(../exemples/cercles/cercles1.mp) [1 +(Font) scaled to size 9.67497pt on input line 129. +LaTeX Font Info: Font shape `T1/mdbch/m/n' will be +(Font) scaled to size 8.64006pt on input line 130. +LaTeX Font Info: Font shape `T1/mdbch/m/n' will be +(Font) scaled to size 4.80003pt on input line 130. + +[1 {/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] LaTeX Font Info: Font shape `T1/mdbch/m/n' will be -(Font) scaled to size 11.52008pt on input line 137. +(Font) scaled to size 11.52008pt on input line 174. LaTeX Font Info: Font shape `T1/mdbch/bx/n' in size <12> not available -(Font) Font shape `T1/mdbch/b/n' tried instead on input line 137. +(Font) Font shape `T1/mdbch/b/n' tried instead on input line 174. LaTeX Font Info: Font shape `T1/mdbch/b/n' will be -(Font) scaled to size 11.52008pt on input line 137. +(Font) scaled to size 11.52008pt on input line 174. LaTeX Font Info: Font shape `T1/cmtt/bx/n' in size <12> not available -(Font) Font shape `T1/cmtt/m/n' tried instead on input line 137. +(Font) Font shape `T1/cmtt/m/n' tried instead on input line 174. LaTeX Font Info: Font shape `T1/cmtt/m/n' will be -(Font) scaled to size 12.89996pt on input line 137. - [2 <../exemples/cercles/cercles1-1.pdf>] [3] -(./mp-gdd-doc.aux) ) +(Font) scaled to size 12.89996pt on input line 174. + +[2] (./mp-gdd-doc.aux) ) Here is how much of TeX's memory you used: - 7145 strings out of 493629 - 98067 string characters out of 3143345 - 342461 words of memory out of 3000000 - 10278 multiletter control sequences out of 15000+200000 - 41969 words of font info for 66 fonts, out of 3000000 for 9000 + 7123 strings out of 493629 + 97644 string characters out of 3143345 + 188553 words of memory out of 3000000 + 10260 multiletter control sequences out of 15000+200000 + 46708 words of font info for 70 fonts, out of 3000000 for 9000 831 hyphenation exceptions out of 8191 - 38i,9n,48p,237b,1438s stack positions out of 5000i,500n,10000p,200000b,50000s -{/usr/local/texlive/2011/texmf-dist/fonts/enc/dvips/cm-supe -r/cm-super-t1.enc}{/usr/local/texlive/2011/texmf-dist/fonts/enc/dvips/ly1/texna -nsi.enc} - -Output written on mp-gdd-doc.pdf (3 pages, 162834 bytes). + 38i,5n,41p,237b,1438s stack positions out of 5000i,500n,10000p,200000b,50000s +{/usr/local/texlive/2011/texmf-dist/fonts/enc/dvips/cm- +super/cm-super-t1.enc}{/usr/local/texlive/2011/texmf-dist/fonts/enc/dvips/ly1/t +exnansi.enc}< +/usr/local/texlive/2011/texmf-dist/fonts/type1/public/cm-super/sftt0900.pfb> +Output written on mp-gdd-doc.pdf (2 pages, 137663 bytes). PDF statistics: - 65 PDF objects out of 1000 (max. 8388607) - 46 compressed objects within 1 object stream + 45 PDF objects out of 1000 (max. 8388607) + 32 compressed objects within 1 object stream 0 named destinations out of 1000 (max. 500000) - 6 words of extra memory for PDF output out of 10000 (max. 10000000) + 1 words of extra memory for PDF output out of 10000 (max. 10000000) diff --git a/doc/mp-gdd-doc.pdf b/doc/mp-gdd-doc.pdf index 1a48a28..01180fd 100644 Binary files a/doc/mp-gdd-doc.pdf and b/doc/mp-gdd-doc.pdf differ diff --git a/doc/mp-gdd-doc.tex b/doc/mp-gdd-doc.tex index 1116a14..f71d136 100644 --- a/doc/mp-gdd-doc.tex +++ b/doc/mp-gdd-doc.tex @@ -32,9 +32,9 @@ extendedchars=true, % showspaces=false, % showstringspaces=false, % - % numbers=left, - % numbersep=0.8em, - % numberstyle=\tiny, % + numbers=left, + numbersep=0.8em, + numberstyle=\tiny, % breaklines=true, % breakautoindent=true, captionpos=b, @@ -53,6 +53,7 @@ \newcommand\variable[1]{\texttt{#1}} \newcommand\typeMP[1]{\texttt{#1}} \newcommand\typeGDD[1]{\texttt{#1}} +\newcommand\foncGDD[1]{\texttt{#1}} \begin{document} @@ -91,7 +92,7 @@ distributions \TeX. \mpgdd utilise des tables comme structure principale. Chaque objet est numéroté via le compteur \variable{gddO}, son -type\footnote{Les types son propres à \mpgdd et seront décrit plus +type\footnote{Les types sont propres à \mpgdd et seront décrit plus tard.} est stocké dans la table \variable{gddT[]} à la place \variable{gddT[gddO]}. Les propriétés des objets sont définies dans, là encore, des tables de type \typeMP{numeric} qui sont @@ -106,7 +107,9 @@ Il y a deux tables particulières \variable{gddP[]} qui est du type \typeMP{string}. Nous verrons plus tard quelle est leur utilité. Bien entendu, lors d'une utilisation classique de \mpgdd, l'appel à -toutes ces tables n'est pas chose courante. +toutes ces tables n'est pas chose courante. Les fonctions que nous +allons décrire dans la suite de ce documents permettent de ne pas +avoir recours trop précisément à cette machinerie. \section{Les types} @@ -130,7 +133,41 @@ vardef Point(expr a,b) = enddef; \end{lstlisting} -\LTXinputExample[graphic=../exemples/cercles/cercles1-1.pdf,pos=r]{../exemples/cercles/cercles1.mp} +Cette fonction «retourne» le compteur \variable{gdd0} et crée dans la +table de type une entrée \typeGDD{point} et les attributs (coordonnées) +correspondants \variable{a} et \variable{b} dans les tables +\variable{gddA} et \variable{gddB}. + +Avec un tel type de fonctionnement, la plupart des manipulations se +fait sur des \typeMP{numeric}s. En effet, pour déclarer un +\typeGDD{point}, il suffit d'écrire +\begin{lstlisting} +A = point(2,3); +\end{lstlisting} +\variable{A} prend alors la valeur courante de \variable{gddO}. C'est +l'identifiant de du point. + +\paragraph{Le type \typeGDD{vecteur}} Ce type correspond aux vecteurs +définis à l'aide de deux points de l'espace euclidien. La fonction +créatrice d'un tel objet est celle-ci +% +\begin{lstlisting} +vardef Vecteur(expr a,b) = + save n; n = incr gddO; + gddT[n] = "vecteur"; gddA[n] = PointImp(a); gddB[n] = PointImp(b); n +enddef; +\end{lstlisting} +Cette fonction a la même architecture que celle correspondante au +\typeGDD{point} : elle retourne la valeur courante de \variable{gddO} +après incrémentation, puis affecte le type \typeGDD{vecteur} à +l'entrée correspondante dans la table \variable{gddT}. Par contre, les +entrées des tables \variable{gddA} et \variable{gddB} sont +différentes. En effet, on stock ici les identifiants des points +formant le vecteur. La fonction \foncGDD{PointImp} s'assure que +l'entrée correspond bien à un identifiant de point et non pas une +\typeMP{pair} \MP. Elle sera décrite plus en détail ultérieurement. + + \section{Fonctions générales}