* Bug #13432 fixed - xstringl help page was not clear about fonts and Latex-rendered...
[scilab.git] / scilab / modules / graphics / help / fr_FR / text / xstringl.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="fr" xml:id="xstringl">
3     <refnamediv>
4         <refname>xstringl</refname>
5         <refpurpose>calcule les dimensions d'une boîte
6             entourant des chaînes de caractères
7         </refpurpose>
8     </refnamediv>
9     <refsynopsisdiv>
10         <title>Séquence d'appel</title>
11         <synopsis>rect=xstringl(x,y,str,[fontId,fontSize])</synopsis>
12     </refsynopsisdiv>
13     <refsection>
14         <title>Paramètres</title>
15         <variablelist>
16             <varlistentry>
17                 <term>rect</term>
18                 <listitem>
19                     <para>vecteur de 4 scalaires définissant la boîte</para>
20                 </listitem>
21             </varlistentry>
22             <varlistentry>
23                 <term>x,y</term>
24                 <listitem>
25                     <para>scalaires réels, coordonnées du point en bas à
26                         gauche des chaînes de caractères.
27                     </para>
28                 </listitem>
29             </varlistentry>
30             <varlistentry>
31                 <term>str</term>
32                 <listitem>
33                     <para>matrice de chaînes de caractères.</para>
34                     <para>
35                         A partir de la version Scilab 5.2, il est possible d'utiliser les expressions <link linkend="math_rendering_features_in_graphic">LaTeX ou MathML</link>
36                     </para>
37                 </listitem>
38             </varlistentry>
39             <varlistentry>
40                 <term>fonId</term>
41                 <listitem>
42                     <para>un entier specifiant le type de la fonte. Pour plus d'informations, voir <link linkend="graphics_fonts">graphics_fonts</link></para>
43                 </listitem>
44             </varlistentry>
45             <varlistentry>
46                 <term>fontSize</term>
47                 <listitem>
48                     <para>un entier specifiant la taille de la fonte. Pour plus d'informations, voir <link linkend="graphics_fonts">graphics_fonts</link></para>
49                 </listitem>
50             </varlistentry>
51         </variablelist>
52     </refsection>
53     <refsection>
54         <title>Description</title>
55         <para>
56             <literal>xstringl</literal> renvoie dans <literal>rect=[x,y,w,h]</literal> (point
57             en haut à gauche, largeur, hauteur) les dimensions d'un
58             rectangle dans l'échelle graphique courante entourant les chaînes de
59             caractères <literal>str</literal> dessinées à la position
60             <literal>x,y</literal> (point en bas à gauche).
61         </para>
62         <para>Le résultat est approximatif avec le pilote PostScript.</para>
63     </refsection>
64     <refsection>
65         <title>Exemples</title>
66         <programlisting role="example">
67 <![CDATA[ 
68 plot2d([0, 1], [0, 1], 0);
69 str = ["$\underleftrightarrow{Scilab}$" "is"; "not" "elisaB"];
70 r = xstringl(0.5, 0.7, str);
71 xrects([r(1) r(2)+r(4) r(3) r(4)]');
72 xstring(r(1), r(2), str);
73
74 str = ["Scilab" "n''est "; "pas" "Matlab"];
75 r2 = xstringl(0.2, 0.2, str, 5, 7);
76 xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
77 xstring(r2(1), r2(2), str)
78 txt = gce();
79 txt.font_size = 7;
80 txt.font_style = 5;
81  ]]>
82         </programlisting>
83             <scilab:image>
84                 <![CDATA[ 
85 plot2d([0, 1], [0, 1], 0);
86 str = ["$\underleftrightarrow{Scilab}$" "is"; "not" "elisaB"];
87 r = xstringl(0.5, 0.7, str);
88 xrects([r(1) r(2)+r(4) r(3) r(4)]');
89 xstring(r(1), r(2), str);
90
91 str = ["Scilab" "n''est "; "pas" "Matlab"];
92 r2 = xstringl(0.2, 0.2, str, 5, 8);
93 xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
94 xstring(r2(1), r2(2), str)
95 txt = gce();
96 txt.font_size = 8;
97 txt.font_style = 5;
98  ]]>
99             </scilab:image>
100         <programlisting role="example">
101 <![CDATA[
102 plot2d([0, 1], [0, 1], 0);
103 mathml = "<mrow>" +.. 
104             "<mfrac>" +..
105                 "<mrow>" +.. 
106                     "<mi> d </mi>" +.. 
107                     "<mi> y </mi>" +..  
108                 "</mrow>" +..
109                 "<mrow>" +..
110                     "<mi>d</mi>" +..
111                     "<mi>x</mi>" +..
112                 "</mrow>" +..
113             "</mfrac>" +..
114                 "<mo> = </mo>" +..
115             "<mfrac>" +..
116                 "<mn> 1 </mn>" +..
117                 "<msup>" +..
118                     "<mi> y </mi>" +..
119                     "<mn> 2 </mn>" +..
120                 "</msup>" +..
121             "</mfrac>" +..
122          "</mrow>";
123 str=["SCILAB", "peut écrire LaTeX :", "$\frac{abc}{xyz}$"; "ou", "MathML :", mathml]; 
124 r2 = xstringl(0.2, 0.4, str, 10, 4);
125 xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
126 xstring(r2(1), r2(2), str);
127 txt = gce();
128 txt.font_size = 4;
129 txt.font_style = 10;
130  ]]>
131         </programlisting>
132             <scilab:image>
133 <![CDATA[
134 plot2d([0, 1], [0, 1], 0);
135 mathml = "<mrow>" +.. 
136             "<mfrac>" +..
137                 "<mrow>" +.. 
138                     "<mi> d </mi>" +.. 
139                     "<mi> y </mi>" +..  
140                 "</mrow>" +..
141                 "<mrow>" +..
142                     "<mi>d</mi>" +..
143                     "<mi>x</mi>" +..
144                 "</mrow>" +..
145             "</mfrac>" +..
146                 "<mo> = </mo>" +..
147             "<mfrac>" +..
148                 "<mn> 1 </mn>" +..
149                 "<msup>" +..
150                     "<mi> y </mi>" +..
151                     "<mn> 2 </mn>" +..
152                 "</msup>" +..
153             "</mfrac>" +..
154          "</mrow>";
155 str=["SCILAB", "peut écrire LaTeX :", "$\frac{abc}{xyz}$"; "ou", "MathML :", mathml]; 
156 r2 = xstringl(0.2, 0.4, str, 10, 4);
157 xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
158 xstring(r2(1), r2(2), str);
159 txt = gce();
160 txt.font_size = 4;
161 txt.font_style = 10;
162  ]]>
163             </scilab:image>
164         <programlisting>
165 <![CDATA[
166 plot2d([0, 6],[0, 6], 0);
167 str=["$\underleftrightarrow{\tiny{Scilab}}$"; "$\underleftrightarrow{\scriptsize{Scilab}}$";   
168      "$\underleftrightarrow{\footnotesize{Scilab}}$"; "$\underleftrightarrow{\small{Scilab}}$"; 
169      "$\underleftrightarrow{\normalsize{Scilab}}$"; "$\underleftrightarrow{\large{Scilab}}$";
170      "$\underleftrightarrow{\Large{Scilab}}$"; "$\underleftrightarrow{\LARGE{Scilab}}$";
171      "$\underleftrightarrow{\huge{Scilab}}$"; "$\underleftrightarrow{\Huge{Scilab}}$"];
172 r = xstringl(0.5, 0.5, str, 5, 3);
173 xrects([r(1); r(2)+r(4); r(3); r(4)]);
174 xstring(r(1), r(2), str);
175 txt = gce();
176 txt.font_size = 3;
177 txt.font_style = 5;
178 txt.font_color = 2;
179
180 str = ["${\tiny{\frac{x}{y}}$", "${\scriptsize{\frac{x}{y}}$", ..
181        "${\footnotesize{\frac{x}{y}}$", "${\small{\frac{x}{y}}$", ..
182        "${\normalsize{\frac{x}{y}}$", "${\large{\frac{x}{y}}$", ..
183        "${\Large{\frac{x}{y}}$", "${\LARGE{\frac{x}{y}}$", ..
184        "${\huge{\frac{x}{y}}$", "$\Huge{\frac{x}{y}}$"];
185 r = xstringl(2, 0.5, str, 0, 3);
186 xrects([r(1); r(2)+r(4); r(3); r(4)]);
187 xstring(r(1), r(2), str);
188 txt = gce();
189 txt.font_size = 3;
190 txt.font_style = 0;
191 txt.font_color = 2;
192 ]]>    
193         </programlisting>
194             <scilab:image>
195 <![CDATA[
196 plot2d([0, 6],[0, 6], 0);
197 str=["$\underleftrightarrow{\tiny{Scilab}}$"; "$\underleftrightarrow{\scriptsize{Scilab}}$";   
198      "$\underleftrightarrow{\footnotesize{Scilab}}$"; "$\underleftrightarrow{\small{Scilab}}$"; 
199      "$\underleftrightarrow{\normalsize{Scilab}}$"; "$\underleftrightarrow{\large{Scilab}}$";
200      "$\underleftrightarrow{\Large{Scilab}}$"; "$\underleftrightarrow{\LARGE{Scilab}}$";
201      "$\underleftrightarrow{\huge{Scilab}}$"; "$\underleftrightarrow{\Huge{Scilab}}$"];
202 r = xstringl(0.5, 0.5, str, 5, 3);
203 xrects([r(1); r(2)+r(4); r(3); r(4)]);
204 xstring(r(1), r(2), str);
205 txt = gce();
206 txt.font_size = 3;
207 txt.font_style = 5;
208 txt.font_color = 2;
209
210 str = ["${\tiny{\frac{x}{y}}$", "${\scriptsize{\frac{x}{y}}$", ..
211        "${\footnotesize{\frac{x}{y}}$", "${\small{\frac{x}{y}}$", ..
212        "${\normalsize{\frac{x}{y}}$", "${\large{\frac{x}{y}}$", ..
213        "${\Large{\frac{x}{y}}$", "${\LARGE{\frac{x}{y}}$", ..
214        "${\huge{\frac{x}{y}}$", "$\Huge{\frac{x}{y}}$"];
215 r = xstringl(2, 0.5, str, 0, 3);
216 xrects([r(1); r(2)+r(4); r(3); r(4)]);
217 xstring(r(1), r(2), str);
218 txt = gce();
219 txt.font_size = 3;
220 txt.font_style = 0;
221 txt.font_color = 2;
222 ]]> 
223             </scilab:image>
224     </refsection>
225     <refsection role="see also">
226         <title>Voir aussi</title>
227         <simplelist type="inline">
228             <member>
229                 <link linkend="titlepage">titlepage</link>
230             </member>
231             <member>
232                 <link linkend="xstring">xstring</link>
233             </member>
234             <member>
235                 <link linkend="xstringl">xstringl</link>
236             </member>
237             <member>
238                 <link linkend="xtitle">xtitle</link>
239             </member>
240             <member>
241                 <link linkend="stringbox">stringbox</link>
242             </member>
243         </simplelist>
244     </refsection>
245 </refentry>