首页 > 解决方案 > 使用 MathJax 显示非内联数学

问题描述

如何在不内联的情况下显示 TeX?这是一个例子:

\textit{This will not render as latex} $\textit{but this will}$

这不会呈现为乳胶,但会。我希望它在没有 的情况下渲染$$,因为里面的一切都$$应该是数学。

这是我更新mathjax的方法

MathJax.typesetClear(mathjaxNodes);
            MathJax.typesetPromise(mathjaxNodes).then(() => {
                // the new content is has been typeset

            });

这是我的配置

MathJax = {
                        loader: {load: ['[tex]/ams']},
                        tex: {
                            inlineMath: [['$', '$'], ['\\(', '\\)']],
                            packages: {'[+]': ['ams']}
                        },
                        svg: {
                            // fontCache: 'global'
                        }
                    };

标签: javascriptmathjax

解决方案


推荐阅读