* Bug #13432 fixed - xstringl help page was not clear about fonts and Latex-rendered...
[scilab.git] / scilab / modules / graphics / help / en_US / text / xstringl.xml
index 92c780a..11ff06b 100644 (file)
             <varlistentry>
                 <term>fontId</term>
                 <listitem>
-                    <para>an integer specifying the font type.</para>
+                    <para>an integer specifying the font type. For more information, see <link linkend="graphics_fonts">graphics_fonts</link></para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>fontSize</term>
                 <listitem>
-                    <para>an integer specifying the font size.</para>
+                    <para>an integer specifying the font size. For more information, see <link linkend="graphics_fonts">graphics_fonts</link></para>
                 </listitem>
             </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
         <title>Examples</title>
-        <programlisting role="example"><![CDATA[ 
-plot2d([0;1],[0;1],0)
-str=["$\underleftrightarrow{Scilab}$" "is";"not" "elisaB"]; // Only valid from Scilab 5.2
-r=xstringl(0.5,0.5,str)
-xrects([r(1) r(2)+r(4) r(3) r(4)]')
-xstring(r(1),r(2),str)
+        <programlisting role="example">
+<![CDATA[ 
+plot2d([0, 1], [0, 1], 0);
+str = ["$\underleftrightarrow{Scilab}$" "is"; "not" "elisaB"]; // Only valid from Scilab 5.2
+r = xstringl(0.5, 0.7, str);
+xrects([r(1) r(2)+r(4) r(3) r(4)]');
+xstring(r(1), r(2), str);
 
-plot2d([0;1],[0;1],0)
-str=["Scilab" "n''est ";"pas" "Matlab"];
-r2 = xstringl(0.5,0.5,str,2,5)
-xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]')
-xstring(r2(1),r2(2),str)
+str = ["Scilab" "is"; "not" "Matlab"];
+r2 = xstringl(0.2, 0.2, str, 5, 7);
+xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
+xstring(r2(1), r2(2), str)
+txt = gce();
+txt.font_size = 7;
+txt.font_style = 5;
+ ]]>
+        </programlisting>
+            <scilab:image>
+<![CDATA[ 
+plot2d([0, 1], [0, 1], 0);
+str = ["$\underleftrightarrow{Scilab}$" "is"; "not" "elisaB"]; // Only valid from Scilab 5.2
+r = xstringl(0.5, 0.7, str);
+xrects([r(1) r(2)+r(4) r(3) r(4)]');
+xstring(r(1), r(2), str);
 
-txt2=gce();
-txt2.font_size = 5;
-txt2.font_style = 2;
-
-plot2d([0;1],[0;1],0)
+str = ["Scilab" "is"; "not" "Matlab"];
+r2 = xstringl(0.2, 0.2, str, 5, 8);
+xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
+xstring(r2(1), r2(2), str)
+txt = gce();
+txt.font_size = 8;
+txt.font_style = 5;
+ ]]>
+            </scilab:image>
+        <programlisting role="example">
+<![CDATA[
+plot2d([0, 1], [0, 1], 0);
+// Only valid from Scilab 5.2
+mathml = "<mrow>" +.. 
+            "<mfrac>" +..
+                "<mrow>" +.. 
+                    "<mi> d </mi>" +.. 
+                    "<mi> y </mi>" +..  
+                "</mrow>" +..
+                "<mrow>" +..
+                    "<mi>d</mi>" +..
+                    "<mi>x</mi>" +..
+                "</mrow>" +..
+            "</mfrac>" +..
+                "<mo> = </mo>" +..
+            "<mfrac>" +..
+                "<mn> 1 </mn>" +..
+                "<msup>" +..
+                    "<mi> y </mi>" +..
+                    "<mn> 2 </mn>" +..
+                "</msup>" +..
+            "</mfrac>" +..
+         "</mrow>";
+str=["SCILAB", "can write LaTeX :", "$\frac{abc}{xyz}$"; "or", "MathML :", mathml]; 
+r2 = xstringl(0.2, 0.4, str, 10, 4);
+xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
+xstring(r2(1), r2(2), str);
+txt = gce();
+txt.font_size = 4;
+txt.font_style = 10;
+ ]]>
+        </programlisting>
+            <scilab:image>
+                <![CDATA[
+plot2d([0, 1], [0, 1], 0);
 // Only valid from Scilab 5.2
-mathml="<mrow>      <mfrac>        <mrow>          <mi>d</mi>          <mi>y</mi>        </mrow>        <mrow>          <mi>d</mi>          <mi>x</mi>        </mrow>      </mfrac>      <mo>=</mo>      <mfrac>        <mn>1</mn>        <msup>          <mi>y</mi>          <mn>2</mn>        </msup>      </mfrac>    </mrow>";
-a=gca(); 
-a.margins=[0,0;0,0];
-str=["SCILAB","can write LaTeX :","$\frac{abc}{xyz}$";"or","MathML :",mathml] ; 
-r2 = xstringl(0.5,0.5,str,2,5)
-xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]')
-xstring(r2(1),r2(2),str)
+mathml = "<mrow>" +.. 
+            "<mfrac>" +..
+                "<mrow>" +.. 
+                    "<mi> d </mi>" +.. 
+                    "<mi> y </mi>" +..  
+                "</mrow>" +..
+                "<mrow>" +..
+                    "<mi>d</mi>" +..
+                    "<mi>x</mi>" +..
+                "</mrow>" +..
+            "</mfrac>" +..
+                "<mo> = </mo>" +..
+            "<mfrac>" +..
+                "<mn> 1 </mn>" +..
+                "<msup>" +..
+                    "<mi> y </mi>" +..
+                    "<mn> 2 </mn>" +..
+                "</msup>" +..
+            "</mfrac>" +..
+         "</mrow>";
+str=["SCILAB", "can write LaTeX :", "$\frac{abc}{xyz}$"; "or", "MathML :", mathml]; 
+r2 = xstringl(0.2, 0.4, str, 10, 4);
+xrects([r2(1) r2(2)+r2(4) r2(3) r2(4)]');
+xstring(r2(1), r2(2), str);
+txt = gce();
+txt.font_size = 4;
+txt.font_style = 10;
+ ]]>
+            </scilab:image>
+    <programlisting>
+<![CDATA[
+plot2d([0, 6],[0, 6], 0);
+str=["$\underleftrightarrow{\tiny{Scilab}}$"; "$\underleftrightarrow{\scriptsize{Scilab}}$";   
+     "$\underleftrightarrow{\footnotesize{Scilab}}$"; "$\underleftrightarrow{\small{Scilab}}$"; 
+     "$\underleftrightarrow{\normalsize{Scilab}}$"; "$\underleftrightarrow{\large{Scilab}}$";
+     "$\underleftrightarrow{\Large{Scilab}}$"; "$\underleftrightarrow{\LARGE{Scilab}}$";
+     "$\underleftrightarrow{\huge{Scilab}}$"; "$\underleftrightarrow{\Huge{Scilab}}$"];
+r = xstringl(0.5, 0.5, str, 5, 3);
+xrects([r(1); r(2)+r(4); r(3); r(4)]);
+xstring(r(1), r(2), str);
+txt = gce();
+txt.font_size = 3;
+txt.font_style = 5;
+txt.font_color = 2;
 
+str = ["${\tiny{\frac{x}{y}}$", "${\scriptsize{\frac{x}{y}}$", ..
+       "${\footnotesize{\frac{x}{y}}$", "${\small{\frac{x}{y}}$", ..
+       "${\normalsize{\frac{x}{y}}$", "${\large{\frac{x}{y}}$", ..
+       "${\Large{\frac{x}{y}}$", "${\LARGE{\frac{x}{y}}$", ..
+       "${\huge{\frac{x}{y}}$", "$\Huge{\frac{x}{y}}$"];
+r = xstringl(2, 0.5, str, 0, 3);
+xrects([r(1); r(2)+r(4); r(3); r(4)]);
+xstring(r(1), r(2), str);
+txt = gce();
+txt.font_size = 3;
+txt.font_style = 0;
+txt.font_color = 2;
+]]>    
+        </programlisting>
+            <scilab:image>
+<![CDATA[
+plot2d([0, 6],[0, 6], 0);
+str=["$\underleftrightarrow{\tiny{Scilab}}$"; "$\underleftrightarrow{\scriptsize{Scilab}}$";   
+     "$\underleftrightarrow{\footnotesize{Scilab}}$"; "$\underleftrightarrow{\small{Scilab}}$"; 
+     "$\underleftrightarrow{\normalsize{Scilab}}$"; "$\underleftrightarrow{\large{Scilab}}$";
+     "$\underleftrightarrow{\Large{Scilab}}$"; "$\underleftrightarrow{\LARGE{Scilab}}$";
+     "$\underleftrightarrow{\huge{Scilab}}$"; "$\underleftrightarrow{\Huge{Scilab}}$"];
+r = xstringl(0.5, 0.5, str, 5, 3);
+xrects([r(1); r(2)+r(4); r(3); r(4)]);
+xstring(r(1), r(2), str);
+txt = gce();
+txt.font_size = 3;
+txt.font_style = 5;
+txt.font_color = 2;
 
- ]]></programlisting>
-        <scilab:image>
-            plot2d([0;1],[0;1],0)
-            str=["$\underleftrightarrow{Scilab}$" "is";"not" "elisaB"];
-            r=xstringl(0.5,0.5,str)
-            xrects([r(1) r(2)+r(4) r(3) r(4)]')
-            xstring(r(1),r(2),str)
+str = ["${\tiny{\frac{x}{y}}$", "${\scriptsize{\frac{x}{y}}$", ..
+       "${\footnotesize{\frac{x}{y}}$", "${\small{\frac{x}{y}}$", ..
+       "${\normalsize{\frac{x}{y}}$", "${\large{\frac{x}{y}}$", ..
+       "${\Large{\frac{x}{y}}$", "${\LARGE{\frac{x}{y}}$", ..
+       "${\huge{\frac{x}{y}}$", "$\Huge{\frac{x}{y}}$"];
+r = xstringl(2, 0.5, str, 0, 3);
+xrects([r(1); r(2)+r(4); r(3); r(4)]);
+xstring(r(1), r(2), str);
+txt = gce();
+txt.font_size = 3;
+txt.font_style = 0;
+txt.font_color = 2;
+]]>    
         </scilab:image>
-        
     </refsection>
     <refsection role="see also">
         <title>See Also</title>