Skip to content

Commit

Permalink
Modified example_11_5_3 to use output from MathJax. The previous Ma…
Browse files Browse the repository at this point in the history
…thML was strange and I couldn't figure out where it came from.

Added `overscript_grouping_aph_5_4_8` to test issue #220.
  • Loading branch information
NSoiffer committed Dec 13, 2023
1 parent 4fcd528 commit 5f2aa22
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
1 change: 0 additions & 1 deletion tests/braille/Nemeth/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ fn greek_24_b_1() {

#[test]
fn eli_nemeth_UEB_rule_book_4_11_1() {
init_logger();
let expr = "<math>
<mtext>p</mtext><mtext>&#xA0;</mtext>
<mtext>D</mtext><mtext>&#xA0;</mtext>
Expand Down
19 changes: 16 additions & 3 deletions tests/braille/UEB/iceb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,10 +949,23 @@ fn example_11_5_2() {

#[test]
fn example_11_5_3() {
// from MathJaX
let expr = "<math>
<msup><mrow/><mi>n</mi></msup>
<msub><mi>C</mi><mi>r</mi></msub>
<mo>=</mo>
<mrow>
<mo minsize='2.047em' maxsize='2.047em'>(</mo>
<mfrac linethickness='0'><mi>n</mi><mi>r</mi></mfrac>
<mo minsize='2.047em' maxsize='2.047em'>)</mo>
</mrow>
<mo>=</mo>
<mfrac>
<mrow><mi>n</mi><mo>!</mo></mrow>
<mrow><mi>r</mi><mo>!</mo><mo stretchy='false'>(</mo><mi>n</mi><mo>&#x2212;</mo><mi>r</mi><mo stretchy='false'>)</mo><mo>!</mo></mrow>
</mfrac>
</math>";
// modified to use "shape" as recommended in a comment on this example
let expr = "<math><msub><mmultiscripts><mi>C</mi><mprescripts/><none/><mi>n</mi></mmultiscripts><mi>r</mi></msub><mo>=</mo>
<mo>(</mo><mfrac linethickness='0'><mi>n</mi><mi>r</mi></mfrac><mo>)</mo><mo>=</mo>
<mfrac><mrow><mi>n</mi><mo>!</mo></mrow><mrow><mi>r</mi><mo>!</mo><mo>(</mo><mi>n</mi><mo>-</mo><mi>r</mi><mo>)</mo><mo>!</mo></mrow></mfrac></math>";
test_braille("UEB", expr, "⠰⠰⠰⠔⠝⠠⠉⠢⠗⠀⠐⠶⠀⠐⠣⠝⠰⠻⠗⠐⠜⠀⠐⠶⠀⠷⠝⠖⠨⠌⠗⠖⠐⠣⠝⠐⠤⠗⠐⠜⠖⠾⠰⠄");
}

Expand Down
7 changes: 7 additions & 0 deletions tests/braille/UEB/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ fn blank_aph_7_1_ex5() {
test_braille("UEB", expr, "⠼⠉⠒⠼⠁⠑⠀⠒⠒⠀⠼⠋⠚⠒⠨⠤");
}

#[test]
fn overscript_grouping_aph_5_4_8() {
// this test was added because #220 (failed to add grouping around overscript)
let expr = "<math> <mover> <mi>MN</mi> <mo>&#x2194;</mo> </mover> </math>";
test_braille("UEB", expr, "⠰⠰⠣⠠⠠⠍⠝⠜⠨⠔⠳⠺⠗⠕");
}

// Extra tests targeted at special cases in MathCAT
#[test]
fn number_space_before() {
Expand Down

0 comments on commit 5f2aa22

Please sign in to comment.