From c828a086a5eaf65cedb662bf0862beee28e4db85 Mon Sep 17 00:00:00 2001 From: milde Date: Thu, 20 May 2021 12:18:55 +0000 Subject: MathML: First part of fix to #407. Partially fix #407 "Inline MathML role and block MathML directive appear with reversed styles." git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8736 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- .../functional/expected/math_output_mathml.html | 221 +++++++++++++++++++++ .../functional/expected/math_output_mathml.xhtml | 221 --------------------- 2 files changed, 221 insertions(+), 221 deletions(-) create mode 100644 docutils/test/functional/expected/math_output_mathml.html delete mode 100644 docutils/test/functional/expected/math_output_mathml.xhtml (limited to 'docutils/test/functional/expected') diff --git a/docutils/test/functional/expected/math_output_mathml.html b/docutils/test/functional/expected/math_output_mathml.html new file mode 100644 index 000000000..f41bc99fe --- /dev/null +++ b/docutils/test/functional/expected/math_output_mathml.html @@ -0,0 +1,221 @@ + + + + + + +Mathematics + + + + +
+

Mathematics

+ +

Docutils supports inline math with the prefix or postfix :math: +role specificator, +n!+sin(xn2) and +Ac= +π +4d2, as well as displayed math via the +math directive:

+
+ + + +f(ϵ)= +1 +1+exp + +ε +kBT +
+

Content may start on the first line of the directive, e.g.

+
+ + + +N= +number of apples +7 +
+

Equations can be labeled with a reference name using the :name: option. +See eq:M and eq:schrödinger below.

+

The determinant of the matrix

+
+ + + + +M= + + + +a +b + +c +d +
+

is +| +M|=ad-bc.

+

More than one display math block can be put in one math directive. +For example, the following sum and integral with limits:

+
+ + + +01xndx= +1 +n+1 +
+
+ + + + +n=1mn= +m(m+1) +2 +
+

LaTeX-supported Unicode math symbols can be used in math roles and +directives:

+

The Schrödinger equation

+
+ + + +i + +tΨ= +H^Ψ, +
+

with the wave function +Ψ, describes how the quantum state of a +physical system changes in time.

+
+
Math-Accents:
+
+++++ + + + + + + + + + + + + + + + + + + +

+ +a´ \acute{a}

+ +t˙ \dot{t}

+ +γ^ \hat{\gamma}

+ +a` \grave{a}

+ +t¨ \ddot{t}

+ +α˜ \tilde{\alpha}

+ +x˘ \breve{x}

+ +t \dddot{t}

+ +ı \vec{\imath}

+ +aˇ \check{a}

+ +a¯ \bar{a}

+ +R \vec{R}

+
+
+ +

Modulation Transfer Function:

+
+ + + +MTF= + +{s(x)} +{s(x)}| +ω +x=0=abs + + +- +s(x)e +iω +xxd +x + +- +s(x)d +x. +
+

Math split over two lines: If a double backslash is detected outside a +\begin{...} \end{...} pair, the math code is wrapped in an AMSmath +align environment:

+
+ + + +s +out(x) +=s +in(x')*sδ(x-x') + + +=s +in(x')sδ(x-x')dx' +
+

Cases ("manually", with matrix environment):

+
+ + + +sgn(x)= + + + +-1 +x<0 + +1 +x>0 +
+

Cases with the AMSmath cases environment (not (yet) supported by +HTML writers with --math-output=MathML):

+
+

System Message: ERROR/3 (functional/input/data/math.txt, line 108)

+

+Environment not supported! Supported environment: "matrix".

+
+\mathrm{sgn}(x) = \begin{cases}
+                    -1 & x<0\\
+                     1 & x>0
+                  \end{cases}
+
+
+
+ + diff --git a/docutils/test/functional/expected/math_output_mathml.xhtml b/docutils/test/functional/expected/math_output_mathml.xhtml deleted file mode 100644 index e8ee00d56..000000000 --- a/docutils/test/functional/expected/math_output_mathml.xhtml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - -Mathematics - - - - -
-

Mathematics

- -

Docutils supports inline math with the prefix or postfix :math: -role specificator, -n!+sin(xn2) and -Ac= -π -4d2, as well as displayed math via the -math directive:

-
- - - -f(ϵ)= -1 -1+exp - -ε -kBT -
-

Content may start on the first line of the directive, e.g.

-
- - - -N= -number of apples -7 -
-

Equations can be labeled with a reference name using the :name: option. -See eq:M and eq:schrödinger below.

-

The determinant of the matrix

-
- - - - -M= - - - -a -b - -c -d -
-

is -| -M|=ad-bc.

-

More than one display math block can be put in one math directive. -For example, the following sum and integral with limits:

-
- - - -01xndx= -1 -n+1 -
-
- - - - -n=1mn= -m(m+1) -2 -
-

LaTeX-supported Unicode math symbols can be used in math roles and -directives:

-

The Schrödinger equation

-
- - - -i - -tΨ= -H^Ψ, -
-

with the wave function -Ψ, describes how the quantum state of a -physical system changes in time.

-
-
Math-Accents:
-
----- - - - - - - - - - - - - - - - - - - -

- -a´ \acute{a}

- -t˙ \dot{t}

- -γ^ \hat{\gamma}

- -a` \grave{a}

- -t¨ \ddot{t}

- -α˜ \tilde{\alpha}

- -x˘ \breve{x}

- -t \dddot{t}

- -ı \vec{\imath}

- -aˇ \check{a}

- -a¯ \bar{a}

- -R \vec{R}

-
-
- -

Modulation Transfer Function:

-
- - - -MTF= - -{s(x)} -{s(x)}| -ω -x=0=abs - - -- -s(x)e -iω -xxd -x - -- -s(x)d -x. -
-

Math split over two lines: If a double backslash is detected outside a -\begin{...} \end{...} pair, the math code is wrapped in an AMSmath -align environment:

-
- - - -s -out(x) -=s -in(x')*sδ(x-x') - - -=s -in(x')sδ(x-x')dx' -
-

Cases ("manually", with matrix environment):

-
- - - -sgn(x)= - - - --1 -x<0 - -1 -x>0 -
-

Cases with the AMSmath cases environment (not (yet) supported by -HTML writers with --math-output=MathML):

-
-

System Message: ERROR/3 (functional/input/data/math.txt, line 108)

-

-Environment not supported! Supported environment: "matrix".

-
-\mathrm{sgn}(x) = \begin{cases}
-                    -1 & x<0\\
-                     1 & x>0
-                  \end{cases}
-
-
-
- - -- cgit v1.2.1