MathJax
Beautiful math in all browsers.
MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers. It was designed with the goal of consolidating the recent advances in web technologies into a single, definitive, math-on-the-web platform supporting the major browsers and operating systems. It requires no setup on the part of the user (no plugins to download or software to install), so the page author can write web documents that include mathematics and be confident that users will be able to view it naturally and easily. Simply include MathJax and some mathematics in a web page, and MathJax does the rest.
Some of the main features of MathJax include:
- High-quality display of LaTeX, MathML, and AsciiMath notation in HTML pages
- Supported in most browsers with no plug-ins, extra fonts, or special setup for the reader
- Easy for authors, flexible for publishers, extensible for developers
- Supports math accessibility, cut-and-paste interoperability, and other advanced functionality
- Powerful API for integration with other web applications
See http://www.mathjax.org/ for additional details.
How to use
MathJax is an open source JavaScript display engine for mathematics that works in all modern browsers.
The following math environments are defined for inline style math:
-
$...$
- \(...\)
-
<math>...</math>
And the following math environments are defined for display style math:
-
$$...$$
- $$ ... $$
-
\begin{...}...\end{...}
-
:<math>...</math>
Simple example
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
HTTP 출력 방법
MathJax를 사용하여 TeX를 출력하는 간단한 방법은 아래와 같다.
<html>
<head>
<script type="text/javascript"
src="https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body>
$$
\sum f(x) = F(x) + g(x)
$$
</body>
</html>
Local files
- MathJax 2.5.3
- CDN: MathJax-2.5.3-cdn.tar.gz
- Source code: MathJax-2.5.3-cdn.tar.gz
See also
- Tex
- MediaWiki:Plugin:SimpleMathJax