MathJax is distributed under the Apache License, Version 2.0.
MathJax loads components only when needed so there is a big difference between what is loaded on a page without mathematics and one that does include mathematics. On a page with no mathematics, loading MathJax requires two files: MathJax.js and a configuration file. If taken from the MathJax CDN, the actual (compressed) data transferred for MathJax.js will be about 14.4KB. The configuration file can vary greatly in size depending on what is included; minimal configurations can be as small as 3.7KB, reasonable configurations vary between 25KB and 40KB – bringing us to a total of 18KB to 55KB, i.e., roughly a small to medium sized image. To learn more about configuring MathJax, see our documentation.
First, please open the MathJax homepage at www.mathjax.org in IE to see if that loads correctly. If it does, this indicates that there may be something wrong with the webpage you were trying to view initially. If appropriate, upgrade the website to the latest version of MathJax. If the MathJax homepage does not display mathematics properly, there may be an issue with your security settings in Internet Explorer. Please check the following settings:
You may need to select Custom Level security to make these changes. If you have verified that the above settings are correct, tried clearing your cache and restarting IE, and are still experiencing problems with displaying mathematics on www.mathjax.org, we would appreciate it if you reported the problem to the MathJax User Group so we can look into it. Please follow the guidelines for reporting problems described below.
MathJax renders mathematics dynamically so that formulas and symbols are nicely integrated into the surrounding text - with matching font size, margins, and baseline. So, in other words: it should look right. If your mathematics is too large or too small in comparison to its surroundings, you may be using the incorrect typesetting style. Following LaTeX conventions, MathJax supports two typesetting styles: inline and paragraph (or “display”) equations. For inline equations, MathJax tries hard to maintain the inter-line spacing. This means things like fractions and roots are vertically compressed, and smaller fonts are used. Paragraph equations are shown as a separate paragraph and can be displayed with more space and slightly larger fonts. The standard delimiters for inline equations are \\(...\\), while for paragraph equations they are $$...$$ or \\[...\\], but they can be customized. For how to configure MathJax to scale all mathematics relative to the surrounding text, check our documentation for the HTML output and the SVG output.
The MathJax CDN can be accessed via https. We advise using the protocol agnostic //cdn.mathjax.org/mathjax/latest/MathJax.js. For more information, see our documentation.
Yes. MathJax is JavaScript code that is run entirely within the browser of the user, and so your site’s actual content never leaves the browser while MathJax is rendering. If you are using MathJax on the CDN, it interacts with a web server to get font data but this is all put together in the browser of the reader. In case you have concerns about cross-site scripting, you can access the MathJax CDN service using the secure https protocol to prevent tampering with the code between the CDN and a browser. (Note, though, that this currently does not work with the default url cdn.mathjax.org - see this FAQ for more background and an alternative url). Or, if you prefer, you can also install MathJax on your own web server. MathJax does not reference script codes on other websites. The code is, of course, open source which means that you can review it and inspect its integrity.
MathML comes in two types: Presentation MathML, which describes what an equation looks like, and Content MathML, which describes what an equation means. By default, MathJax works with Presentation MathML and offers an extension for Content MathML, see the documentation on MathML support. You can also convert your Content MathML expressions to Presentation MathML yourself. A good way to do this conversion is with an XSL transformation tool, see for example the web-xslt collection. A more detailed explanation of the difference between Content and Presentation MathML can be found in the module “Presentation MathML Versus Content MathML” at cnx.org.
MathJax is a method to display mathematics. It is not an authoring environment, and so you will need another program to create mathematical expressions. The most common languages for mathematics on the computer are (La)TeX and MathML, and there are many authoring tools for these languages. MathJax is compatible with both MathML and (La)TeX. LaTeX code is essentially plain text, and so you do not need a special program to write LaTeX code (although complete authoring environments exist). If you are not familiar with LaTeX, you will need some determination to learn and master the language due to its specialized nature and rich vocabulary of symbols. There are various good tutorials on the net, and there is not a one-size-fits-all best one. A good starting point is the TeX User Group, or have a look at the LaTeX Wiki book. MathML is an XML-based web format for mathematical expressions. MathML3, the latest version, has been an official W3C recommendation since October 2010. MathML is widely supported by Computer Algebra Systems and can be created with a choice of authoring tools, including Microsoft Office with the MathType equation editor. A list of software the supports MathML may be found in The W3C MathML software list.
If you come across a problem with MathJax, please report it so that the development team and other users are aware and can look into it. It is important that you report your problem following the steps outlined here because this will help us to rapidly establish the nature of the problem and work towards a solution effectively. If you have are experiencing a problem, please follow these steps:
No, there is no simple way to make the fonts folder smaller. We have tried to make the fonts folder as small as possible, but in order to render math on some older browsers, you need image fonts, which take up most of the space. This is because you need an individual image file for each character in each font in each of a dozen different sizes, and each file must be at least the block size of the hard drive it is stored on (usually 4 kb). With nearly 30,000 separate image files, this adds up to a lot. Some users have suggested using a “sprite font” that has all the characters in a single image, from which MathJax could show only the particular character it wants. This is a nice idea, but it does not work well in practice (at least not if you want it to work reliably across multiple browsers). Since the image fonts are intended as a last resort for browsers whose functionality is not well behaved, relying on fancy CSS tricks to clip large images is not going to be a viable strategy. This approach also has performance and printing problems.
The single-glyph-per-file approach has proven to be the only truly reliable and maintainable approach that we have found. If you want to disable image fonts altogether, however, in order to save space, you can. Note: If you disable image fonts, MathJax might not work on some users’ browsers. With image fonts disabled, users must either have the MathJax or STIX fonts on their computer or their browser must support the @font-face CSS directive. This means IE6+, Chrome, Safari 3.1+, Firefox 3.5+, and Opera 10+, or other browsers based on their rendering engines. On earlier browsers (without local fonts) or if webfonts are blocked , MathJax will not be able to render math reliably (though it will try its best). To disable image fonts, edit the MathJax config file at [MathJax]/config/MathJax.js or the custom config inside your template’s <script> tag and set imageFont to null.
imageFont: null
This will tell MathJax that there are no image fonts available and it will no longer look for them. You can then delete the [MathJax]/fonts/HTML-CSS/TeX/png/ directory, which takes up the most space in the fonts folder. Do *not* delete the other directories, as they are needed to handle @font-face for other browsers. For more information, see this guide.
Web fonts are supported by all popular browsers (IE, Firefox, Chrome, Safari, Opera...) and they are scalable, which means much better display and print quality. Clearly, you want to make sure this is working on your install of MathJax. Here are several reasons web fonts might not be working for you:
It really depends on what \something is. We have a full list of the supported TeX commands. If the command you want to use is not in this list, you may be able to define a TeX macro for it, or if you want to get really advanced, you can define custom JavaScript that implements it (see the files in the extensions folder for some examples). Keep in mind that MathJax is meant for typesetting math on the web. It only replicates the math functionality of LaTeX and not the text formatting capabilities. Any text formatting on the web should be done in HTML and CSS, not TeX. If you would like to convert full TeX documents into HTML to publish online, you should use a TeX to HTML converter like LaTeXML, Tralics or tex4ht, but you should realize that TeX conversion tools will never produce results as good as controlling the HTML and CSS source yourself.
We strongly suggest to follow Microsoft’s suggestion to use IE=edge. That is, in the document <head> include
<meta http-equiv="X-UA-Compatible" content="IE=edge">
This will force all IE versions to use their latest engine which is the optimal setting for MathJax. For more information, see the Microsoft documentation on compatibility modes.
Yes. You can define TeX macros in MathJax the same way you do in LaTeX with \newcommand{cmd}{args}{def}. An example is \newcommand{\water}{H_{2}O}, which will output the chemical formula for water when you use the \water command. \renewcommand works as well. You can also store macros in the MathJax configuration. For more information, see the documentation.