Skip to content

Commit 728bbb7

Browse files
committed
fix row terminator for UEB in mtable
1 parent 88856c9 commit 728bbb7

2 files changed

Lines changed: 44 additions & 2 deletions

File tree

‎Rules/Braille/UEB/UEB_Rules.yaml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@
159159
replace:
160160
- test:
161161
if: "../*[2]" # more than one row
162-
then: [t: "⠠"]
163-
- t: ""
162+
then: [t: "⠸W"]
164163
- x: $RowStart
165164
- test:
166165
if: .[self::m:mlabeledtr]

‎tests/braille/UEB/iceb.rs‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,49 @@ fn binomial_14_3_3_2_mtable() -> Result<()> {
14651465

14661466
}
14671467

1468+
#[test]
1469+
fn matrix_15_2_1() -> Result<()> {
1470+
// GTM 15.2 first example: I = [[1,0],[0,1]] with enlarged parentheses (one-line encoding).
1471+
let expr = r#"<math><mrow><mo>(</mo><mtable>
1472+
<mtr><mtd><mn>1</mn></mtd><mtd><mn>0</mn></mtd></mtr>
1473+
<mtr><mtd><mn>0</mn></mtd><mtd><mn>1</mn></mtd></mtr>
1474+
</mtable><mo>)</mo></mrow></math>"#;
1475+
test_braille("UEB", expr, "⠸⠀⠐⠣⠼⠁⠀⠼⠚⠠⠐⠜⠸⠀⠐⠣⠼⠚⠀⠼⠁⠠⠐⠜")?;
1476+
return Ok(());
1477+
}
1478+
1479+
#[test]
1480+
fn matrix_15_2_2() -> Result<()> {
1481+
// GTM 15.2: matrix with enlarged square brackets.
1482+
let expr = r#"<math><mrow><mo>[</mo><mtable>
1483+
<mtr><mtd><mi>a</mi></mtd><mtd><mi>b</mi></mtd></mtr>
1484+
<mtr><mtd><mi>c</mi></mtd><mtd><mi>d</mi></mtd></mtr>
1485+
</mtable><mo>]</mo></mrow></math>"#;
1486+
test_braille("UEB", expr, "⠸⠀⠨⠣⠁⠀⠃⠠⠨⠜⠸⠀⠨⠣⠰⠉⠀⠙⠠⠨⠜")?;
1487+
return Ok(());
1488+
}
1489+
1490+
#[test]
1491+
fn matrix_15_2_3() -> Result<()> {
1492+
// Single-row: no enlarged (dot-6) markers (UEB_Rules one-row path).
1493+
let expr = r#"<math><mrow><mo>(</mo><mtable>
1494+
<mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd><mtd><mn>3</mn></mtd></mtr>
1495+
</mtable><mo>)</mo></mrow></math>"#;
1496+
test_braille("UEB", expr, "⠐⠣⠼⠁⠀⠼⠃⠀⠼⠉⠐⠜")?;
1497+
return Ok(());
1498+
}
1499+
1500+
#[test]
1501+
fn determinant_15_3_1() -> Result<()> {
1502+
// GTM 15.3: determinant with enlarged vertical bars.
1503+
let expr = r#"<math><mrow><mo>|</mo><mtable>
1504+
<mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd></mtr>
1505+
<mtr><mtd><mn>3</mn></mtd><mtd><mn>4</mn></mtd></mtr>
1506+
</mtable><mo>|</mo></mrow></math>"#;
1507+
test_braille("UEB", expr, "⠸⠀⠸⠳⠼⠁⠀⠼⠃⠠⠸⠳⠸⠀⠸⠳⠼⠉⠀⠼⠙⠠⠸⠳")?;
1508+
return Ok(());
1509+
}
1510+
14681511
#[test]
14691512
fn chem_16_2_8() -> Result<()> {
14701513
let expr = "<math><mi>Ca</mi><msub><mrow><mo>(</mo><mi>OH</mi><mo>)</mo></mrow><mn>2</mn></msub></math>";

0 commit comments

Comments
 (0)