有什么方法可以使用 Mathjax 在 django 中显示动态呈现的 MathML 文本吗?
Is there any way to show dynamically rendered MathML text in django using Mathjax?
我正在使用 jQuery 和 AJAX 在 django 模板中呈现一些动态 MathML 文本。
虽然使用 Mathjax 库可以正确呈现非动态内容,但 Mathjax 无法转换动态内容。有谁知道解决方法。
一旦新的 MathJax 动态添加到您的页面,您需要调用 MathJax.typeset()
函数。
来自 MathJax 文档:
If you are writing a dynamic web page where content containing mathematics may appear after MathJax has already typeset the rest of the page, then you will need to tell MathJax to look for mathematics in the page again when that new content is produced. To do that, you need to use the MathJax.typeset() method. This will cause MathJax to look for unprocessed mathematics on the page and typeset it, leaving unchanged any math that has already been typeset.
我正在使用 jQuery 和 AJAX 在 django 模板中呈现一些动态 MathML 文本。 虽然使用 Mathjax 库可以正确呈现非动态内容,但 Mathjax 无法转换动态内容。有谁知道解决方法。
一旦新的 MathJax 动态添加到您的页面,您需要调用 MathJax.typeset()
函数。
来自 MathJax 文档:
If you are writing a dynamic web page where content containing mathematics may appear after MathJax has already typeset the rest of the page, then you will need to tell MathJax to look for mathematics in the page again when that new content is produced. To do that, you need to use the MathJax.typeset() method. This will cause MathJax to look for unprocessed mathematics on the page and typeset it, leaving unchanged any math that has already been typeset.