我试图在MathML中使用MathML中的OpenMath。该代码是下面在MathML和MathJax中使用OpenMath注释
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mixed Markup</title>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
MathML: {
extensions: ["content-mathml.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow>
<mrow>
<mi>sin</mi>
<mo>⁡<!--FUNCTION APPLICATION--></mo>
<mfenced><mi>x</mi></mfenced>
</mrow>
<mo>+</mo>
<mn>5</mn>
</mrow>
<annotation encoding="application/x-tex">
\sin x + 5
</annotation>
<annotation-xml encoding="application/openmath+xml">
<OMA xmlns="http://www.openmath.org/OpenMath">
<OMS cd="arith1" name="plus"/>
<OMA><OMS cd="transc1" name="sin"/><OMV name="x"/></OMA>
<OMI>5</OMI>
</OMA>
</annotation-xml>
</semantics>
</math>
</body>
当我写上面的代码,注解XAL标签和OMA的内容被 红色像捕获的图像以下
(为更详细地, 的在encoding
的红线原因是Wrong attribute value
和xmlns
是URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs)
并且在MathML3(http://www.w3.org/TR/MathML3/chapter5.html#html.annotation.xml)的文档中,他们说
“请注意,如果MathML不被视为XML文档,则示例中使用的名称空间可扩展性可能不可用。 ...特别是HTML解析器将xmlns属性视为普通属性,因此OpenMath示例将被HTML验证程序归为无效。“
但我不明白它的含义,特别是'MathML不是作为XML文档”处理
我能做些什么在MathML和MathJax使用OpenMath(?)?
未来的注意事项:cdn.mathjax.org即将结束生命周期,请查看https://www.mathjax.org/cdn-shutting-down/获取迁移提示。 –