Skip to content

Commit f1426ac

Browse files
committed
add a :structure example to test file
1 parent a2ce71c commit f1426ac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Example/test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ def GetSpeech():
5454
SetMathMLForMathCAT(mathml)
5555
print("MathML: {}\nSpeech: '{}'".format(mathml, GetSpeech()))
5656

57+
mathml = "<math display='block'><mi>x</mi><mo>⨯</mo><mi>y</mi></math>"
58+
SetMathMLForMathCAT(mathml)
59+
print("MathML: {}\nSpeech: '{}'".format(mathml, GetSpeech()))
60+
5761
mathml = "<math><msup> <mi>x</mi> <mn>3</mn> </msup> </math>"
5862
SetMathMLForMathCAT(mathml)
5963
print("MathML: {}\nSpeech: '{}'".format(mathml, GetSpeech()))
@@ -65,3 +69,7 @@ def GetSpeech():
6569
mathml = "<math><mrow intent='_(x, $op)'><mo arg='op'>!</mo></mrow></math>"
6670
SetMathMLForMathCAT(mathml)
6771
print("MathML: {}\nSpeech: '{}'".format(mathml, GetSpeech()))
72+
73+
mathml = "<math intent=':structure'><mrow><mo>(</mo><mfrac linethickness='0'><mn arg='n'>7</mn><mn arg='m'>3</mn></mfrac><mo>)</mo></mrow></math>"
74+
SetMathMLForMathCAT(mathml)
75+
print("MathML: {}\nSpeech (no inference): '{}'".format(mathml, GetSpeech()))

0 commit comments

Comments
 (0)