且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

插入MATHML,纺织品或乳胶公式在MS Word .docs?

更新时间:2023-11-26 13:31:40

字(2007+)可以接受MATHML关闭剪贴板。在Windows 7数学输入面板为例,其插入按钮,简单地把生成的MATHML剪贴板上,然后发送一个模拟的控制-V键事件到下一个活动的应用程序,希望插入MATHML在当前点。

Word (2007+) can accept MathML off the clipboard. The Windows 7 Math Input Panel for example, on its "insert" button simply puts the generated MathML on the clipboard and then sends a simulated control-v key event to the next active application which hopefully inserts the mathml at the current point.

在内部Word 2007中通过运行MathML的XSLT样式表生成OOML标记它然后插入,使数学区域中的docx文件来实现的。

Internally Word 2007 does this by running an XSLT stylesheet of the MathML to generate OOML markup which it then inserts to make a math zone in the docx file.

样式表通常是作为像

/Program Files/Microsoft Office/Office12/OMML2MML.XSL

所以另一种方法,让你更多的控制是可以直接使用.NET XSLT处理器来转换MATHML到OMML然后在OOXML XML文件或通过办公室的API ooMML添加到文档的内容的XML。

so an alternative approach which gives you more control is to use the .NET XSLT processor to transform the MathML to OMML and then either directly in the ooxml xml files or via the office API add the ooMML to the document's content xml.