如何检测mathjax何时完全加载? [英] How to detect when mathjax is fully loaded?

查看:387
本文介绍了如何检测mathjax何时完全加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论如何,都可以确定何时将mathjax完全加载以处理数学.我需要在mathjax完全加载之前隐藏我的数学方程,并在平均时间内显示正在加载"消息.

Is there anyway to identify when the mathjax is fully loaded to process mathematics. I need to hide my mathematics equations before mathjax is fully loaded and show 'loading' message in mean time.

推荐答案

对于那些可能正在寻找答案的人,这是我从Mathjax开发人员那里得到的答复

For those who might be looking for the answer, this is the response i got from Mathjax developer

与MathJax的启动操作同步的方法是注册一个StartupHook,该启动将在启动完成时触发.例如,您可以使用

The way to synchronize with MathJax's startup actions it to register a StartupHook that will fire when the startup is complete. For example, you can use

MathJax.Hub.Register.StartupHook("End",function () { ... your startup code here ... });

或 如果您使用的是 MathJax/config/MathJax.js中的默认MathJax配置文件.那 应该让您了解MathJax的初始化序列,以便您可以 在正确的时间进行自己的设置.

at the end of the tag that configures MathJax, or in a separate tag just after loading MathJax if you are using the default MathJax configuration file in MathJax/config/MathJax.js. That should let you hook into MathJax's initialization sequence so you can do your own setup at the right time.

感谢大卫

这篇关于如何检测mathjax何时完全加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆