From Math ML Circular right and left Bracket getting small after converting html to docx using aspose.words in java.
Html:
String mathml = "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"inline\"><mrow><mo>=</mo><msqrt><mrow><msup><mrow><mo stretchy=\"true\" fence=\"true\" form=\"prefix\">(</mo><msqrt><mrow><mfrac><mrow><mn>5</mn></mrow><mrow><mn>2</mn></mrow></mfrac></mrow></msqrt><mo stretchy=\"true\" fence=\"true\" form=\"postfix\">)</mo></mrow><mrow><mn>2</mn></mrow></msup><mo>−</mo><mrow><mo stretchy=\"true\" fence=\"true\" form=\"prefix\">(</mo><mfrac><mrow><mn>9</mn></mrow><mrow><mn>6</mn></mrow></mfrac><mo stretchy=\"true\" fence=\"true\" form=\"postfix\">)</mo></mrow></mrow></msqrt><mo>=</mo><msqrt><mrow><mfrac><mrow><mn>1</mn><mn>5</mn></mrow><mrow><mn>6</mn></mrow></mfrac><mo>−</mo><mfrac><mrow><mn>9</mn></mrow><mrow><mn>6</mn></mrow></mfrac></mrow></msqrt><mo>=</mo><mn>1</mn></mrow></math>";
code :
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
//builder.writeln("Hello, world!");
builder.insertHtml(mathml, true);
doc.save("output.docx");
Generated word file :
output.docx (7.4 KB)
Expected out put :
Guide us to get expected out put.