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
26 changes: 26 additions & 0 deletions Rules/Braille/Russian/Russian_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1555,6 +1555,32 @@
replace:
- x: "DefinitionValue(., 'Braille', 'RussianFunctionBraille')"

-
name: contextual-square-bracket-recognition-point
tag: mo
match:
- "parent::*[IsBracketed(., '[', ']')] and"
- "((.='[' and not(preceding-sibling::*) and following-sibling::*[1][self::m:mi or self::m:mtext]) or"
- " (.=']' and not(following-sibling::*) and preceding-sibling::*[1][self::m:mi or self::m:mtext]))"
replace:
- T: "⠠"
- x: "text()"

-
name: contextual-angle-bracket-recognition-point
tag: mo
match:
- "parent::*[IsBracketed(., '⟨', '⟩')] and"
- "((.='⟨' and not(preceding-sibling::*)) or (.='⟩' and not(following-sibling::*))) and"
- "(parent::*/*[2][self::m:mi or self::m:mtext] or"
- " parent::*/*[last()-1][self::m:mi or self::m:mtext])"
replace:
- T: "⠈"
- test:
- if: ".='⟨'"
then: [T: "⠪"]
else: [T: "⠕"]

-
name: div-operator-function
tag: mo
Expand Down
6 changes: 6 additions & 0 deletions Rules/Braille/Russian/unicode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@
- "": [t: "⠀⠰⠾"]
- "": [t: "⠀⠪⠶"]
- "": [t: "⠀⠕⠶"]
- "": [T: "⠀⠪⠕⠀"]
- "": [T: "⠀⠕⠪⠀"]
- "": [t: "⠀⠪⠪⠀"]
- "": [t: "⠀⠕⠕⠀"]
- "": [t: "⠀⠒⠪⠀"]
Expand All @@ -238,6 +240,10 @@
- "": [t: "⠠⠲⠲⠲"]
- "": [t: "⠠⠲⠲⠲"]
- "": [t: "⠸⠙"]
- "": [T: "⠪"]
- "": [T: "⠕"]
- "": [T: "⠰⠌"]
- "": [T: "⠘⠡"]
- "": [t: "⠀⠒⠕"]
- "": [t: "⠀⠒⠕"]
- "": [t: "⠀⠦⠶"]
Expand Down
35 changes: 14 additions & 21 deletions Rules/Braille/UEB/unicode-full.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
---

- " ": [t: "W"] # 0x2000
- " ": [t: "W"] # 0x2001
- " ": [t: "W"] # 0x2002
- " ": [t: "W"] # 0x2003
- " ": [t: "W"] # 0x2004
- " ": [t: "W"] # 0x2005
- " ": [t: "W"] # 0x2006
- " ": [t: "W"] # 0x2007
- " ": [t: "W"] # 0x2008
- " ": [t: "W"] # 0x2009
- " ": [t: "W"] # 0x200a
- "​": [t: "W"] # 0x200b
- "
": [t: "W"] # 0x2028
- "
": [t: "W"] # 0x2029
- " ": [t: "W"] # 0x202f
- " ": [t: "W"] # 0x205f
- "": [t: "W"] # 0xfeff


- "⋇": [tc: "1⠌⠯⠦"] # 0x22C7 (Division times)
- "⊩": [tc: "⠸⠳⠿⠸⠒"] # 0x22A9 (Forces)
- "ℏ": [tc: "⠈⠒⠓"] # t: "B"F (reduced Plank's constant)
- "ⅆ": [tc: "⠙"] # 0x2146
- "ⅇ": [tc: "⠑"] # 0x2147
Expand Down Expand Up @@ -189,6 +171,7 @@
- spell: "translate('.', '₊₋₌₍₎', '⠖⠤⠶⠣⠜')"
- "™": [t: "⠘⠞"] # 0x2122


- "ℊ": [tc: "TL⠛⠁"] # 0x210a (Script Small G)
- "ℋ": [tc: "TCL⠓⠁"] # 0x210b (Script Capital H)
- "ℒ": [tc: "TCL⠇"] # 0x2113 (Script Capital L)
Expand All @@ -215,6 +198,16 @@
- "ℤ": [tc: "𝔹CL⠵"] # 0x2124


- "𝚨-𝛀": # 0x1d6a8 - 0x1d6c0
- tc: "B"
- spell: "translate('.', '𝛂𝛃𝛄𝛅𝛆𝛇𝛈𝛉𝛊𝛋𝛌𝛍𝛎𝛏𝛐𝛑𝛒𝛓𝛔𝛕𝛖𝛗𝛘𝛙𝛚', 'αβγδεζηθικλμνξοπρςστυφχψω')"


- "𝛂-𝛚": # 0x1d6c2 - 0x1d6da
- tc: "BGL"
- spell: "translate('.', '𝛂𝛃𝛄𝛅𝛆𝛇𝛈𝛉𝛊𝛋𝛌𝛍𝛎𝛏𝛐𝛑𝛒𝛓𝛔𝛕𝛖𝛗𝛘𝛙𝛚', 'αβγδεζηθικλμνξοπρςστυφχψω')"


- "𝔄-𝔜": # 0x1d504 - 0x1d51d ('z' version is reserved)
- tc: "DC"
- spell: "translate('.', '𝔄𝔅𝔆𝔇𝔈𝔉𝔊𝔋𝔌𝔍𝔎𝔏𝔐𝔑𝔒𝔓𝔔𝔕𝔖𝔗𝔘𝔙𝔚𝔛𝔜', 'abcdefghijklmnopqrstuvwxyz')"
Expand Down Expand Up @@ -248,7 +241,7 @@
# script chars in math alphabetic block and also MathType private use area
- "𝒜-𝒵": # 0x1d49c - 0x1d4b5
- tc: "TsC"
- spell: "translate('.', '𝒜𝒝𝒞𝒟𝒠𝒡𝒢𝒣𝒤𝒥𝒦𝒧𝒨𝒩𝒪𝒫𝒬𝒭𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵', 'abcdefghijklmnopqrstuvwxyz')"
- spell: "translate('.', '𝒜𝒝𝒞𝒟𝒠𝒡𝒢𝒣𝒤𝒥𝒦𝒧𝒨𝒩𝒪𝒫𝒬𝒭𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵', 'abcdefghijklmnopqrstuvwxyza')"

- "𝒶-𝓏": # 0x1d4b6 - 0x1d4cf
- tc: "Ts"
Expand Down
225 changes: 225 additions & 0 deletions Rules/Languages/de/unicode-full.yaml

Large diffs are not rendered by default.

29 changes: 7 additions & 22 deletions Rules/Languages/en/SharedRules/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
- test:
- if: "string-length(.) = 1 and text() != '_'" # need unicode.tdl to kick in for single letter tokens
then: [x: "text()"]
- else_if: "@data-chem-element > 0 or @data-roman-numeral" # NavMode=Character needs this
- else_if: "@data-chem-element or @data-roman-numeral" # NavMode=Character needs this
then: [spell: "text()", pause: "short"]
else: [x: "translate(., '-_\u00A0', ' ')"] # from intent literals or from extra spaces added (which get deleted)

Expand Down Expand Up @@ -237,26 +237,12 @@
- x: "*[2]"
- t: "below" # phrase(x with z 'below' it)

# FIX: this only works for up to four dots (which is realistically all we need)
- name: dot-over
tag: modified-variable
match: "*[1][self::m:mi] and (*[2][translate(., '.', '')=''])"
replace:
- x: "*[1]"
- x: "IfThenElse(string-length(*[2])=1, 'dot',
IfThenElse(string-length(*[2])=2, 'double dot',
IfThenElse(string-length(*[2])=3, 'triple dot', 'quadruple dot')
))"
- pause: short

# FIX: the 'translate' list is a little different from 'modified-variable', so we also include 'mover' (unify?)
- name: diacriticals
tag: [mover, modified-variable]
tag: mover
match: "*[1][self::m:mi] and *[2][translate(., '\u0306\u030c.\u00A8\u02D9\u20DB\u20DC`^ˇ~→¯_', '')='']"
replace:
- x: "*[1]"
- x: "*[2]"
- pause: short

- name: default
tag: mover
Expand Down Expand Up @@ -436,23 +422,22 @@
- t: "end scripts" # phrase(At this point 'end scripts' occurs)

- name: default
tag: [mtable, array]
tag: mtable
variables:
- IsColumnSilent: "false()"
- NumColumns: "CountTableColumns(.)"
- NumRows: "CountTableRows(.)"
- NumColumns: "count(*[1]/*) - IfThenElse(*/self::m:mlabeledtr, 1, 0)"
match: "."
replace:
- t: "table with" # phrase(the 'table with' 3 rows)
- x: "$NumRows"
- x: count(*)
- test:
if: "$NumRows=1"
if: count(*)=1
then: [t: "row"] # phrase(the table with 1 'row')
else: [t: "rows"] # phrase(the table with 3 'rows')
- t: "and" # phrase(the table with 3 rows 'and' 4 columns)
- x: "$NumColumns"
- test:
if: "$NumColumns=1"
if: "NumColumns=1"
then: [t: "column"] # phrase(the table with 3 rows and 1 'column')
else: [t: "columns"] # phrase(the table with 3 rows and 4 'columns')
- pause: long
Expand Down
Loading