nabu1185 / mathmleditor

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

Error showing while setting mathML value to MathMLEditor. #89

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I extracted equation from MS Word 2010 in mathML format (which prety much looks 
like xml syntax) and assigned it to the mathMLEditor in Flex 4.6. but it shows 
me the error :Error #1065: Variable I8 is not defined.
    at flash.system::ApplicationDomain/getDefinition()
    at fmath::a191/b2()[C:\devzone\obfuscateProjects\flex\MathMLEditorLibProject\src\fmath\a191.as:57]

I have also downloaded and referenced the library projects - 
MathMLEditorLibProject.swc and MathMLFormulaLibProject.swc.

The value which I retrieve from word file and assign it to mathMLEditor is :
<m:oMathPara>
                <m:oMathParaPr>
                    <m:jc m:val="left"/>
                </m:oMathParaPr>
                <m:oMath>
                    <m:sSup>
                        <m:sSupPr>
                            <m:ctrlPr>
                                <w:rPr>
                                    <w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math" w:cstheme="minorHAnsi"/>
                                    <w:color w:val="000000"/>
                                </w:rPr>
                            </m:ctrlPr>
                        </m:sSupPr>
                        <m:e>
                            <m:d>
                                <m:dPr>
                                    <m:ctrlPr>
                                        <w:rPr>
                                            <w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math" w:cstheme="minorHAnsi"/>
                                            <w:color w:val="000000"/>
                                        </w:rPr>
                                    </m:ctrlPr>
                                </m:dPr>
                                <m:e>
                                    <m:r>
                                        <w:rPr>
                                            <w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math" w:cstheme="minorHAnsi"/>
                                            <w:color w:val="000000"/>
                                        </w:rPr>
                                        <m:t>x+a</m:t>
                                    </m:r>
                                </m:e>
                            </m:d>
                        </m:e>
                        <m:sup>
                            <m:r>
                                <w:rPr>
                                    <w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math" w:cstheme="minorHAnsi"/>
                                    <w:color w:val="000000"/>
                                </w:rPr>
                                <m:t>n</m:t>
                            </m:r>
                        </m:sup>
                    </m:sSup>
                    <m:r>
                        <w:rPr>
                            <w:rFonts w:ascii="Cambria Math" w:eastAsia="Cambria Math" w:hAnsi="Cambria Math" w:cs="Cambria Math"/>
                            <w:color w:val="000000"/>
                        </w:rPr>
                        <m:t>=</m:t>
                    </m:r>
                    <m:nary>
                        <m:naryPr>
                            <m:chr m:val="?"/>
                            <m:grow m:val="1"/>
                            <m:ctrlPr>
                                <w:rPr>
                                    <w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math" w:cstheme="minorHAnsi"/>
                                    <w:color w:val="000000"/>
                                </w:rPr>
                            </m:ctrlPr>
                        </m:naryPr>
                        <m:sub>
                            <m:r>
                                <w:rPr>
                                    <w:rFonts w:ascii="Cambria Math" w:eastAsia="Cambria Math" w:hAnsi="Cambria Math" w:cs="Cambria Math"/>
                                    <w:color w:val="000000"/>
                                </w:rPr>
                                <m:t>k=0</m:t>
                            </m:r>
                        </m:sub>
                        <m:sup>
                            <m:r>
                                <w:rPr>
                                    <w:rFonts w:ascii="Cambria Math" w:eastAsia="Cambria Math" w:hAnsi="Cambria Math" w:cs="Cambria Math"/>
                                    <w:color w:val="000000"/>
                                </w:rPr>
                                <m:t>n</m:t>
                            </m:r>
                        </m:sup>
                        <m:e>
                            <m:d>
                                <m:dPr>
                                    <m:ctrlPr>
                                        <w:rPr>
                                            <w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math" w:cstheme="minorHAnsi"/>
                                            <w:color w:val="000000"/>
                                        </w:rPr>
                                    </m:ctrlPr>
                                </m:dPr>
                                <m:e>
                                    <m:f>
                                        <m:fPr>
                                            <m:type m:val="noBar"/>
                                            <m:ctrlPr>
                                                <w:rPr>
                                                    <w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math" w:cstheme="minorHAnsi"/>
                                                    <w:color w:val="000000"/>
                                                </w:rPr>
                                            </m:ctrlPr>
                                        </m:fPr>
                                        <m:num>
                                            <m:r>
                                                <w:rPr>
                                                    <w:rFonts w:ascii="Cambria Math" w:eastAsia="Cambria Math" w:hAnsi="Cambria Math" w:cs="Cambria Math"/>
                                                    <w:color w:val="000000"/>
                                                </w:rPr>
                                                <m:t>n</m:t>
                                            </m:r>
                                        </m:num>
                                        <m:den>
                                            <m:r>
                                                <w:rPr>
                                                    <w:rFonts w:ascii="Cambria Math" w:eastAsia="Cambria Math" w:hAnsi="Cambria Math" w:cs="Cambria Math"/>
                                                    <w:color w:val="000000"/>
                                                </w:rPr>
                                                <m:t>k</m:t>
                                            </m:r>
                                        </m:den>
                                    </m:f>
                                </m:e>
                            </m:d>
                            <m:sSup>
                                <m:sSupPr>
                                    <m:ctrlPr>
                                        <w:rPr>
                                            <w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math" w:cstheme="minorHAnsi"/>
                                            <w:color w:val="000000"/>
                                        </w:rPr>
                                    </m:ctrlPr>
                                </m:sSupPr>
                                <m:e>
                                    <m:r>
                                        <w:rPr>
                                            <w:rFonts w:ascii="Cambria Math" w:eastAsia="Cambria Math" w:hAnsi="Cambria Math" w:cs="Cambria Math"/>
                                            <w:color w:val="000000"/>
                                        </w:rPr>
                                        <m:t>x</m:t>
                                    </m:r>
                                </m:e>
                                <m:sup>
                                    <m:r>
                                        <w:rPr>
                                            <w:rFonts w:ascii="Cambria Math" w:eastAsia="Cambria Math" w:hAnsi="Cambria Math" w:cs="Cambria Math"/>
                                            <w:color w:val="000000"/>
                                        </w:rPr>
                                        <m:t>k</m:t>
                                    </m:r>
                                </m:sup>
                            </m:sSup>
                            <m:sSup>
                                <m:sSupPr>
                                    <m:ctrlPr>
                                        <w:rPr>
                                            <w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math" w:cstheme="minorHAnsi"/>
                                            <w:color w:val="000000"/>
                                        </w:rPr>
                                    </m:ctrlPr>
                                </m:sSupPr>
                                <m:e>
                                    <m:r>
                                        <w:rPr>
                                            <w:rFonts w:ascii="Cambria Math" w:eastAsia="Cambria Math" w:hAnsi="Cambria Math" w:cs="Cambria Math"/>
                                            <w:color w:val="000000"/>
                                        </w:rPr>
                                        <m:t>a</m:t>
                                    </m:r>
                                </m:e>
                                <m:sup>
                                    <m:r>
                                        <w:rPr>
                                            <w:rFonts w:ascii="Cambria Math" w:eastAsia="Cambria Math" w:hAnsi="Cambria Math" w:cs="Cambria Math"/>
                                            <w:color w:val="000000"/>
                                        </w:rPr>
                                        <m:t>n-k</m:t>
                                    </m:r>
                                </m:sup>
                            </m:sSup>
                        </m:e>
                    </m:nary>
                </m:oMath>
            </m:oMathPara>

Original issue reported on code.google.com by CSekhar...@gmail.com on 2 Apr 2013 at 7:00

GoogleCodeExporter commented 9 years ago
How do I fix it ? How to display the mathml into the mathMLEditor taking inputs 
from Microsoft word 2010 ?

Original comment by CSekhar...@gmail.com on 3 Apr 2013 at 5:47

GoogleCodeExporter commented 9 years ago
Hi,

To import from Microsoft Word I have only one way.
Click on Opne Button / choose Microsoft Word files and select your word 
document.
I can't add/insert OMML direct.

regards

Original comment by ionel.alexandru@gmail.com on 3 Apr 2013 at 1:05

GoogleCodeExporter commented 9 years ago
Thanks Alexandru for your reply.

But isn't there any way to pass the string extracted from word document(docx) 
to the Editor or Formula so that we can get the MathML generated from it. The 
scenario is I have a specific format of word document(kind of form type -having 
table rows and columns where user enters the values and equations). Now this 
document apart from equations has other data which are not required to be 
passed for MathML generation. So in this case how do I achieve the desired 
output ? I want to generate the MathML generated for the equations entered in 
the word document.

Thank you so much for your patience in replying to my query.

Original comment by CSekhar...@gmail.com on 4 Apr 2013 at 8:58

GoogleCodeExporter commented 9 years ago
Hi,

This version doesn't have any other way to convert omml to MathML.
But I can do to verify the tag <m:oMathPara> and to convert to MathML.

regards

Original comment by ionel.alexandru@gmail.com on 4 Apr 2013 at 1:03