MathJax: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
__MATHJAX_DOLLAR__ |
|||
'''[http://www.mathjax.org/ MathJax]''' is a client-side javascript that allows for very nice rendering of formula written in LaTeX, much like [[jsMath]]. |
'''[http://www.mathjax.org/ MathJax]''' is a client-side javascript that allows for very nice rendering of formula written in LaTeX, much like [[jsMath]]. |
||
Line 13: | Line 11: | ||
== Example == |
== Example == |
||
Some simple examples. |
Some simple examples. |
||
{{lp2|'''Note''': these examples use the single dollar notation, which are disabled by default on this wiki. They are enabled on this page |
{{lp2|'''Note''': these examples use the single dollar notation, which are disabled by default on this wiki. They are enabled on this page if the keyword |
||
__MATHJAX_DOLLAR__ |
__MATHJAX_DOLLAR__ |
||
appears somewhere in the page (even in html comment).}} |
|||
__MATHJAX_DOLLAR__ |
<!---__MATHJAX_DOLLAR__ --->$\newcommand{\ud}{\,\mathrm{d}}$ |
||
$\newcommand{\ud}{\,\mathrm{d}}$ |
|||
{| class=wikitable |
{| class=wikitable |
||
|- |
|- |
||
Line 37: | Line 34: | ||
{1+\frac{e^{-8\pi}} {1+\ldots} } } }$$ |
{1+\frac{e^{-8\pi}} {1+\ldots} } } }$$ |
||
|} |
|} |
||
More complex example from [http://www.mediawiki.org/wiki/Extension:MathJax]: |
More complex example from [http://www.mediawiki.org/wiki/Extension:MathJax]: |
Revision as of 16:32, 15 January 2014
MathJax is a client-side javascript that allows for very nice rendering of formula written in LaTeX, much like jsMath.
The advantages of MathJax over jsMath:
- MathJax seems actively developed for now
- MathJax uses server-side fonts, and so does not require any configuration on the client side to get better results
- MathJax supports LaTeX macros
- Better LaTeX support
On MediaWiki, MathJax is available either in the Math extension (as an optional renderer) or in the MathJax extension. The later option is better since it allows for the more natural and lighter notation $ ... $
.
Example
Some simple examples.
Note: these examples use the single dollar notation, which are disabled by default on this wiki. They are enabled on this page if the keyword
__MATHJAX_DOLLAR__appears somewhere in the page (even in html comment).
$\newcommand{\ud}{\,\mathrm{d}}$
formula | Textstyle ($...$ ) |
Displaystyle ($$...$$ )
|
---|---|---|
\frac{x}{1+\frac{x}{1+y}}
|
$\frac{x}{1+\frac{x}{1+y}}$ | $$\frac{x}{1+\frac{x}{1+y}}$$ |
\newcommand{\ud}{\,\mathrm{d}}
|
$\int_0^\infty f(x)\ud x$ | $$\int_0^\infty f(x)\ud x$$ |
An Identity of Ramanujan | $\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\ldots} } } }$ | $$\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} =
1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\ldots} } } }$$ |
More complex example from [1]:
$ \newcommand{\Re}{\mathrm{Re}\,} \newcommand{\pFq}[5]{{}_{#1}\mathrm{F}_{#2} \left( \genfrac{}{}{0pt}{}{#3}{#4} \bigg| {#5} \right)} $ We consider, for various values of $s$, the $n$-dimensional integral \begin{align} \label{def:Wns} W_n (s) &:= \int_{[0, 1]^n} \left| \sum_{k = 1}^n \mathrm{e}^{2 \pi \mathrm{i} \, x_k} \right|^s \mathrm{d}\boldsymbol{x} \end{align} which occurs in the theory of uniform random walk integrals in the plane, where at each step a unit-step is taken in a random direction. As such, the integral \eqref{def:Wns} expresses the $s$-th moment of the distance to the origin after $n$ steps. By experimentation and some sketchy arguments we quickly conjectured and strongly believed that, for $k$ a nonnegative integer \begin{align} \label{eq:W3k} W_3(k) &= \Re \, \pFq32{\frac12, -\frac k2, -\frac k2}{1, 1}{4}. \end{align} Appropriately defined, \eqref{eq:W3k} also holds for negative odd integers. The reason for \eqref{eq:W3k} was long a mystery, but it will be explained at the end of the paper. |