* Bug #13432 fixed - xstringl help page was not clear about fonts and Latex-rendered... 13/15013/3
Vladislav TRUBKIN [Fri, 8 Aug 2014 09:50:57 +0000 (11:50 +0200)]
*xstringl.sci: there was a wrong coordinate of 'y'.

Change-Id: I05bc18a3e6057eb94e6b9a4687056db80241a2f3

scilab/CHANGES_5.5.X
scilab/modules/graphics/help/en_US/text/xstringl.xml
scilab/modules/graphics/help/fr_FR/text/xstringl.xml
scilab/modules/graphics/macros/xstringl.sci
scilab/modules/helptools/etc/images_md5.txt
scilab/modules/helptools/images/xstringl_1.png
scilab/modules/helptools/images/xstringl_2.png [new file with mode: 0644]
scilab/modules/helptools/images/xstringl_3.png [new file with mode: 0644]

index 90e5eab..f6e085a 100644 (file)
@@ -158,6 +158,8 @@ Scilab Bug Fixes
 
 * Bug #13426 fixed - optim help page was written with bad indentation.
 
+* Bug #13432 fixed - xstringl help page was not clear about fonts and Latex-rendered text.
+
 * Bug #13435 fixed - Windows version crashes when calling xmlRemove on the first child.
 
 * Bug #13438 fixed - drawaxis did not return the handle of the created axis.
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>
index c793508..fa1c3f6 100644 (file)
             <varlistentry>
                 <term>fonId</term>
                 <listitem>
-                    <para>un entier specifiant le type de la fonte.</para>
+                    <para>un entier specifiant le type de la fonte. Pour plus d'informations, voir <link linkend="graphics_fonts">graphics_fonts</link></para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>fontSize</term>
                 <listitem>
-                    <para>un entier specifiant la taille de la fonte.</para>
+                    <para>un entier specifiant la taille de la fonte. Pour plus d'informations, voir <link linkend="graphics_fonts">graphics_fonts</link></para>
                 </listitem>
             </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
         <title>Exemples</title>
-        <programlisting role="example"><![CDATA[ 
-plot2d([0;1],[0;1],0)
-str=["Scilab" "n''est ";"$\varinjlim pas$" "Matlab"]; // LaTeX rendering (>= 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"];
+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" "n''est "; "pas" "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"];
+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;
- ]]></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)
-        </scilab:image>
+str = ["Scilab" "n''est "; "pas" "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);
+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", "peut √©crire LaTeX :", "$\frac{abc}{xyz}$"; "ou", "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);
+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", "peut √©crire LaTeX :", "$\frac{abc}{xyz}$"; "ou", "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;
+
+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>Voir aussi</title>
index cd58bb4..3cff5b5 100644 (file)
@@ -40,12 +40,11 @@ function [rect] = xstringl( varargin )
     // convert corners into position and size
     // position, upper-left point
     rect(1) = corners (1,2); // x
-    rect(2) = corners (2,2); // y
+    rect(2) = corners (2,1); // y
 
     // size width, height
     rect(3) = abs(corners(1,3) - corners(1,1));
     rect(4) = abs(corners(2,3) - corners(2,1));
 
-
 endfunction
 
index 4b9e6be..e98a67b 100644 (file)
@@ -1225,7 +1225,9 @@ xsetech_2.png=45c810d91fb4dcdd855aef433b7f44d8
 xsetech_3.png=702ac81ee5024ba15ab34176ebce2e73
 xstring_1.png=6b33769d0916b641755a0fa056f10378
 xstringb_1.png=c7c1db7aee55fde60cc5c0d5314f9ce5
-xstringl_1.png=7a318325ae28e851a48d79d70312683a
+xstringl_1.png=77cf3298ae33ee0458bb4bedd536377a
+xstringl_2.png=e8b53d8536f460722b24fd87537a03bb
+xstringl_3.png=88b6cd599658f1be8239b1e88ea28bce
 xtitle_1.png=91a652a9e42e4f149b0d206313acce42
 yulewalk_1.png=54e2dafd6ca56415ef58029a25f134a3
 yulewalk_2.png=8b62c274c3250a6037f45a22e0e3c066
index 448bb33..3c4f6f5 100644 (file)
Binary files a/scilab/modules/helptools/images/xstringl_1.png and b/scilab/modules/helptools/images/xstringl_1.png differ
diff --git a/scilab/modules/helptools/images/xstringl_2.png b/scilab/modules/helptools/images/xstringl_2.png
new file mode 100644 (file)
index 0000000..09077fd
Binary files /dev/null and b/scilab/modules/helptools/images/xstringl_2.png differ
diff --git a/scilab/modules/helptools/images/xstringl_3.png b/scilab/modules/helptools/images/xstringl_3.png
new file mode 100644 (file)
index 0000000..80119d6
Binary files /dev/null and b/scilab/modules/helptools/images/xstringl_3.png differ