For faster navigation, this Iframe is preloading the Wikiwand page for MathJax.

MathJax

MathJax
开发者American Mathematical Society
当前版本
  • 3.2.2 (2022年6月8日;稳定版本)[1][2]
编辑维基数据链接
原始码库 编辑维基数据链接
编程语言JavaScript
操作系统Cross-platform
类型Mathematical software
许可协议Apache License 2.0
网站www.mathjax.org

MathJax是一个跨浏览器JavaScript库,它使用MathMLLaTeX和ASCIIMathML标记在Web浏览器中显示数学符号[3][4][5]MathJax是在Apache许可证下作为开源软件发布的。

MathJax项目始于2009年,是早期JavaScript数学格式化库jsMath的继承者,[6]美国数学学会管理。[7]该项目由美国数学学会、设计科学学会、工业和应用数学学会共同发起,并得到美国物理联合会Stack Exchange等众多资助机构的支持。[8]

MathJax被arXiv[9]爱思唯尔ScienceDirect[10]、MathSciNet[11]、n-category cafe、MathOverflow维基百科(在后台)[12][13]Scholarpedia、Project Euclid期刊[14]IEEE Xplore[15]、Publons、Coursera和全俄数学门户网站等网站使用。[16]

特性

MathJax下载网页内容,扫描页面内容寻找等式标记,并对数学进行排版。因此,MathJax不需要在阅读器系统上安装软件或额外的字体。这允许MathJax在任何支持JavaScript的浏览器中运行,包括移动设备。[17]

MathJax可以使用HTMLCSS的组合显示数学,或者在可用时使用浏览器的原生MathML支持。MathJax用于排版数学的确切方法取决于用户浏览器的功能、用户系统上可用的字体和配置设置。MathJax 自 v2.0-beta版引入了SVG渲染功能。[18]

在HTML和CSS排版的情况下,MathJax通过使用数学字体(如果有的话)和使用旧浏览器的图像来最大化数学显示质量。对于支持Web字体的新浏览器,MathJax提供了一组全面的Web字体,可以根据需要下载。如果浏览器不支持Web字体,MathJax将检查用户系统上是否有有效的字体。如果这不起作用,MathJax将提供所需符号的图像。可以配置MathJax来启用或禁用Web字体、本地字体和图像字体。

MathJax使用STIX字体在Web页面中包含数学。在本地电脑上安装字体可以提高MathJax的排版速度。[19]

MathJax可以显示用LaTeX或MathML标记编写的数学符号。因为MathJax只用于数学显示,而LaTeX是一种文档布局语言,所以MathJax只支持用于描述数学表示法的LaTeX子集。[17]

MathJax还通过其API将MathML公开给辅助技术软件,以及基本的WAI-ARIA“角色”和更老的“altext”属性,从而支持数学可访问性。[20]

MathJax体系结构旨在通过动态加载的模块支持在将来添加输入语言和显示方法。MathJax还包括一个JavaScript API,用于枚举页面中的数学实例并与之交互。

浏览器兼容性

MathJax在大多数流行的浏览器中呈现数学,包括Internet Explorer 6+、Firefox 3+、Google Chrome 0.3+、Safari 2.0+、Opera 9.5+、iPhone/iPad Safari和Android浏览器。一些旧版本的浏览器不支持Web字体(使用@font-face CSS结构),因此它们必须使用MathJax图像字体模式。浏览器兼容性列表可以在官方网站上找到。[21]

插件支持

MathJax可以很容易地添加到许多流行的Web平台上。[22]

Node.js

MathJax可以通过MathJax-node库在NodeJS中使用[23]

公式编辑器的兼容性

在受支持的浏览器中显示的任何MathJax公式,都可以通过右键单击或控件单击“Show Math as”子菜单,以MathML或LaTeX格式复制出来。然后,它可以粘贴到任何支持MathML或LaTeX的公式编辑器中,例如MathematicaMathType、MathMagic、Firemath,以便重用。[24]

任何第三方公式编辑器以MathML或LaTeX格式生成的方程都可以在支持MathJax的Web页面中使用。

TeX支持

MathJax复制LaTeX的数学环境命令。通过扩展支持AMS-LaTeX数学命令。MathJax还支持TeX宏和其他格式,比如\color\underline[25]

MathML支持

MathJax在beta 2版本中增加了对MathML 2.0和一些MathML 3.0构造的部分支持。MathJax支持演示MathML,并且从2.2版开始提供了对内容MathML的实验性支持。[26]

CDN服务器

MathJax站点提供了一个内容分发网络(CDN),其中,浏览器可以在运行时从CDN加载MathJax工作所需的JavaScript。这简化了安装,并确保始终使用库的最新版本。随着时间的推移,伺服器的使用从2011年的每月1.3TB流量增长到2017年的每月70TB流量。由于伺服器托管成本增加,主CDN伺服器于2017年4月底关闭。备用第三方CDN伺服器可用。[27]

另请参阅

  • 类别:符号字体
  • Google Chart API
  • KaTeX

参考文献

  1. ^ Release 3.2.2. 2022年6月8日 [2022年10月28日]. 
  2. ^ https://registry.npmjs.com/mathjax; 检索日期: 2023年3月3日.
  3. ^ MathJax: Rich Math display from LaTeX and MathML. [2018-12-21]. (原始内容存档于2013-08-09). 
  4. ^ MathJax AsciiMath support. [2018-12-21]. (原始内容存档于2018-03-23). 
  5. ^ Cuellar, Autumn; Topping, Paul. What you need to know about the Maths Stack. XML London 2013. June 2013: 63–68 [2018-12-21]. ISBN 978-0-9926471-0-0. doi:10.14337/XMLLondon13.Cuellar01. (原始内容存档于2019-06-13). 
  6. ^ Hayes, Brian, Writing Math on the Web: The Web would make a dandy blackboard if only we could scribble an equation, American Scientist, 2009, 92 (2): 98, doi:10.1511/2009.77.98 .
  7. ^ AMS becomes managing partner of the MathJax Consortium. [2018-12-21]. (原始内容存档于2020-10-25). 
  8. ^ MathJax Sponsorship. [2018-12-21]. (原始内容存档于2021-02-02). 
  9. ^ arXiv.org help - What is MathJax?. [2018-12-21]. (原始内容存档于2018-06-18). 
  10. ^ Archived copy. [2014-08-24]. (原始内容存档于2014-08-26). 
  11. ^ MathSciNet What's New. [2018-12-21]. (原始内容存档于2017-10-07). 
  12. ^ Schubotz, Moritz; Wicke, Gabriel. Intelligent Computer Mathematics. Lecture Notes in Computer Science 8543. 2014-01-01: 224–235. ISBN 978-3-319-08434-3. arXiv:1404.6179可免费查阅. doi:10.1007/978-3-319-08434-3_17. 
  13. ^ Extension:Math - MediaWiki. www.mediawiki.org. [2017-04-06]. (原始内容存档于2021-02-04) (英语). 
  14. ^ What is MathJax?. [2018-12-21]. (原始内容存档于2019-06-26). 
  15. ^ New features in IEEE Xplore页面存档备份,存于互联网档案馆), retrieved 2015-04-20.
  16. ^ All-Russian Mathematical Portal. [2018-12-21]. (原始内容存档于2020-07-12). 
  17. ^ 17.0 17.1 Cervone, Davide, Math Jax: A Platform for Mathematics on the Web (PDF), Notices of the American Mathematical Society, 2012, 59 (2): 312–316 [2018-12-21], doi:10.1090/noti794, (原始内容存档 (PDF)于2020-02-15) 
  18. ^ MathJax v2.0-beta now available on CDN. February 11, 2012. (原始内容存档于2020-05-05). 
  19. ^ MathJax Font Help页面存档备份,存于互联网档案馆) accessed 2012-08-14.
  20. ^ MathJax: Accessibility. [2018-12-21]. (原始内容存档于2021-02-02). 
  21. ^ MathJax: Browser Compatibility. [2018-12-21]. (原始内容存档于2015-04-06). 
  22. ^ Using MathJax in popular web platforms. [2018-12-21]. (原始内容存档于2017-08-31). 
  23. ^ mathjax-node. [2018-12-21]. (原始内容存档于2020-05-17). 
  24. ^ Copy and Paste Math. [2018-12-21]. (原始内容存档于2019-10-24). 
  25. ^ MathJax: Supported LaTeX Commands. [2018-12-21]. (原始内容存档于2018-12-16). 
  26. ^ MathJax MathML Support — MathJax 2.3 documentation. [2018-12-21]. (原始内容存档于2018-12-15). 
  27. ^ MathJax CDN shutting down on April 30, 2017. MathJax. 31 March 2017 [2018-12-21]. (原始内容存档于2021-01-30). 

外部链接

{{bottomLinkPreText}} {{bottomLinkText}}
MathJax
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?