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 @@ + + + +MathJax Example Page + + + + + +

MathJax Example Pages

+ +View the page source for any of these examples to see how they work. + + + + + diff --git a/ccm-core/web/assets/mathjax/test/index-images.html b/ccm-core/web/assets/mathjax/test/index-images.html new file mode 100644 index 000000000..33e8c6f37 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/index-images.html @@ -0,0 +1,138 @@ + + + +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. +

+ +

+ + + 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 + + + + + + + + + + + + + +
+ +

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. +

+ +
+ + + 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 @@ + + + +Wait Until MathJax is Finished Before Showing Page + + + + + + + + + + + + + + + + + + diff --git a/ccm-core/web/assets/mathjax/test/sample-asciimath.html b/ccm-core/web/assets/mathjax/test/sample-asciimath.html new file mode 100644 index 000000000..f10ba0935 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-asciimath.html @@ -0,0 +1,22 @@ + + + +MathJax AsciiMath Test Page + + + + + + + + + +

+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 @@ + + + +Example of defining a macro that autoloads an extension + + + + + + + + + + + + +

+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 @@ + + + +Dynamic Preview of Textarea with MathJax Content + + + + + + + + + + + +Type text in the box below:
+ + +

+Preview is shown here: +
+
+ + + + + diff --git a/ccm-core/web/assets/mathjax/test/sample-dynamic-steps.html b/ccm-core/web/assets/mathjax/test/sample-dynamic-steps.html new file mode 100644 index 000000000..557196976 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-dynamic-steps.html @@ -0,0 +1,96 @@ + + + +MathJax Dynamic Steps Test Page + + + + + + + + + + + + + + +

Dynamic Equations in MathJax

+ +
+

+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} +

+ + + +
+ + + 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 @@ + + + +MathJax Dynamic Math Test Page + + + + + + + + + + + + +

+Type some \(\rm\TeX\) code and press RETURN:
+ +

+ +

You typed:

+ + + + + + diff --git a/ccm-core/web/assets/mathjax/test/sample-eqnum.html b/ccm-core/web/assets/mathjax/test/sample-eqnum.html new file mode 100644 index 000000000..9b35c2016 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-eqnum.html @@ -0,0 +1,138 @@ + + + +MathJax Equation Numbering + + + + + + + + + + + + +
+

A test of Equation Numbering

+
+ +
+
+Equation: + +\begin{equation} +E = mc^2 +\end{equation} + +Equation*: + +\begin{equation*} +E = mc^2 +\end{equation*} + +
+Brackets: + +\[E = mc^2\] + +Brackets tagged: + +\[E = mc^2\tag{x}\] + +
+Split: + +\begin{equation} +\begin{split} +a& =b+c-d\\ +& \quad +e-f\\ +& =g+h\\ +& =i +\end{split} +\end{equation} + +
+Multline: + +\begin{multline} + a+b+c+d+e+f+g\\ + M+N+O+P+Q\\ + R+S+T\\ + u+v+w+x+y+z +\end{multline} + +Multline*: + +\begin{multline*} + a+b+c+d+e+f+g\\ + M+N+O+P+Q\\ + R+S+T\\ + u+v+w+x+y+z +\end{multline*} + +
+Gather: + +\begin{gather} +a_1=b_1+c_1\\ +a_2=b_2+c_2-d_2+e_2 +\end{gather} + +Gather*: + +\begin{gather*} +a_1=b_1+c_1\\ +a_2=b_2+c_2-d_2+e_2 +\end{gather*} + +
+Align: + +\begin{align} +a_1& =b_1+c_1\\ +a_2& =b_2+c_2-d_2+e_2 +\end{align} + +Align*: + +\begin{align*} +a_1& =b_1+c_1\\ +a_2& =b_2+c_2-d_2+e_2 +\end{align*} + +Align: + +\begin{align} +a_{11}& =b_{11}& a_{12}& =b_{12}\\ +a_{21}& =b_{21}& a_{22}& =b_{22}+c_{22} +\end{align} + +Align with \notag and \tag: + +\begin{align} +a_{11}& =b_{11}& a_{12}& =b_{12}\notag\\ +a_{21}& =b_{21}& a_{22}& =b_{22}+c_{22} \tag{y} +\end{align} + +Align* with \tag: + +\begin{align*} +a_1& =b_1+c_1\tag{z}\\ +a_2& =b_2+c_2-d_2+e_2 +\end{align*} + +
+ + + diff --git a/ccm-core/web/assets/mathjax/test/sample-eqrefs.html b/ccm-core/web/assets/mathjax/test/sample-eqrefs.html new file mode 100644 index 000000000..c10fb5b28 --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-eqrefs.html @@ -0,0 +1,85 @@ + + + +MathJax Equation References + + + + + + + + + + + + +
+

A test of Equation References

+
+ +
+
+Here is a labeled equation: +$$x+1\over\sqrt{1-x^2}\label{ref1}$$ +with a reference to ref1: \ref{ref1}, +and another numbered one with no label: +$$x+1\over\sqrt{1-x^2}$$ +This one uses \nonumber: +$$x+1\over\sqrt{1-x^2}\nonumber$$ +

+


+

+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*} + +

+ + + diff --git a/ccm-core/web/assets/mathjax/test/sample-loader-config.html b/ccm-core/web/assets/mathjax/test/sample-loader-config.html new file mode 100644 index 000000000..0d401fbfe --- /dev/null +++ b/ccm-core/web/assets/mathjax/test/sample-loader-config.html @@ -0,0 +1,55 @@ + + + +Load MathJax with in-line configuration after the page is ready + + + + + + + + + + + +

Adding MathJax with In-Line Configuration

+ +

+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 @@ + + + +Load MathJax after the page is ready + + + + + + + + + + + +

Adding MathJax After the Page is Loaded

+ +

+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 @@ + + + +Example of defining a macro that autoloads an extension + + + + + + + + + + + + + +
+\( + \def\<#1>{\left<#1\right>} + \newcommand{\CC}{\mathbf{C}} +\) +
+ +

+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 @@ + + + +MathJax MathML Test Page + + + + + + + + + +

+When + + a0 +, +there are two solutions to + + ax2 + + bx + + c = 0 + +and they are + + x = + + + + + b + ± + + b2 + + 4ac + + + 2a + + + . + +

+ + + 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 @@ + + + +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: +

+
+

+ + + + + 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 @@ + + + +MathJax TeX 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/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 @@ + + + +MathJax Test Page + + + + + + + + + + + + + +

Sample MathJax Equations

+ +
+ +

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.

+ + +
+ + +