m
m (Colors in MathJaX)
 
(12 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
[[Image:MathJax.png|right|100px]]
 +
 
= MathJax =
 
= MathJax =
  
Line 5: Line 7:
 
== Examples ==
 
== Examples ==
  
An identity from Ramanujan:
+
A result from Ramanujan:
  
 
\[
 
\[
Line 23: Line 25:
 
\end{multline}</wz>
 
\end{multline}</wz>
  
A result from [[Fabrice|me]]:
+
A result from [[Fabrice]]:
  
 
<wz tip="An exact picture of Bose-Einstein condensation.">
 
<wz tip="An exact picture of Bose-Einstein condensation.">
Line 36: Line 38:
 
You may have noticed I could not resist the temptation to label them with our [[wz|wz tooltips]].
 
You may have noticed I could not resist the temptation to label them with our [[wz|wz tooltips]].
  
The beauty of it beyond perfect typesetting and integration in the flow of the text is that you can even label them. Equation \eqref{eq:elena} is the lineshape for the incoherent Mollow triplet, that is, the luminescence spectrum of a two-level emitter in strong-coupling with a cavity which it brought in the lasing regime [http://dx.doi.org/10.1103/PhysRevLett.105.23360]. Equation \eqref{eq:fabrice} is the exact solution of quantum Boltzmann master equation which provide an analytical description of Bose-Einstein condensation.
+
The beauty of it beyond perfect typesetting and integration in the flow of the text is that you can even label them. Equation \eqref{eq:elena} is the lineshape for the incoherent Mollow triplet, that is, the luminescence spectrum of a two-level emitter in strong-coupling with a cavity which it brought into lasing [http://dx.doi.org/10.1103/PhysRevLett.105.233601]. Equation \eqref{eq:fabrice} is the exact solution of quantum Boltzmann master equation which provides an analytical description of Bose-Einstein condensation.
 +
 
 +
And just when you thought you could not be impressed further, you have to get a look at inline display, like, Euler's formula $e^{i\pi}+1=0$, displayed idiotically to feature all the fundamental numbers, $e$, $i$, $\pi$, $0$ and $1$. See the [[Knuth]]ian quality of the insert of math in the text? I'm doing that merely putting $\TeX$'s dollar signs around, I'm feeling at home on the web! What an age we live in!
 +
 
 +
== Colors in MathJaX ==
 +
 
 +
<pre>
 +
<span style="color: red;">$$ax^2+bx+c$$</span>
 +
 
 +
$$\color{red}{ax^2}+bx+c$$
 +
</pre>
 +
 
 +
yields:
 +
 
 +
<span style="color: red;">$$ax^2+bx+c$$</span>
 +
 
 +
$$\color{red}{ax^2}+bx+c$$
 +
 
 +
== See also ==
  
And just when you thought you could not be impressed further, you have to get a look at inline display, like, Euler's formula <math>e^{i\pi}-1=0</math> displayed idiotically to feature all the fundamental numbers, $e$, $i$, $\pi$, $0$ and $1$ (even a $-$). See the [[Knuth]]ian quality of the insert of math in the text? I'm doing that merely putting $\TeX$'s dollar signs, I'm feeling at home on the web! What an age we live in!
+
* [[Blog:Hacks/Defining_macros_for_Mathjax_extension|Defining macros for Mathjax extension]] on my [[blog]].
  
 
== Links ==
 
== Links ==
  
* http://www.mathjax.org Webpage of the project.
+
* http://www.mathjax.org Webpage of the project.
* http://sourceforge.net/projects/mathjax [[Sourceforge]] page of the project.
+
* http://sourceforge.net/projects/mathjax [[Sourceforge]] page of the project.
* http://www.mediawiki.org/wiki/Extension:MathJax [[MediaWiki]] extension (thanks to [http://people.cs.kuleuven.be/~dirk.nuyens/ Dirk Nuyens]).
+
* http://www.mediawiki.org/wiki/Extension:MathJax [[MediaWiki]] extension (thanks to [http://people.cs.kuleuven.be/~dirk.nuyens/ Dirk Nuyens]).

Latest revision as of 11:27, 26 March 2014

MathJax.png

Contents

MathJax

MathJax is an open source Ajax-based framework to display mathematical notations in web browsers. It renders the input, entered as LaTeX or MathML expressions, as high-quality display in MathML or HTML with CSS and integrates well with text-based content, both in display mode and inline.

Examples

A result from 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} } } }\,. \]

A result from Elena:

\begin{multline} \tag{1} S_\mathrm{inc}(\omega)=\Big(\frac{2P_\sigma}{\kappa_\sigma+\Gamma_\sigma}-\frac{\Gamma_\sigma}{\kappa_\sigma}\Big) \delta(\omega)+\frac{\frac{1}{2\pi}\frac{\Gamma_\sigma}{2}}{\big(\frac{\Gamma_\sigma}{2}\big)^2+\omega^2}+\\ \frac{(P_\sigma-\gamma_\sigma)\Big(3\Gamma_\sigma^3-(P_\sigma-5\gamma_\sigma)\Gamma_\sigma\kappa_\sigma+2\gamma_\sigma \kappa_\sigma^2\Big)-\Big(\Gamma_\sigma^2-(3P_\sigma-\gamma_\sigma)\kappa_\sigma\Big)\omega^2}{\pi(\kappa_\sigma+\Gamma_\sigma)\Big(9\Gamma_\sigma^2\omega^2+[2\omega^2-\kappa_\sigma(P_\sigma-\gamma_\sigma)]^2\Big)}\,, \end{multline}

A result from Fabrice:

\[ \tag{1} p(n_0,\Sigma) = \frac{(1-\theta_0)(1-\theta)^M\theta^{n_0+\Sigma}{M+n_0+\Sigma-1\choose M-1}{}_2F_1(1,-n_0+\Sigma,-M-n_0+\Sigma+1,\frac{\theta_0}{\theta})}{\left(\frac{\xi}{\xi-1}\right)^M-\frac1{\xi^{n_0+1}}{M+\Sigma+n_0\choose M-1}{}_2F_1(1,M+\Sigma+n_0+1,\Sigma+n_0+2,\frac{1}{\xi})}\,. \]

You may have noticed I could not resist the temptation to label them with our wz tooltips.

The beauty of it beyond perfect typesetting and integration in the flow of the text is that you can even label them. Equation (1) is the lineshape for the incoherent Mollow triplet, that is, the luminescence spectrum of a two-level emitter in strong-coupling with a cavity which it brought into lasing [1]. Equation (1) is the exact solution of quantum Boltzmann master equation which provides an analytical description of Bose-Einstein condensation.

And just when you thought you could not be impressed further, you have to get a look at inline display, like, Euler's formula $e^{i\pi}+1=0$, displayed idiotically to feature all the fundamental numbers, $e$, $i$, $\pi$, $0$ and $1$. See the Knuthian quality of the insert of math in the text? I'm doing that merely putting $\TeX$'s dollar signs around, I'm feeling at home on the web! What an age we live in!

Colors in MathJaX

<span style="color: red;">$$ax^2+bx+c$$</span>

$$\color{red}{ax^2}+bx+c$$

yields:

$$ax^2+bx+c$$

$$\color{red}{ax^2}+bx+c$$

See also

Links