sample.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>MathJax Test Page</title>
  5. <!-- Copyright (c) 2009-2013 The MathJax Consortium -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  8. <script type="text/x-mathjax-config">
  9. MathJax.Hub.Config({
  10. extensions: ["tex2jax.js"],
  11. jax: ["input/TeX","output/HTML-CSS"],
  12. tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
  13. });
  14. </script>
  15. <script type="text/javascript" src="../MathJax.js"></script>
  16. <style>
  17. h1 {text-align:center}
  18. h2 {
  19. font-weight: bold;
  20. background-color: #DDDDDD;
  21. padding: .2em .5em;
  22. margin-top: 1.5em;
  23. border-top: 3px solid #666666;
  24. border-bottom: 2px solid #999999;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29. <noscript>
  30. <div style="color:#CC0000; text-align:center">
  31. <b>Warning: <a href="http://www.mathjax.org/">MathJax</a>
  32. requires JavaScript to process the mathematics on this page.<br />
  33. If your browser supports JavaScript, be sure it is enabled.</b>
  34. </div>
  35. <hr>
  36. </noscript>
  37. <h1>Sample MathJax Equations</h1>
  38. <blockquote>
  39. <h2>The Lorenz Equations</h2>
  40. <p>
  41. \begin{align}
  42. \dot{x} & = \sigma(y-x) \\
  43. \dot{y} & = \rho x - y - xz \\
  44. \dot{z} & = -\beta z + xy
  45. \end{align}
  46. </p>
  47. <h2>The Cauchy-Schwarz Inequality</h2>
  48. <p>\[
  49. \left( \sum_{k=1}^n a_k b_k \right)^{\!\!2} \leq
  50. \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)
  51. \]</p>
  52. <h2>A Cross Product Formula</h2>
  53. <p>\[
  54. \mathbf{V}_1 \times \mathbf{V}_2 =
  55. \begin{vmatrix}
  56. \mathbf{i} & \mathbf{j} & \mathbf{k} \\
  57. \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\
  58. \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \\
  59. \end{vmatrix}
  60. \]</p>
  61. <h2>The probability of getting \(k\) heads when flipping \(n\) coins is:</h2>
  62. <p>\[P(E) = {n \choose k} p^k (1-p)^{ n-k} \]</p>
  63. <h2>An Identity of Ramanujan</h2>
  64. <p>\[
  65. \frac{1}{(\sqrt{\phi \sqrt{5}}-\phi) e^{\frac25 \pi}} =
  66. 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
  67. {1+\frac{e^{-8\pi}} {1+\ldots} } } }
  68. \]</p>
  69. <h2>A Rogers-Ramanujan Identity</h2>
  70. <p>\[
  71. 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots =
  72. \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},
  73. \quad\quad \text{for $|q|<1$}.
  74. \]</p>
  75. <h2>Maxwell's Equations</h2>
  76. <p>
  77. \begin{align}
  78. \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\
  79. \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\
  80. \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\
  81. \nabla \cdot \vec{\mathbf{B}} & = 0
  82. \end{align}
  83. </p>
  84. <h2>In-line Mathematics</h2>
  85. <p>Finally, while display equations look good for a page of samples, the
  86. ability to mix math and text in a paragraph is also important. This
  87. expression \(\sqrt{3x-1}+(1+x)^2\) is an example of an inline equation. As
  88. you see, MathJax equations can be used this way as well, without unduly
  89. disturbing the spacing between lines.</p>
  90. </blockquote>
  91. </body>
  92. </html>