index.html 5.3 KB

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