diff --git a/test/index-images.html b/test/index-images.html index 4388b3204..c0480cb70 100644 --- a/test/index-images.html +++ b/test/index-images.html @@ -1,12 +1,12 @@ - - -
-+ -MathJax Test Page
++MathJax Test Page
+ +If you see typeset mathematics below, then MathJax is working. If you see TeX code instead, MathJax is not working for you. -
+
-
- +
+\[ \frac{-b\pm\sqrt{b^2-4ac}}{2a} \] -
+
--++ +++ +MathJax is not working! --
+ + + + + + + + -
-If the mathematics does not show up properly, you may not have not installed the MathJax web fonts correctly. Follow the steps in the -installation instructions. +installation instructions.
- + - - + + diff --git a/test/index.html b/test/index.html index 68d7540f8..df61ee285 100644 --- a/test/index.html +++ b/test/index.html @@ -1,12 +1,12 @@ - - -
-MathJax Test Page - - - + + + +MathJax Test Page + + + - - - - + + -+ + + -MathJax Test Page
+ ++ +MathJax Test Page
+ +If you see typeset mathematics below, then MathJax is working. If you see TeX code instead, MathJax is not working for you. -
+
-
+
+\[ \frac{-b\pm\sqrt{b^2-4ac}}{2a} \] -
+
--++ +++ +MathJax is not working! --
-
--
- -Once you have MathJax working properly, view the image mode test page to make sure that the ++Once you have MathJax working properly, view the image mode test page to make sure that the image fallback mode is working as well. +
- + - - + + diff --git a/test/sample-dynamic-steps.html b/test/sample-dynamic-steps.html new file mode 100644 index 000000000..723769104 --- /dev/null +++ b/test/sample-dynamic-steps.html @@ -0,0 +1,96 @@ + + + +MathJax Dynamic Steps Test Page + + + + + + + + + + + + + + +Dynamic Equations in MathJax
+ +++ + + diff --git a/test/sample-dynamic.html b/test/sample-dynamic.html index df9e0e164..17a7c377f 100644 --- a/test/sample-dynamic.html +++ b/test/sample-dynamic.html @@ -1,18 +1,30 @@ ++Expand the following: +\begin{align} + (x+1)^2 + &\cssId{Step1}{= (x+1)(x+1)}\\ + &\cssId{Step2}{= x(x+1) + 1(x+1)}\\ + &\cssId{Step3}{= (x^2+x) + (x+1)}\\ + &\cssId{Step4}{= x^2 + (x + x) + 1}\\ + &\cssId{Step5}{= x^2+2x+1}\\ +\end{align} +
+ + + +MathJax Dynamic Math Test Page - + - + - + + @@ -23,13 +35,21 @@ // (function () { var QUEUE = MathJax.Hub.queue; // shorthand for the queue - var math = null; // the element jax for the math output. + var math = null, box = null; // the element jax for the math output, and the box it's in + + // + // Hide and show the box (so it doesn't flicker as much) + // + var HIDEBOX = function () {box.style.visibility = "hidden"} + var SHOWBOX = function () {box.style.visibility = "visible"} // // Get the element jax when MathJax has produced it. // QUEUE.Push(function () { math = MathJax.Hub.getAllJax("MathOutput")[0]; + box = document.getElementById("box"); + SHOWBOX(); // box is initially hidden so the braces don't show }); // @@ -37,31 +57,31 @@ // math entered by the user // window.UpdateMath = function (TeX) { - QUEUE.Push(["Text",math,"\\displaystyle{"+TeX+"}"]); + QUEUE.Push(HIDEBOX,["Text",math,"\\displaystyle{"+TeX+"}"],SHOWBOX); + } + + // + // IE doesn't fire onchange events for RETURN, so + // use onkeypress to do a blur (and refocus) to + // force the onchange to occur + // + if (MathJax.Hub.Browser.isMSIE) { + window.MathInput.onkeypress = function () { + if (window.event && window.event.keyCode === 13) {this.blur(); this.focus()} + } } })(); -Type some TeX code and press RETURN:
-+Type some $\rm\TeX$ code and press RETURN:
-
+ +-You typed: ${}$ +You typed:
++- - diff --git a/test/sample-mml.html b/test/sample-mml.html index 5709be603..8389c1836 100644 --- a/test/sample-mml.html +++ b/test/sample-mml.html @@ -1,19 +1,17 @@ +$${}$$MathJax MathML Test Page - + - + + + - +When , there are two solutions to
diff --git a/test/sample-signals.html b/test/sample-signals.html index 83b50aa8b..7d9837270 100644 --- a/test/sample-signals.html +++ b/test/sample-signals.html @@ -1,9 +1,10 @@ +MathJax Signals Test Page - + - + - + + +When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ +
+Messages about mathematics:
+ +All Messages:
+ + + -When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are ++When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ +
diff --git a/test/sample-tex2mml.html b/test/sample-tex2mml.html deleted file mode 100644 index 1218c0c4c..000000000 --- a/test/sample-tex2mml.html +++ /dev/null @@ -1,23 +0,0 @@ - - -MathJax TeX input with MathML output Test Page - - - - - - - - -When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are -$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ - - - diff --git a/test/sample.html b/test/sample.html index 53a5d3a7f..e1e621d92 100644 --- a/test/sample.html +++ b/test/sample.html @@ -1,33 +1,48 @@ - - - -MathJax Test Page - - - + + + +MathJax Test Page + + + - - - + + - + + + -+ -- - + +The Lorenz Equations
+Sample MathJax Equations
+ ++ ++The Lorenz Equations
\begin{align} @@ -37,14 +52,14 @@ If your browser supports JavaScript, be sure it is enabled. \end{align}
-The Cauchy-Schwarz Inequality
+The Cauchy-Schwarz Inequality
\[ \left( \sum_{k=1}^n a_k b_k \right)^{\!\!2} \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \]
-A Cross Product Formula
+A Cross Product Formula
\[ \mathbf{V}_1 \times \mathbf{V}_2 = @@ -55,11 +70,11 @@ If your browser supports JavaScript, be sure it is enabled. \end{vmatrix} \]
-The probability of getting \(k\) heads when flipping \(n\) coins is:
+The probability of getting \(k\) heads when flipping \(n\) coins is:
\[P(E) = {n \choose k} p^k (1-p)^{ n-k} \]
-An Identity of Ramanujan
+An Identity of Ramanujan
\[ \frac{1}{(\sqrt{\phi \sqrt{5}}-\phi) e^{\frac25 \pi}} = @@ -67,7 +82,7 @@ If your browser supports JavaScript, be sure it is enabled. {1+\frac{e^{-8\pi}} {1+\ldots} } } } \]
-A Rogers-Ramanujan Identity
+A Rogers-Ramanujan Identity
\[ 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = @@ -75,7 +90,7 @@ If your browser supports JavaScript, be sure it is enabled. \quad\quad \text{for $|q|<1$}. \]
-Maxwell's Equations
+Maxwell's Equations
\begin{align} @@ -86,6 +101,8 @@ If your browser supports JavaScript, be sure it is enabled. \end{align}
+In-line Mathematics
+Finally, while display equations look good for a page of samples, the ability to mix math and text in a paragraph is also important. This expression \(\sqrt{3x-1}+(1+x)^2\) is an example of an inline equation. As @@ -93,7 +110,7 @@ you see, MathJax equations can be used this way as well, without unduly disturbing the spacing between lines.
-