sample.html 3.0 KB

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