From ff6518096403927976da5b34901a73d98c730d19 Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Sat, 6 Feb 2021 04:36:35 +0000 Subject: fix failing latexmathml tests Signed-off-by: Matthew Peveler --- tests/data/asciimath-html5.html | 1792 ++++++++++++++++++++++++++++++++++ tests/data/asciimath-xhtml11.html | 1794 ++++++++++++++++++++++++++++++++++ tests/data/asciimathml-html5.html | 1794 ---------------------------------- tests/data/asciimathml-xhtml11.html | 1796 ----------------------------------- tests/data/latexmathml-html5.html | 8 +- tests/data/latexmathml-xhtml11.html | 8 +- tests/testasciidoc.conf | 2 +- 7 files changed, 3595 insertions(+), 3599 deletions(-) create mode 100644 tests/data/asciimath-html5.html create mode 100644 tests/data/asciimath-xhtml11.html delete mode 100644 tests/data/asciimathml-html5.html delete mode 100644 tests/data/asciimathml-xhtml11.html diff --git a/tests/data/asciimath-html5.html b/tests/data/asciimath-html5.html new file mode 100644 index 0000000..753fef3 --- /dev/null +++ b/tests/data/asciimath-html5.html @@ -0,0 +1,1792 @@ + + + + + +ASCIIMath Formulae + + + + + + +
+
+
+

ASCIIMath is a clever JavaScript written by +Peter Jipsen that dynamically transforms mathematical formulae +written in a wiki-like plain text markup to +MathML markup which is displayed as +standard mathematical notation by the Web Browser. See Appendix E +in the AsciiDoc User Guide for more details.

+

The AsciiDoc xhtml11 backend supports ASCIIMath — it links the +ASCIIMath script and escapes ASCIIMath delimiters and special +characters to yield valid XHTML. To use ASCIIMath:

+
    +
  1. +

    +Include the -a asciimath command-line option when you run + asciidoc(1). +

    +
  2. +
  3. +

    +Enclose ASCIIMath formulas inside math or double-dollar + passthroughs or in math passthrough blocks. +

    +
  4. +
+

Here’s the AsciiDoc source that generated this +page.

+
NOTE
    +
  • +

    +When you use the asciimath:[] inline macro you need to escape ] + characters in the formulas with a backslash, escaping is unnecessary + if you use the double-dollar macro (for examples see the second + formula below). +

    +
  • +
  • +

    +See the ASCIIMath website for ASCIIMath + documentation and the latest version. +

    +
  • +
  • +

    +If the formulas don’t appear to be correct you probably need to + install the correct math fonts (see the + ASCIIMath website for details). +

    +
  • +
  • +

    +See the LaTeXMathML page if you prefer to use + LaTeX math formulas. +

    +
  • +
+

A list of example formulas:

+
    +
  • +

    +`[[a,b],[c,d]]((n),(k))` +

    +
  • +
  • +

    +`x/x={(1,if x!=0),(text{undefined},if x=0):}` +

    +
  • +
  • +

    +`d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h` +

    +
  • +
  • +

    +`sum_(i=1)\^n i=(n(n+1))/2`$ and bold + `int_0\^(pi/2) sinx\ dx=1` +

    +
  • +
  • +

    +`(a,b]={x in RR : a < x <= b}` +

    +
  • +
  • +

    +`x^2+y_1+z_12^34` +

    +
  • +
+
+
+

The first three terms factor to give +`(x+b/(2a))^2=(b^2)/(4a^2)-c/a`.

+

`x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`.

+

Now we take square roots on both sides and get +`x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`. +Finally we move the `b/(2a)` to the right and simplify to +get the two solutions: +`x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)`.

+
+
+
+
+

+ + + diff --git a/tests/data/asciimath-xhtml11.html b/tests/data/asciimath-xhtml11.html new file mode 100644 index 0000000..3ce4312 --- /dev/null +++ b/tests/data/asciimath-xhtml11.html @@ -0,0 +1,1794 @@ + + + + + + +ASCIIMath Formulae + + + + + + +
+
+
+

ASCIIMath is a clever JavaScript written by +Peter Jipsen that dynamically transforms mathematical formulae +written in a wiki-like plain text markup to +MathML markup which is displayed as +standard mathematical notation by the Web Browser. See Appendix E +in the AsciiDoc User Guide for more details.

+

The AsciiDoc xhtml11 backend supports ASCIIMath — it links the +ASCIIMath script and escapes ASCIIMath delimiters and special +characters to yield valid XHTML. To use ASCIIMath:

+
    +
  1. +

    +Include the -a asciimath command-line option when you run + asciidoc(1). +

    +
  2. +
  3. +

    +Enclose ASCIIMath formulas inside math or double-dollar + passthroughs or in math passthrough blocks. +

    +
  4. +
+

Here’s the AsciiDoc source that generated this +page.

+
NOTE
    +
  • +

    +When you use the asciimath:[] inline macro you need to escape ] + characters in the formulas with a backslash, escaping is unnecessary + if you use the double-dollar macro (for examples see the second + formula below). +

    +
  • +
  • +

    +See the ASCIIMath website for ASCIIMath + documentation and the latest version. +

    +
  • +
  • +

    +If the formulas don’t appear to be correct you probably need to + install the correct math fonts (see the + ASCIIMath website for details). +

    +
  • +
  • +

    +See the LaTeXMathML page if you prefer to use + LaTeX math formulas. +

    +
  • +
+

A list of example formulas:

+
    +
  • +

    +`[[a,b],[c,d]]((n),(k))` +

    +
  • +
  • +

    +`x/x={(1,if x!=0),(text{undefined},if x=0):}` +

    +
  • +
  • +

    +`d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h` +

    +
  • +
  • +

    +`sum_(i=1)\^n i=(n(n+1))/2`$ and bold + `int_0\^(pi/2) sinx\ dx=1` +

    +
  • +
  • +

    +`(a,b]={x in RR : a < x <= b}` +

    +
  • +
  • +

    +`x^2+y_1+z_12^34` +

    +
  • +
+
+
+

The first three terms factor to give +`(x+b/(2a))^2=(b^2)/(4a^2)-c/a`.

+

`x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`.

+

Now we take square roots on both sides and get +`x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`. +Finally we move the `b/(2a)` to the right and simplify to +get the two solutions: +`x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)`.

+
+
+
+
+

+ + + diff --git a/tests/data/asciimathml-html5.html b/tests/data/asciimathml-html5.html deleted file mode 100644 index 0586cf8..0000000 --- a/tests/data/asciimathml-html5.html +++ /dev/null @@ -1,1794 +0,0 @@ - - - - - -ASCIIMathML Formulae - - - - - - -
-
-
-

ASCIIMathML is -a clever JavaScript written by Peter Jipsen that dynamically -transforms mathematical formulae written in a wiki-like plain text -markup to MathML markup which is displayed as -standard mathematical notation by the Web Browser. See Appendix E -in the AsciiDoc User Guide for more details.

-

The AsciiDoc xhtml11 backend supports ASCIIMathML — it links the -ASCIIMathML script and escapes ASCIIMathML delimiters and special -characters to yield valid XHTML. To use ASCIIMathML:

-
    -
  1. -

    -Include the -a asciimath command-line option when you run - asciidoc(1). -

    -
  2. -
  3. -

    -Enclose ASCIIMathML formulas inside math or double-dollar - passthroughs or in math passthrough blocks. -

    -
  4. -
-

Here’s the AsciiDoc source that generated this -page.

-
NOTE
    -
  • -

    -When you use the asciimath:[] inline macro you need to escape ] - characters in the formulas with a backslash, escaping is unnecessary - if you use the double-dollar macro (for examples see the second - formula below). -

    -
  • -
  • -

    -See the - ASCIIMathML - website for ASCIIMathML documentation and the latest version. -

    -
  • -
  • -

    -If the formulas don’t appear to be correct you probably need to - install the correct math fonts (see the - ASCIIMathML - website for details). -

    -
  • -
  • -

    -See the LaTeXMathML page if you prefer to use - LaTeX math formulas. -

    -
  • -
-

A list of example formulas:

-
    -
  • -

    -`[[a,b],[c,d]]((n),(k))` -

    -
  • -
  • -

    -`x/x={(1,if x!=0),(text{undefined},if x=0):}` -

    -
  • -
  • -

    -`d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h` -

    -
  • -
  • -

    -`sum_(i=1)\^n i=(n(n+1))/2`$ and bold - `int_0\^(pi/2) sinx\ dx=1` -

    -
  • -
  • -

    -`(a,b]={x in RR : a < x <= b}` -

    -
  • -
  • -

    -`x^2+y_1+z_12^34` -

    -
  • -
-
-
-

The first three terms factor to give -`(x+b/(2a))^2=(b^2)/(4a^2)-c/a`.

-

`x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`.

-

Now we take square roots on both sides and get -`x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`. -Finally we move the `b/(2a)` to the right and simplify to -get the two solutions: -`x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)`.

-
-
-
-
-

- - - diff --git a/tests/data/asciimathml-xhtml11.html b/tests/data/asciimathml-xhtml11.html deleted file mode 100644 index ce43b24..0000000 --- a/tests/data/asciimathml-xhtml11.html +++ /dev/null @@ -1,1796 +0,0 @@ - - - - - - -ASCIIMathML Formulae - - - - - - -
-
-
-

ASCIIMathML is -a clever JavaScript written by Peter Jipsen that dynamically -transforms mathematical formulae written in a wiki-like plain text -markup to MathML markup which is displayed as -standard mathematical notation by the Web Browser. See Appendix E -in the AsciiDoc User Guide for more details.

-

The AsciiDoc xhtml11 backend supports ASCIIMathML — it links the -ASCIIMathML script and escapes ASCIIMathML delimiters and special -characters to yield valid XHTML. To use ASCIIMathML:

-
    -
  1. -

    -Include the -a asciimath command-line option when you run - asciidoc(1). -

    -
  2. -
  3. -

    -Enclose ASCIIMathML formulas inside math or double-dollar - passthroughs or in math passthrough blocks. -

    -
  4. -
-

Here’s the AsciiDoc source that generated this -page.

-
NOTE
    -
  • -

    -When you use the asciimath:[] inline macro you need to escape ] - characters in the formulas with a backslash, escaping is unnecessary - if you use the double-dollar macro (for examples see the second - formula below). -

    -
  • -
  • -

    -See the - ASCIIMathML - website for ASCIIMathML documentation and the latest version. -

    -
  • -
  • -

    -If the formulas don’t appear to be correct you probably need to - install the correct math fonts (see the - ASCIIMathML - website for details). -

    -
  • -
  • -

    -See the LaTeXMathML page if you prefer to use - LaTeX math formulas. -

    -
  • -
-

A list of example formulas:

-
    -
  • -

    -`[[a,b],[c,d]]((n),(k))` -

    -
  • -
  • -

    -`x/x={(1,if x!=0),(text{undefined},if x=0):}` -

    -
  • -
  • -

    -`d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h` -

    -
  • -
  • -

    -`sum_(i=1)\^n i=(n(n+1))/2`$ and bold - `int_0\^(pi/2) sinx\ dx=1` -

    -
  • -
  • -

    -`(a,b]={x in RR : a < x <= b}` -

    -
  • -
  • -

    -`x^2+y_1+z_12^34` -

    -
  • -
-
-
-

The first three terms factor to give -`(x+b/(2a))^2=(b^2)/(4a^2)-c/a`.

-

`x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`.

-

Now we take square roots on both sides and get -`x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`. -Finally we move the `b/(2a)` to the right and simplify to -get the two solutions: -`x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)`.

-
-
-
-
-

- - - diff --git a/tests/data/latexmathml-html5.html b/tests/data/latexmathml-html5.html index dae63c0..b3f194f 100644 --- a/tests/data/latexmathml-html5.html +++ b/tests/data/latexmathml-html5.html @@ -1964,18 +1964,18 @@ else
-

LaTeXMathML +

LaTeXMathML capability has been added to AsciiDoc for users who are more familar with or prefer LaTeX math formulas to the -ASCIIMathML +ASCIIMath notation.

LaTeXMathML is a derivative of -ASCIIMathML — in +ASCIIMath — in terms of usage the only difference it that you use the latexmath attribute instead of the asciimath attribute.

LaTeXMathML processes LaTeX math formulas not arbitrary LaTeX (as dblatex(1) does). See the -LaTeXMathML +LaTeXMathML website for details.

Here’s the AsciiDoc source that generated this page.

diff --git a/tests/data/latexmathml-xhtml11.html b/tests/data/latexmathml-xhtml11.html index 64140b4..c75c2ff 100644 --- a/tests/data/latexmathml-xhtml11.html +++ b/tests/data/latexmathml-xhtml11.html @@ -1966,18 +1966,18 @@ else
-

LaTeXMathML +

LaTeXMathML capability has been added to AsciiDoc for users who are more familar with or prefer LaTeX math formulas to the -ASCIIMathML +ASCIIMath notation.

LaTeXMathML is a derivative of -ASCIIMathML — in +ASCIIMath — in terms of usage the only difference it that you use the latexmath attribute instead of the asciimath attribute.

LaTeXMathML processes LaTeX math formulas not arbitrary LaTeX (as dblatex(1) does). See the -LaTeXMathML +LaTeXMathML website for details.

Here’s the AsciiDoc source that generated this page.

diff --git a/tests/testasciidoc.conf b/tests/testasciidoc.conf index f0d7dd4..4566d7c 100644 --- a/tests/testasciidoc.conf +++ b/tests/testasciidoc.conf @@ -153,7 +153,7 @@ ASCIIMathML ['xhtml11','html5'] % source -../doc/asciimathml.txt +../doc/asciimath.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LaTeXMathML -- cgit v1.2.1