updates to mathjax plugin, incl more examples #531

main
parent 9984cb1f21
commit 69f7c0c693
2 changed files with 44 additions and 7 deletions

38 examples/math.html Unescape Escape View File

 @ -15,7 +15,7 @@                 @ -32,11 +32,12 @@ 
  


Reveal.js Math Plugin



reveal.js Math Plugin



A thin wrapper for MathJax


  


The Lorenz Equations



The Lorenz Equations

 \begin{aligned}  \dot{x} & = \sigma(y-x) \\  \dot{y} & = \rho x - y - xz \\ @ -45,13 +46,13 @@        The Cauchy-Schwarz Inequality   The Cauchy-Schwarz Inequality     \[ \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) 
  


A Cross Product Formula



A Cross Product Formula

   $\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}  \mathbf{i} & \mathbf{j} & \mathbf{k} \\ @ -61,13 +62,36 @@        An Identity of Ramanujan   The probability of getting $$k$$ heads when flipping $$n$$ coins is     \[P(E) = {n \choose k} p^k (1-p)^{ n-k}$ 
  


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} } } }$ 
  


A Rogers-Ramanujan Identity

   $1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots =  \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}$ 
  


Maxwell’s Equations

   \begin{aligned}  \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\  \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\  \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned}  
  
    @ -78,6 +102,8 @@ 

13 plugin/math/math.js Unescape Escape View File

 @ -6,10 +6,13 @@  */ (function(){    var config = Reveal.getConfig().math || {};  config.mode = config.mode || 'TeX-AMS_HTML-full';    var head = document.querySelector( 'head' );  var script = document.createElement( 'script' );  script.type = 'text/javascript';  script.src = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_SVG-full';  script.src = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=' + config.mode;    // Detect when the script has loaded   script.onload = onScriptLoad; @ -28,8 +31,16 @@  tex2jax: { inlineMath: [['$','$'],['\$$','\$$']] }  });    // Process any math inside of the current slide when navigating,   // this is important since it's not possible to typeset   // equations within invisible elements (far future or past).   Reveal.addEventListener( 'slidechanged', function( event ) {    // This will only typeset equations that have not yet been   // processed, as well as equations that have change since   // last being processed.   MathJax.Hub.Update( event.currentSlide );    } );    }`