sample-all-at-once.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Wait Until MathJax is Finished Before Showing Page</title>
  5. <!-- Copyright (c) 2012-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. <!--
  9. |
  10. | This shows how to prevent the page from being displayed until after
  11. | MathJax has finished typesetting all the math. This avoids the
  12. | "flicker" that occurs as source TeX code is removed from the page and
  13. | then typeset. You probably don't want to do this on a page with lots
  14. | of math.
  15. |
  16. |-->
  17. <script type="text/x-mathjax-config">
  18. //
  19. // The document is hidden until MathJax is finished, then
  20. // this function runs, making it visible again.
  21. //
  22. MathJax.Hub.Queue(function () {
  23. document.getElementById("hide_page").style.visibility = "";
  24. });
  25. </script>
  26. <script type="text/javascript" src="../MathJax.js?config=TeX-AMS_HTML-full"></script>
  27. <style>
  28. h1 {text-align:center}
  29. h2 {
  30. font-weight: bold;
  31. background-color: #DDDDDD;
  32. padding: .2em .5em;
  33. margin-top: 1.5em;
  34. border-top: 3px solid #666666;
  35. border-bottom: 2px solid #999999;
  36. }
  37. </style>
  38. </head>
  39. <body>
  40. <!--
  41. |
  42. | This DIV keeps the page blank until after the math is typeset.
  43. |-->
  44. <div id="hide_page" style="visibility:hidden">
  45. <noscript>
  46. <div style="color:#CC0000; text-align:center">
  47. <b>Warning: <a href="http://www.mathjax.org/">MathJax</a>
  48. requires JavaScript to process the mathematics on this page.<br />
  49. If your browser supports JavaScript, be sure it is enabled.</b>
  50. </div>
  51. <hr>
  52. </noscript>
  53. <h1>Sample MathJax Equations</h1>
  54. <blockquote>
  55. <h2>The Lorenz Equations</h2>
  56. <p>
  57. \begin{align}
  58. \dot{x} & = \sigma(y-x) \\
  59. \dot{y} & = \rho x - y - xz \\
  60. \dot{z} & = -\beta z + xy
  61. \end{align}
  62. </p>
  63. <h2>The Cauchy-Schwarz Inequality</h2>
  64. <p>\[
  65. \left( \sum_{k=1}^n a_k b_k \right)^{\!\!2} \leq
  66. \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)
  67. \]</p>
  68. <h2>A Cross Product Formula</h2>
  69. <p>\[
  70. \mathbf{V}_1 \times \mathbf{V}_2 =
  71. \begin{vmatrix}
  72. \mathbf{i} & \mathbf{j} & \mathbf{k} \\
  73. \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\
  74. \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \\
  75. \end{vmatrix}
  76. \]</p>
  77. <h2>The probability of getting \(k\) heads when flipping \(n\) coins is:</h2>
  78. <p>\[P(E) = {n \choose k} p^k (1-p)^{ n-k} \]</p>
  79. <h2>An Identity of Ramanujan</h2>
  80. <p>\[
  81. \frac{1}{(\sqrt{\phi \sqrt{5}}-\phi) e^{\frac25 \pi}} =
  82. 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}}
  83. {1+\frac{e^{-8\pi}} {1+\ldots} } } }
  84. \]</p>
  85. <h2>A Rogers-Ramanujan Identity</h2>
  86. <p>\[
  87. 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots =
  88. \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})},
  89. \quad\quad \text{for $|q|<1$}.
  90. \]</p>
  91. <h2>Maxwell's Equations</h2>
  92. <p>
  93. \begin{align}
  94. \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\
  95. \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\
  96. \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\
  97. \nabla \cdot \vec{\mathbf{B}} & = 0
  98. \end{align}
  99. </p>
  100. <h2>In-line Mathematics</h2>
  101. <p>Finally, while display equations look good for a page of samples, the
  102. ability to mix math and text in a paragraph is also important. This
  103. expression \(\sqrt{3x-1}+(1+x)^2\) is an example of an inline equation. As
  104. you see, MathJax equations can be used this way as well, without unduly
  105. disturbing the spacing between lines.</p>
  106. </blockquote>
  107. </div>
  108. </body>
  109. </html>