nabu1185 / mathmleditor

Automatically exported from code.google.com/p/mathmleditor
0 stars 0 forks source link

\[sin θ = sin θ + 2 k &pgr; \] #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Dear Lonel, 
I was going through your fmath plugin it look relay incredible. thank you for 
it. 
But I need to inform you that I found interesting bug in it and small solutionn 
of it.

Step to reproduce
- open fmath   (http://www.fmath.info/editor/example.jsp)
- Create formula with special characters  like (pi)
                              Example: \[sin θ = sin θ + 2 k π \] 
-Click on  button that look like "<>" to get XML of this equation 
- Click it again to get back to equation  

Expected result: \[sin θ = sin θ + 2 k π \] 
Actual result: \[sin θ = sin θ + 2 k &pgr; \] 

solution:
if we open this equation like XML 
we get :
<math>
        <mrow>
                <mrow selected="true">
                        <mo>sin</mo>
                        <mi>&theta;</mi>
                        <mo>=</mo>
                        <mo>sin</mo>
                        <mfenced>
                                <mi>&theta;</mi>
                                <mo>+</mo>
                                <mn>2</mn>
                                <mn>k</mn>
                                <mn>&pgr;</mn>
                        </mfenced>
                </mrow>
        </mrow>
</math>
if Cheng  <mn> and <mi> to <mtext>
like :
<mathml>
        <mrow>
                <mtext selected="true">sin</mtext>
                <mtext>&theta;</mtext>
                <mo>=</mo>
                <mtext>sin</mtext>
                <mfenced>
                      <mtext>&theta;</mtext>
                      <mo>+</mo>
                      <mtext>2</mtext>
                      <mtext>k</mtext>
                      <mtext>&pgr;</mtext>
               </mfenced>
        </mrow>
</mathml>
and than click on "<>" button it will look like   \[sin θ = sin θ + 2 k π \] 

Hopefully it will help you!

best regards, 

Leonid Dushin 

Original issue reported on code.google.com by ionel.alexandru@gmail.com on 16 Mar 2011 at 4:48

GoogleCodeExporter commented 9 years ago

Original comment by ionel.alexandru@gmail.com on 22 Mar 2011 at 6:38