返回介绍

Using MathJax in popular web platforms

发布于 2019-07-04 19:44:32 字数 3021 浏览 1031 评论 0 收藏 0

MathJax plugins are available for a growing number of wikis, blogs, and other content-management systems. These include WordPress, Blogger, Sphinx, TiddlyWiki, and MathEL-Wiki. A list of these is available in the web applications list of the MathJax web site.

If the program you are using is not one of these, you may still be able to use MathJax by modifying the theme or template for your wiki or blog, as explained below.

Using MathJax in a Theme File

Most web-based content-management systems include a theme or template layer that determines how the pages look, and that loads information common to all pages. Such theme files provide one popular way to include MathJax in your web templates in the absence of MathJax-specific plugins for the system you are using. To take advantage of this approach, you will need access to your theme files, which probably means you need to be an administrator for the site; if you are not, you may need to have an administrator do these steps for you.

To enable MathJax in your web platform, add the line:

<script type="text/javascript"
   src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

either just before the </head> tag in your theme file, or at the end of the file if it contains no </head>.

The theme files for various popular platforms are:

WordPress
wp-content/themes/[current_theme]/header.php
Movable Type
[current_theme_templates]/html_head.mhtml
Drupal
themes/[current_theme]/page.tpl.php
Joomla
templates/[current_theme]/index.php
MediaWiki
skins/[current_skin].php
TiddlyWiki
*.php (Whatever you call your TiddlyWiki php file)
Moodle
theme/[current_theme]/header.html

Keep in mind that this will enable MathJax for your current theme/template only. If you change themes or update your theme, you will have to repeat these steps.

Instructions for Specific Platforms

Some programs, such as WordPress and Moveable Type, allow you to edit template files from inside their administrator interfaces. Specific instructions for these are given via the links below.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文