index.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>MathJax Test Page</title>
  5. <!-- Copyright (c) 2009-2015 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. //
  10. // Do NOT use this page as a template for your own pages. It includes
  11. // code that is needed for testing your site's installation of MathJax,
  12. // and that should not be used in normal web pages. Use sample.html as
  13. // the example for how to call MathJax in your own pages.
  14. //
  15. MathJax.HTML.Cookie.Set("menu",{});
  16. MathJax.Hub.Config({
  17. extensions: ["tex2jax.js"],
  18. jax: ["input/TeX","output/HTML-CSS"],
  19. "HTML-CSS": {
  20. availableFonts:[],
  21. styles: {".MathJax_Preview": {visibility: "hidden"}}
  22. }
  23. });
  24. MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
  25. var FONT = MathJax.OutputJax["HTML-CSS"].Font;
  26. FONT.loadError = function (font) {
  27. MathJax.Message.Set("Can't load web font TeX/"+font.directory,null,2000);
  28. document.getElementById("noWebFont").style.display = "";
  29. };
  30. FONT.firefoxFontError = function (font) {
  31. MathJax.Message.Set("Firefox can't load web fonts from a remote host",null,3000);
  32. document.getElementById("ffWebFont").style.display = "";
  33. };
  34. });
  35. (function (HUB) {
  36. var MINVERSION = {
  37. Firefox: 3.0,
  38. Opera: 9.52,
  39. MSIE: 6.0,
  40. Chrome: 0.3,
  41. Safari: 2.0,
  42. Konqueror: 4.0,
  43. Unknown: 10000.0 // always disable unknown browsers
  44. };
  45. if (!HUB.Browser.versionAtLeast(MINVERSION[HUB.Browser]||0.0)) {
  46. HUB.Config({
  47. jax: [], // don't load any Jax
  48. extensions: [], // don't load any extensions
  49. "v1.0-compatible": false // skip warning message due to no jax
  50. });
  51. setTimeout('document.getElementById("badBrowser").style.display = ""',0);
  52. }
  53. })(MathJax.Hub);
  54. MathJax.Hub.Register.StartupHook("End",function () {
  55. var HTMLCSS = MathJax.OutputJax["HTML-CSS"];
  56. if (HTMLCSS && HTMLCSS.imgFonts) {document.getElementById("imageFonts").style.display = ""}
  57. });
  58. </script>
  59. <script type="text/javascript" src="../MathJax.js"></script>
  60. <style>
  61. .warning {
  62. color: #800020;
  63. background-color: #FFF8F8;
  64. border: 2px solid red;
  65. margin: 1em 5em;
  66. padding: 1em;
  67. }
  68. </style>
  69. </head>
  70. <body>
  71. <noscript>
  72. <div style="color:#CC0000; text-align:center">
  73. <b>Warning: <a href="http://www.mathjax.org/">MathJax</a>
  74. requires JavaScript to process the mathematics on this page.<br />
  75. If your browser supports JavaScript, be sure it is enabled.</b>
  76. </div>
  77. <hr>
  78. </noscript>
  79. <blockquote>
  80. <h1>MathJax Test Page</h1>
  81. <p>
  82. If you see typeset mathematics below, then MathJax is working. If you see
  83. TeX code instead, MathJax is not working for you.
  84. </p>
  85. <!------------------------------------------------------------------------>
  86. <hr>
  87. <p>
  88. \[
  89. \frac{-b\pm\sqrt{b^2-4ac}}{2a}
  90. \]
  91. </p>
  92. <div style="color:green">
  93. <div style="text-align:center; color:red; font-size:120%" class="MathJax_Preview">
  94. MathJax is not working!
  95. </div><script type="math/tex; mode=display">
  96. \bf MathJax\ Appears\ to\ be\ Working!
  97. </script>
  98. </div>
  99. <hr>
  100. <!------------------------------------------------------------------------>
  101. <div id="badBrowser" style="display:none">
  102. <div class="warning">
  103. <b>WARNING</b>: The browser you are using does not appear to support
  104. MathJax, so we can't test if MathJax is working. Please try a different
  105. browser, or a newer version of your browser in order to test MathJax.
  106. </div>
  107. <hr>
  108. </div>
  109. <!------------------------------------------------------------------------>
  110. <div id="imageFonts" style="display:none">
  111. <div class="warning">
  112. <b>WARNING</b>: The browser you are using does not seem to support web-based
  113. fonts, so we can't test the MathJax web fonts with this browser (image fonts
  114. have been used instead). Please try a different browser, or a newer version
  115. of your browser in order to test MathJax's web-based fonts.
  116. </div>
  117. <hr>
  118. </div>
  119. <!------------------------------------------------------------------------>
  120. <div id="noWebFont" style="display:none">
  121. <div class="warning">
  122. <b>WARNING</b>: MathJax's web fonts don't seem to be available. Be sure you have
  123. the <code>MathJax/fonts</code> directory in place before continuing.
  124. If you fail to install these fonts, MathJax will not
  125. work properly with some browsers. If you can't install the image fonts,
  126. be sure to set the <code>noImageFonts</code> parameter in your MathJax configuration
  127. (either <code>MathJax/config/MathJax.js</code>, or the
  128. <code>MathJax.Hub.Config()</code> call in your web page).
  129. </div>
  130. <hr>
  131. </div>
  132. <!------------------------------------------------------------------------>
  133. <div id="ffWebFont" style="display:none">
  134. <div class="warning">
  135. <b>WARNING</b>: You are trying to load MathJax from a remote site where the
  136. web-based fonts are not set up to be shipped to Firefox properly. See the
  137. <a href="../docs/html/installation.html#notes-about-shared-installations">discussion
  138. of Firefox's same-origin policy</a> in the MathJax documentation for more
  139. details.
  140. </div>
  141. <hr>
  142. </div>
  143. <!------------------------------------------------------------------------>
  144. <p>
  145. Once you have MathJax working properly, view the <a
  146. href="index-images.html">image mode test page</a> to make sure that the
  147. image fallback mode is working as well.
  148. </p>
  149. </blockquote>
  150. </body>
  151. </html>