【问题标题】:LaTeX formulas after load html加载 html 后的 LaTeX 公式
【发布时间】:2016-01-09 22:57:48
【问题描述】:

我想在使用后加载Mathjaxscript

( 'div#someone' ).load( "http source" )

实际上,当页面在页眉中完全加载时,它可以完美地工作。

<script class="mathlab" type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [["$","$"], ["\\(","\\)"]]}});</script>
<script class="mathlab" type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

有人知道如何在加载后刷新脚本吗?或者也许是另一个脚本?

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>



<script type="text/javascript">
    $("button").click(function() {
         $("div").text( "Hello ! What is $x$ in the formula : $$x+3=7$$" );
    });
</script>
Hello ! What is $x$ in the formula : $$x+3=7$$
<div> <button>Load something</button> </div>

【问题讨论】:

  • 未来注意事项:cdn.mathjax.org 即将结束生命周期,请查看 mathjax.org/cdn-shutting-down 以了解迁移提示。

标签: javascript jquery html latex mathjax


【解决方案1】:

只需添加

$( "div#someone" ).load( "http source", function () {
    MathJax.Hub.Queue(["Typeset", MathJax.Hub, "div#someone"]);
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-02-21
    • 1970-01-01
    • 2015-07-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-12
    相关资源
    最近更新 更多