Tags:
create new tag
view all tags

MathJax

MathJax is a cross-browser JavaScript library that displays mathematical notation in web browsers, using MathML, LaTeX and AsciiMath markup. MathJax is released as open-source software under the Apache License. (Wikipedia:MathJax)

Use MathJax in TWiki:

Step 1: Include the mathjax JavaScript from a CDN:

<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML">
</script>

Including this JavaScript could be done by a plugin, or a site-wide preferences setting, so that you could simply write %USEMATHJAX% in a topic to use MathJax. Or, you could add it to a TWiki template so that it is available in all topics by default.

Step 2: Enter math text:

Language You write You get
TeX: \[x = {-b \pm \sqrt{b^2-4ac} \over 2a}\] \[x = {-b \pm \sqrt{b^2-4ac} \over 2a}\]
MathML: <math><msqrt><mi>x</mi></msqrt></math> x
AsciiMath: `a^2 + b^2 = c^2` `a^2 + b^2 = c^2`

-- Contributors: Peter Thoeny - 2020-12-05

Discussion

Topic revision: r1 - 2020-12-05 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.