Equations via MathML and MathJax

Equations via MathML and MathJax

Courtesy of Inductiveload. 2009. Chebyshev Polynomials of the 1st Kind (n=0-5, X=(-1,1)). Portable Network Graphic. Chebyshev Polynomials of the 1st Kind (n=0-5, x=(-1,1)).svg. Wikimedia Commons. http://bit.ly/1LGw7Nn.

Courtesy of Inductiveload. 2009. Chebyshev Polynomials of the 1st Kind (n=0-5, X=(-1,1)). Portable Network Graphic. Chebyshev Polynomials of the 1st Kind (n=0-5, x=(-1,1)).svg. Wikimedia Commons. http://bit.ly/1LGw7Nn.

Naively when I wanted to add equations to my Squarespace Blog, I went to the World Wide Web Consortium and tried out MathML. My sample test worked fine in Firefox. However IE and Chrome did not work out so well. This is what happens when you jump right to the fun stuff without doing your research first.

After discovering that IE and Chrome have dropped support for MathML, I selected MathJax because it looks to have staying power from support by the American mathematical Society, Society for Industrial and Applied Mathematics, and the American Institute of Physics.

The MathJax Getting Started [1] page has excellent instructions, beginning with the link to the MathJax JavaScript.

<script type="text/javascript"
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

I've chosen to continue to use MathML as my TeX skills are seriously lacking. A sample code for a sinusoidal functions is from Design Science MathType tool [2] :

<math display='block'>
 <semantics>
  <mrow>
   <mi>y</mi><mo>=</mo><mi>A</mi><mi>sin</mi><mrow><mo>(</mo>
    <mrow>
     <mi>&#x03C9;</mi><mi>t</mi><mo>&#x2212;</mo><mi>&#x03D5;</mi></mrow>
   <mo>)</mo></mrow><mo>+</mo><mi>B</mi></mrow>
  <annotation encoding='MathType-MTEF'>MathType@MTEF@5@5@+=
  feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn
  hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr
  4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9
  vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x
  fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaqcaaAaaiaadMhacq
  GH9aqpcaWGbbGaci4CaiaacMgacaGGUbWaaeWaaeaacqaHjpWDcaWG
  0bGaeyOeI0Iaeqy1dygacaGLOaGaayzkaaGaey4kaSIaamOqaaaa@44E4@
  </annotation>
 </semantics>
</math>

The resulting equation is:

y=Asin( ωtϕ )+B MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq=Jc9 vqaqpepm0xbba9pwe9Q8fs0=yqaqpepae9pg0FirpepeKkFr0xfr=x fr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaqcaaAaaiaadMhacq GH9aqpcaWGbbGaci4CaiaacMgacaGGUbWaaeWaaeaacqaHjpWDcaWG 0bGaeyOeI0Iaeqy1dygacaGLOaGaayzkaaGaey4kaSIaamOqaaaa@44E4@

References

  1. MathJax. 2015. “Getting Started.” Product. MathJax Documentation. February 2. http://bit.ly/1IqmVXU.

  2. Design Science. 2014. MathType (version 6.9a). En. Long Beach, CA: Design Science. http://bit.ly/1fH0Xcm.