javascript - 如何将数字或字符转换为 MathML 格式?
问题描述
示例示例,
yes -> <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>y</mi><mi>e</mi><mi>s</mi></math>
99 -> <math xmlns="http://www.w3.org/1998/Math/MathML"><mn>99</mn></math>
对于那些给定的输入,我想获得相应的 mathml 表达式。我这样做是因为mathtype.setMathML(99)
不起作用,应该是mathtype.setMathML(<math xmlns="http://www.w3.org/1998/Math/MathML"><mn>99</mn></math>)
我正在使用mathtype_web。
解决方案
<mtext>
进入救援。我们可以用它来渲染数字或字符。
mathtype.setMathML(<math xmlns="http://www.w3.org/1998/Math/MathML"><mtext>{NUMBER or CHARACTERS}</mtext></math>)
推荐阅读
- android - 如何使用 JSPDF 从 Chrome/Safari 打印按钮?
- azure - Azure PowerShell - 虚拟机标记报告
- jquery - jqueryUI 可拖动的可拖放和来自数组的项目问题
- python - 对于 Python 中的范围(y)中的 y
- python - (Python)模拟在另一个方法中调用的方法的返回值
- php - 在 PHP 应用程序中使用 Azure Active Directory 对 MySQL 进行身份验证
- google-apps-script - 我的 Y 轴不会出现在我编写的脚本中?
- c# - C# 为什么我的数组的所有值都相同?
- kubernetes - kubectl get all - 命令返回 - 限制请求
- php - 如何在php中从css重新加载背景图像?