admin管理员组文章数量:1356758
I try to integrate xyjax-v3 into my VitePress project , but I failed . VitePress use markdown-it-mathjax to render math equations . It supports all extensions listed here except xyjax-v3 .
To make it possible to support xyjax-v3 , I git clone
the entire markdown-it-mathjax . Here is part of the index.ts
:
...
import { mathjax } from "mathjax-full/js/mathjax.js";
import { TeX } from "mathjax-full/js/input/tex.js";
import { SVG } from "mathjax-full/js/output/svg.js";
import { liteAdaptor } from "mathjax-full/js/adaptors/liteAdaptor.js";
import { RegisterHTMLHandler } from "mathjax-full/js/handlers/html.js";
import { AllPackages } from "mathjax-full/js/input/tex/AllPackages.js";
import { AssistiveMmlHandler } from "mathjax-full/js/a11y/assistive-mml.js";
...
interface DocumentOptions {
InputJax: TeX<unknown, unknown, unknown>;
OutputJax: SVG<unknown, unknown, unknown>;
}
...
Notice that it uses MathJax's document options , which has 5 developer options . In our case it uses InputTeX
and OutputTeX
; but where should I put the following things , according to the readme.md
of XyJax-v3 ?
loader: {
load: ['[custom]/xypic.js'],
paths: {
custom: '/[email protected]/build/',
},
},
tex: {
packages: { '[+]': ['xypic'] },
},
本文标签: javascriptMathJax39s Loader Option with TypeScriptStack Overflow
版权声明:本文标题:javascript - MathJax's Loader Option with TypeScript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743999281a2573560.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论