【发布时间】:2014-09-07 11:40:55
【问题描述】:
我们有一个包含方程式的 word/docx 文件。使用 POI 的 XWPFWordExtractor.getText 不会读取方程式。
我的问题是:
- 这些方程是什么/如何表示的?
- 如何阅读它们(我希望最终将它们显示在 HTML 上 - 作为 MathML??)?
谢谢!
【问题讨论】:
标签: java ms-word apache-poi docx mathml
我们有一个包含方程式的 word/docx 文件。使用 POI 的 XWPFWordExtractor.getText 不会读取方程式。
我的问题是:
谢谢!
【问题讨论】:
标签: java ms-word apache-poi docx mathml
docx 文件中的方程式是使用 omml m:oMathPara/m:oMath 表示的:
<m:oMathPara xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math">
<m:oMath>
我不了解 POI,但在 docx4j 中,该命名空间中的元素使用 org.docx4j.math 中的 JAXB 生成的对象表示
我将通过编组 m:oMathPara/m:oMath 来解决您的第二个问题,然后通过 omml2mathml.xsl 进行转换,请参阅 Murray Sargent 的博客(例如 here 和 here)。
【讨论】: