找回密码
 快速注册
搜索
查看: 29|回复: 0

MS Word如何将剪贴板中的MathML公式转换为OMML

[复制链接]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2022-8-21 07:00 |阅读模式
作为MS Word的一部分,有一个 XSLT 1 样式表可以执行转换,它负责将 MathML 放到 Word 的剪贴板上.默认安装路径为C:/Program Files (x86)/Microsoft Office/Office14/OMML2MML.XSL
对此的早期版本有一些讨论http://dpcarlisle.blogspot.co.uk/2007/04/xhtml-and-mathml-from-office-20007.html
例如$x^2+\frac23$的两种XML为:
OMMLMathML
<m:oMathPara>
        <m:oMath>
                <m:sSup>
                        <m:sSupPr>
                                <m:ctrlPr>
                                        <w:rPr>
                                                <w:i/>
                                        </w:rPr>
                                </m:ctrlPr>
                        </m:sSupPr>
                        <m:e>
                                <m:r>
                                        <m:t>x</m:t>
                                </m:r>
                        </m:e>
                        <m:sup>
                                <m:r>
                                        <m:t>2</m:t>
                                </m:r>
                        </m:sup>
                </m:sSup>
                <m:r>
                        <m:t>+</m:t>
                </m:r>
                <m:f>
                        <m:fPr>
                                <m:ctrlPr>
                                        <w:rPr>
                                                <w:i/>
                                        </w:rPr>
                                </m:ctrlPr>
                        </m:fPr>
                        <m:num>
                                <m:r>
                                        <m:t>2</m:t>
                                </m:r>
                        </m:num>
                        <m:den>
                                <m:r>
                                        <m:t>3</m:t>
                                </m:r>
                        </m:den>
                </m:f>
        </m:oMath>
</m:oMathPara>
<math xmlns="http://www.w3.org/1998/Math/MathML">
  <msup>
    <mi>x</mi>
    <mn>2</mn>
  </msup>
  <mo>+</mo>
  <mfrac>
    <mn>2</mn>
    <mn>3</mn>
  </mfrac>
</math>

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 15:26

Powered by Discuz!

× 快速回复 返回顶部 返回列表