Please browse the files in the following package.
math.pptx.zip (328.2 KB)
I want to export math equations from presentations. so, I run the following code:
snap1.png (63.6 KB)
Presentation presentation = new Presentation(filePath);
((MathPortion)((AutoShape)presentation.getSlides().get_Item(0).getShapes().get_Item(1)).getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(3)).getMathParagraph().writeAsMathMl(new FileOutputStream("mathml.xml"));
I have obtained the following documents:
mathml.xml.zip (648 Bytes)
Then I pasted the content of the file into the HTML webpage.
snap2.png (90.1 KB)
The formula in the blue box in the following figure is displayed in red, with a font size of 30.
snap3.png (264.5 KB)
But the formula displayed on my webpage is black with a font size of 16.
snap4.png (261.0 KB)
Can you tell me how to get MathML that is consistent with PowerPoint?Any help would be appreciated.
OS: macOS 13.4
JVM: OpenJDK 64-Bit Server VM (17.0.1+12-39, mixed mode, emulated-client, sharing)
Java: version 17.0.1, vendor Oracle Corporation
sdk: aspose.slides-23.5