Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Rules/Braille/Russian/Russian_Rules.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
# Russian mathematical braille rules.

# Ignore invisible operators when deciding whether the vector label needs a grouping indicator.
-
name: flat-vector-arrow-postfix-operator
tag: mo
Expand All @@ -14,6 +15,7 @@
then: [t: "⠨⠒⠂"]
else: [t: "⠒⠂"]

# Use the longer bar suffix for a label containing multiple symbols.
-
name: flat-vector-bar-postfix-operator
tag: mo
Expand All @@ -27,6 +29,7 @@
then: [t: "⠨⠒"]
else: [t: "⠒"]

# Use the line suffix after the label, ignoring invisible operators in the label count.
-
name: flat-geometry-line-double-arrow-postfix-operator
tag: mo
Expand All @@ -40,6 +43,8 @@
then: [t: "⠨⠒⠂⠂"]
else: [t: "⠒⠂⠂"]

# Re-enter the same node with whitespace matching disabled to avoid recursion.
# W is a temporary space marker consumed by Russian braille cleanup.
-
name: whitespace
tag: "!*"
Expand All @@ -60,12 +65,14 @@
- else_if: "@data-following-space-width >= 0.25"
then: [t: "W"]

# Represent an intentional blank with a braille space.
-
name: omission-intent
tag: "!*"
match: "contains(@intent, ':blank')"
replace: [t: "⠀"]

# Use the omission sign and continuation digits so the trailing digits do not start a new number.
-
name: omitted-digit-in-number
tag: mrow
Expand Down Expand Up @@ -148,6 +155,7 @@
then: [t: "⠨⠒⠂⠂"]
else: [t: "⠒⠂⠂"]

# Honor a braille replacement supplied by Unicode processing before the generic rules.
-
name: unicode-override
tag: "*"
Expand Down Expand Up @@ -181,6 +189,7 @@
match: "not(following-sibling::*) and preceding-sibling::*[1][self::m:mtable] and count(../*)=2"
replace: [t: ""]

# Emit one group indicator and suppress repeated Latin indicators inside the element group.
-
name: chemistry-single-letter-element-group
tag: mrow
Expand All @@ -194,6 +203,7 @@
variables: [InChemElementGroup: "true()"]
replace: [x: "*"]

# Handle the function-application shape introduced by canonicalization for geometry symbols.
-
name: canonical-prefix-geometry-op
tag: mrow
Expand Down Expand Up @@ -264,6 +274,7 @@
then: [t: "⠨⠒⠂⠂"]
else: [t: "⠒⠂⠂"]

# Keep the repeating part in numeric continuation form when it is split across row children.
-
name: periodic-decimal-row
tag: mrow
Expand Down Expand Up @@ -410,6 +421,7 @@
- x: "*[1]"
- t: "⠹"

# Encode an integer root index with the lower-cell digit mappings.
-
name: integer-index
tag: mroot
Expand All @@ -421,6 +433,7 @@
- x: "*[1]"
- t: "⠹"

# Handle a fraction directly inside another fraction before the simple fraction rules.
-
name: nested-fraction
tag: mfrac
Expand All @@ -432,6 +445,7 @@
- x: "*[2]"
- t: "⠰"

# Use lower-cell denominator digits for a fraction with two unsigned integer tokens.
-
name: simple-numeric
tag: mfrac
Expand Down Expand Up @@ -515,6 +529,7 @@
- x: "*[2]/*[1]/*[1]/*[1]"
- x: "*[3]"

# Enable long-division context and leave the row delimiters empty inside this table.
-
name: long-division-table
tag: mtable
Expand All @@ -525,6 +540,7 @@
match: "contains(@intent, ':long-division') or contains(@intent, ':angle-division')"
replace: [x: "*"]

# Use column-arithmetic markers so cleanup preserves digit alignment.
-
name: column-arithmetic-table
tag: mtable
Expand Down Expand Up @@ -1548,13 +1564,15 @@
replace:
- t: "⠶"

# Use the same function markers for mo tokens as for mi and mtext tokens.
-
name: operator-functions
tag: mo
match: "DefinitionValue(., 'Braille', 'RussianFunctionBraille') != ''"
replace:
- x: "DefinitionValue(., 'Braille', 'RussianFunctionBraille')"

# Inspect neighboring visible leaves, including enclosing rows, for the recognition-point context.
-
name: contextual-square-bracket-recognition-point
tag: mo
Expand All @@ -1573,6 +1591,7 @@
- T: "⠠"
- x: "text()"

# Use the first and last visible leaves inside the paired angle brackets to select the indicator.
-
name: contextual-angle-bracket-recognition-point
tag: mo
Expand Down Expand Up @@ -1605,6 +1624,7 @@
replace:
- x: "text()"

# Digits in later long-division rows bypass the normal number indicator.
-
name: long-division-continuation-number
tag: mn
Expand All @@ -1615,6 +1635,7 @@
replace:
- x: "BrailleChars(translate(., '0123456789', '\ue020\ue021\ue022\ue023\ue024\ue025\ue026\ue027\ue028\ue029'), 'Russian')"

# Use a separate digit range so cleanup can preserve column-arithmetic spacing.
-
name: column-arithmetic-continuation-number
tag: mn
Expand All @@ -1625,6 +1646,7 @@
replace:
- x: "BrailleChars(translate(., '0123456789', '\ue040\ue041\ue042\ue043\ue044\ue045\ue046\ue047\ue048\ue049'), 'Russian')"

# Continue numeric mode for a repeating part stored between separate parenthesis tokens.
-
name: periodic-decimal-period-digits
tag: mn
Expand All @@ -1636,6 +1658,7 @@
replace:
- x: "BrailleChars(translate(., '0123456789', '\ue030\ue031\ue032\ue033\ue034\ue035\ue036\ue037\ue038\ue039'), 'Russian')"

# Translate fractional and repeating digits through the decimal-continuation mappings.
-
name: periodic-decimal
tag: mn
Expand All @@ -1648,6 +1671,7 @@
- x: "BrailleChars(translate(substring-before(substring-after(., '('), ')'), '0123456789', '\ue030\ue031\ue032\ue033\ue034\ue035\ue036\ue037\ue038\ue039'), 'Russian')"
- t: "⠜"

# Keep the integer part in normal numeric mode and suppress a new indicator after the comma.
-
name: decimal-comma
tag: mn
Expand All @@ -1664,6 +1688,7 @@
replace:
- x: "BrailleChars(., 'Russian')"

# Return a private-use function marker; Unicode translation expands it to braille.
-
name: functions
tag: [mi, mtext]
Expand Down
4 changes: 4 additions & 0 deletions Rules/Braille/Russian/definitions.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
- include: "../definitions.yaml"

# Private-use markers expanded by unicode.yaml; aliases share the same braille spelling.
- RussianFunctionBraille: {
"arcsin": "\uE100", "arccos": "\uE101", "arctg": "\uE102", "arctan": "\uE102",
"arcctg": "\uE103", "arccotan": "\uE103", "arccot": "\uE103",
Expand All @@ -17,6 +18,7 @@
"gcd": "\uE11E", "lcm": "\uE11F"
}

# Private-use label markers shared by over-, under-, and script-label rules.
- RussianLabelMarks: {
"′": "\uE130", "″": "\uE130\uE130", "‴": "\uE130\uE130\uE130", "'": "\uE130",
"*": "\uE131", "∗": "\uE131", "⋆": "\uE131",
Expand All @@ -31,12 +33,14 @@
"←": "\uE13B", "⟵": "\uE13B", "⃖": "\uE13B"
}

# These over-label marks do not need a separate position indicator.
- RussianExactOverLabelMarksWithoutIndicator: {
"~": "\uE135", "∼": "\uE135", "˜": "\uE135", "̃": "\uE135",
"^": "\uE136", "∧": "\uE136", "ˆ": "\uE136", "̂": "\uE136",
"∨": "\uE137", "˅": "\uE137", "ˇ": "\uE137", "̌": "\uE137"
}

# These upper-right labels use their mark without a separate position indicator.
- RussianUpperRightLabelMarksWithoutIndicator: {
"′": "\uE130", "″": "\uE130\uE130", "‴": "\uE130\uE130\uE130", "'": "\uE130",
"*": "\uE131", "∗": "\uE131", "⋆": "\uE131",
Expand Down
2 changes: 1 addition & 1 deletion Rules/Braille/Russian/unicode-full.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- "⋇": [tc: "1⠌⠯⠦"] # 0x22C7 (Division times)
- "⊩": [tc: "⠸⠳⠿⠸⠒"] # 0x22A9 (Forces)
- "ℏ": [tc: "⠈⠒⠓"] # t: "B"F (reduced Plank's constant)
- "ℏ": [tc: "⠈⠒⠓"] # U+210F (reduced Planck constant)
- "ⅆ": [tc: "⠙"] # 0x2146
- "ⅇ": [tc: "⠑"] # 0x2147
- "ⅈ": [tc: "⠊"] # 0x2148
Expand Down
Loading
Loading