diff --git a/ccm-core/web/assets/mathjax/test/examples.html b/ccm-core/web/assets/mathjax/test/examples.html new file mode 100644 index 000000000..f7b8d1cb7 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/examples.html @@ -0,0 +1,43 @@ + + +
++
+
+
+
+
+ ++ + + diff --git a/ccm-core/web/assets/mathjax/test/index.html b/ccm-core/web/assets/mathjax/test/index.html new file mode 100644 index 000000000..3ead1d051 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/index.html @@ -0,0 +1,179 @@ + + + +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. ++ +
+ ++ + + diff --git a/ccm-core/web/assets/mathjax/test/sample-all-at-once.html b/ccm-core/web/assets/mathjax/test/sample-all-at-once.html new file mode 100644 index 000000000..2360a792a --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-all-at-once.html @@ -0,0 +1,136 @@ + + + +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 +image fallback mode is working as well. +
+ +
+ ++ +The Lorenz Equations
+ ++\begin{align} +\dot{x} & = \sigma(y-x) \\ +\dot{y} & = \rho x - y - xz \\ +\dot{z} & = -\beta z + xy +\end{align} +
+ +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
+ +\[ + \mathbf{V}_1 \times \mathbf{V}_2 = + \begin{vmatrix} + \mathbf{i} & \mathbf{j} & \mathbf{k} \\ + \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ + \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \\ + \end{vmatrix} +\]
+ +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
+ +\[ + \frac{1}{(\sqrt{\phi \sqrt{5}}-\phi) e^{\frac25 \pi}} = + 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} + {1+\frac{e^{-8\pi}} {1+\ldots} } } } +\]
+ +A Rogers-Ramanujan Identity
+ +\[ + 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = + \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, + \quad\quad \text{for $|q|<1$}. +\]
+ +Maxwell's Equations
+ ++\begin{align} + \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ + \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ + \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ + \nabla \cdot \vec{\mathbf{B}} & = 0 +\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 +you see, MathJax equations can be used this way as well, without unduly +disturbing the spacing between lines.
+ + +
+When `a != 0`, there are two solutions to `ax^2 + bx + c = 0` and they are +
++`x = (-b +- sqrt(b^2-4ac))/(2a) .` +
+ + + diff --git a/ccm-core/web/assets/mathjax/test/sample-autoload.html b/ccm-core/web/assets/mathjax/test/sample-autoload.html new file mode 100644 index 000000000..f2a7c4cfd --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-autoload.html @@ -0,0 +1,48 @@ + + + +
+This page makes \cancel, \bcancel,
+\xcancel, and \cancelto all be defined so that
+they will load the cancel.js extension when first used.
+
+Here is the first usage: \(\cancel{x+1}\). It will cause the cancel +package to be loaded automatically. +
+ + + diff --git a/ccm-core/web/assets/mathjax/test/sample-dynamic-2.html b/ccm-core/web/assets/mathjax/test/sample-dynamic-2.html new file mode 100644 index 000000000..c64588dbd --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-dynamic-2.html @@ -0,0 +1,117 @@ + + + +++ + + diff --git a/ccm-core/web/assets/mathjax/test/sample-dynamic.html b/ccm-core/web/assets/mathjax/test/sample-dynamic.html new file mode 100644 index 000000000..5ccf722f6 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-dynamic.html @@ -0,0 +1,84 @@ + + + ++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} +
+ + + +
+Type some \(\rm\TeX\) code and press RETURN:
+
+
You typed:
++
+Here's one using the equation environment: +\begin{equation} +x+1\over\sqrt{1-x^2} +\end{equation} +and one with equation* environment: +\begin{equation*} +x+1\over\sqrt{1-x^2} +\end{equation*} +
+
+This is a forward reference [\ref{ref2}] and another \eqref{ref2} for the +following equation: +$$x+1\over\sqrt{1-x^2}\label{ref2}$$ +More math: +$$x+1\over\sqrt{1-x^2}$$ +Here is a ref inside math: $\ref{ref2}+1$ and text after it. + +\begin{align} +x& = y_1-y_2+y_3-y_5+y_8-\dots +&& \text{by \eqref{ref1}}\\ +& = y'\circ y^* && \text{(by \eqref{ref3})}\\ +& = y(0) y' && \text {by Axiom 1.} +\end{align} + +Here's a bad ref [\ref{ref4}] to a nonexistent label. +
+
+An alignment: +\begin{align} +a&=b\label{ref3}\cr +&=c+d +\end{align} +and a starred one: +\begin{align*} +a&=b\cr +&=c+d +\end{align*} + +
+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/ccm-core/web/assets/mathjax/test/sample-loader.html b/ccm-core/web/assets/mathjax/test/sample-loader.html new file mode 100644 index 000000000..cd85a6df5 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-loader.html @@ -0,0 +1,47 @@ + + + ++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/ccm-core/web/assets/mathjax/test/sample-macros.html b/ccm-core/web/assets/mathjax/test/sample-macros.html new file mode 100644 index 000000000..0cee5ddad --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-macros.html @@ -0,0 +1,64 @@ + + + ++This page uses two different methods to define macros: either putting them +in JavaScript notation in the MathJax configuration, or in TeX notation in +the body of the document. +
+ +Some math that used the definitions: +\[ + f\colon\RR\to\RR^3 \hbox{ by } f(t)=\< t+1,{1\over 1+t^2}, \sqrt{t^2+1} > +\] +and +\[ + \{\,z\in\CC \mid z^2 = \bold{\alpha}\,\} +\] + + diff --git a/ccm-core/web/assets/mathjax/test/sample-mml.html b/ccm-core/web/assets/mathjax/test/sample-mml.html new file mode 100644 index 000000000..0e871b420 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-mml.html @@ -0,0 +1,48 @@ + + +
++When +, +there are two solutions to + +and they are + +
+ + + diff --git a/ccm-core/web/assets/mathjax/test/sample-signals.html b/ccm-core/web/assets/mathjax/test/sample-signals.html new file mode 100644 index 000000000..65ecef4e5 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-signals.html @@ -0,0 +1,141 @@ + + + ++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: +
++ + + + + + diff --git a/ccm-core/web/assets/mathjax/test/sample-tex.html b/ccm-core/web/assets/mathjax/test/sample-tex.html new file mode 100644 index 000000000..599533a35 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-tex.html @@ -0,0 +1,25 @@ + + + +
+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/ccm-core/web/assets/mathjax/test/sample.html b/ccm-core/web/assets/mathjax/test/sample.html new file mode 100644 index 000000000..bf622bc9d --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample.html @@ -0,0 +1,116 @@ + + + ++ ++ + +The Lorenz Equations
+ ++\begin{align} +\dot{x} & = \sigma(y-x) \\ +\dot{y} & = \rho x - y - xz \\ +\dot{z} & = -\beta z + xy +\end{align} +
+ +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
+ +\[ + \mathbf{V}_1 \times \mathbf{V}_2 = + \begin{vmatrix} + \mathbf{i} & \mathbf{j} & \mathbf{k} \\ + \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\ + \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \\ + \end{vmatrix} +\]
+ +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
+ +\[ + \frac{1}{(\sqrt{\phi \sqrt{5}}-\phi) e^{\frac25 \pi}} = + 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} + {1+\frac{e^{-8\pi}} {1+\ldots} } } } +\]
+ +A Rogers-Ramanujan Identity
+ +\[ + 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = + \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, + \quad\quad \text{for $|q|<1$}. +\]
+ +Maxwell's Equations
+ ++\begin{align} + \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\ + \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ + \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ + \nabla \cdot \vec{\mathbf{B}} & = 0 +\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 +you see, MathJax equations can be used this way as well, without unduly +disturbing the spacing between lines.
+ + +