Example: MathML/Latex Formula;
MathMLFormula: "How to use for Web?"
MathMLFormula: "How to use for Air?"
MathMLFormula: "How to use for Mobile?"
MathMLFormula: Bugs or new features?
Example: MathML Editor Component;
MathMLEditor: "How to use for Web?"
MathMLEditor: "How to use for Air?"
| Install the components in Flex Builder 4.6 |
- Download the Formula components from download area (swc file and fonts)' - Unzip the package - Copy the swc file in your project/libs - Now you can see the component in Flex Builder - Design Mode ![]() - Copy the folder fontswf in project/bin-debug - Now you can test the component |
| How to use MathML/Latex Formula components |
<?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fmath="http://www.fmath.info" title="HomeView"> <fx:Script> <![CDATA[ protected function getLatex(event:MouseEvent):void { textareaLatexId.text = latexFormulaID.latex; } protected function setLatex(event:MouseEvent):void { latexFormulaID.latex = textareaLatexId.text; } protected function getMathML(event:MouseEvent):void { textareaId.text = new XML(mathmlFormulaID.mathML).toXMLString(); } protected function setMathML(event:MouseEvent):void { mathmlFormulaID.mathML = textareaId.text; } ]]> </fx:Script> <s:Group height="100%" width="100%"> <s:layout> <s:VerticalLayout horizontalAlign="center"/> </s:layout> <s:Group> <s:layout> <s:HorizontalLayout verticalAlign="middle"/> </s:layout> <s:Label color="#106A70" fontSize="16" fontWeight="bold" text="Latex Example:"/> <fmath:LatexFormula id="latexFormulaID" latex="\[(a+b)^2\]" mathcolor="#FF0F67" mathsize="35"/> </s:Group> <s:Group> <s:layout> <s:HorizontalLayout verticalAlign="middle"/> </s:layout> <s:Button click="getLatex(event)" label="get Latex from component"/> <s:Button click="setLatex(event)" label="set Latex to component"/> </s:Group> <s:TextArea width="434" height="50" editable="true" id="textareaLatexId" /> <s:Group> <s:layout> <s:HorizontalLayout verticalAlign="middle"/> </s:layout> <s:Label color="#106A70" fontSize="16" fontWeight="bold" text="MathML Example:"/> <fmath:MathMLFormula id="mathmlFormulaID" mathsize="35" mathvariant="circle" mathcolor="#0F0F67" > <fmath:mathML><![CDATA[<mrow><mrow><msup><mn>2</mn><mrow><msup><mi>x</mi><mn>2</mn> </msup><mo>+</mo><mrow><mn>4</mn><mi>x</mi></mrow><mo>+</mo> <mn>4</mn></mrow></msup><mo>+</mo><mrow><mn>4</mn><mi>x</mi></mrow><mo>+</mo> <mn>45</mn></mrow><mo>=</mo><mn>0</mn></mrow>]]> </fmath:mathML> </fmath:MathMLFormula> </s:Group> <s:Group> <s:layout> <s:HorizontalLayout verticalAlign="middle"/> </s:layout> <s:Button click="getMathML(event)" label="get MathML from component"/> <s:Button click="setMathML(event)" label="set MathML to component"/> </s:Group> <s:TextArea width="434" height="290" editable="true" id="textareaId"/> </s:Group> </s:View> ![]() |
| Settings |
<fmath:MathMLFormula mathsize="35" mathvariant="sans-serif" mathcolor="#850E0E" > <fmath:mathML> <![CDATA[<mrow><mrow><msup><mn>2</mn><mrow><msup><mi>x</mi> <mn>2</mn></msup><mo>+</mo><mrow><mn>4</mn><mi>x</mi> </mrow><mo>+</mo><mn>4</mn></mrow></msup><mo>+</mo> <mrow><mn>4</mn><mi>x</mi></mrow><mo>+</mo><mn>45</mn> </mrow><mo>=</mo><mn>0</mn></mrow>]]> </fmath:mathML> </fmath:MathMLFormula> mathsize - The font size used for formula, default is 24 mathvariant - The font family used for formula, default is normal mathcolor - The font color used for formula, default is #000000 mathML - The mathml for MathML formula latex - The latex for Latex formula ![]() |
| Deployment |
- DO NOT FORGET to copy also the folder fontswf with the distribution - The folder fontswf MUST be in the same folder with your application |
| free components MathML flex GWT LaTeX Editor Air plugin MathML flash math Mathematics Equation Widget Mobile flash LaTeX Mathematics FREE Apple iOS OMML Android iPad iPhone Microsoft Word Latex MathML OMML Free |