1 Star 0 Fork 1

微笑/clone.MathJax-demos-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
v2-script-tags.html 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
Davide P. Cervone 提交于 2020-02-07 09:17 . Make sure IE opens as IE11
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width">
<title>MathJax v3 with v2-compatible script tags for storing math</title>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
options: {
renderActions: {
find: [10, function (doc) {
for (const node of document.querySelectorAll('script[type^="text/tex"]')) {
const display = !!node.type.match(/; *mode=display/);
const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
const text = document.createTextNode('');
node.parentNode.replaceChild(text, node);
math.start = {node: text, delim: '', n: 0};
math.end = {node: text, delim: '', n: 0};
doc.math.push(math);
}
}, '']
}
}
};
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
</head>
<body>
<script type="text/tex">x + 1</script>
<script type="text/tex; mode=display">x+1\over x-1</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/z.smile/clone.MathJax-demos-web.git
git@gitee.com:z.smile/clone.MathJax-demos-web.git
z.smile
clone.MathJax-demos-web
clone.MathJax-demos-web
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385