---
- name: default
tag: math
match: "."
replace:
- with:
variables:
- ClearSpeak_Fractions: "IfThenElse($Verbosity='Verbose' and $ClearSpeak_Fractions='Auto', 'EndFrac', $ClearSpeak_Fractions)"
- ClearSpeak_AbsoluteValue: "IfThenElse($Verbosity='Verbose' and $ClearSpeak_AbsoluteValue='Auto', 'AbsEnd', $ClearSpeak_AbsoluteValue)"
- ClearSpeak_Roots: "IfThenElse($Verbosity='Verbose' and $ClearSpeak_Roots='Auto', 'RootEnd', $ClearSpeak_Roots)"
replace:
- test:
if: "$MathRate = 100"
then: [{x: "*"}]
else:
- rate:
value: "$MathRate"
replace: [{x: "*"}]
- name: empty-mrow
tag: mrow
match: "not(*)"
replace:
- T: " "
- name: default
tag: mrow
match: "."
replace:
- insert:
nodes: "*"
replace: [{pause: auto}]
- name: default
tag: [mi, mn, mo, mtext]
match: "."
replace:
- bookmark: "@id"
- x: "text()"
- name: default
tag: ms
match: "."
replace:
- T: "chuỗi"
- pause: short
- x: "text()"
- name: default
tag: mstyle
match: "."
replace: [{x: "*"}]
- name: simple-sub
tag: particular-value-of
match: "IsNode(*[2], 'simple') or *[2][self::m:mrow][*[2][text()='']]"
replace:
- x: "*[1]"
- x: "*[2]"
- test:
if: "$Verbosity!='Terse' or not(*[2][self::m:mn])" then: [{T: "dưới"}]
- name: default
tag: particular-value-of
match: "."
replace:
- x: "*[1]"
- T: "chỉ số dưới là"
- x: "*[2]"
- T: "hết chỉ số dưới"
- pause: short
- name: default
tag: msubsup
match: "."
replace:
- x: "*[1]"
- T: chỉ số dưới là
- x: "*[2]"
- T: "mũ"
- x: "*[3]"
- name: default
tag: munder
match: "."
replace:
- test:
if: "not(IsNode(*[1], 'simple'))"
then: [{T: "đã sửa"}]
- x: "*[1]"
- T: "với"
- x: "*[2]"
- T: bên dưới
- name: default
tag: mover
match: "."
replace:
- test:
if: "not(IsNode(*[1], 'simple'))"
then: [{T: "đã sửa"}]
- x: "*[1]"
- T: "với"
- x: "*[2]"
- T: "bên trên"
- name: default
tag: munderover
match: "."
replace:
- test:
if: "not(IsNode(*[1], 'simple'))"
then: [{T: "đã sửa"}]
- x: "*[1]"
- T: "với"
- x: "*[2]"
- T: "bên dưới và"
- x: "*[3]"
- T: "bên trên"
- name: default
tag: mmultiscripts
match: "."
variables:
- Prescripts: "m:mprescripts/following-sibling::*"
- NumChildren: "count(*)" - Postscripts: "*[position()>1 and position() < (last() + ($NumChildren mod 2) -count($Prescripts))]"
replace:
- x: "*[1]"
- test:
if: "$Prescripts" then:
- with:
variables:
- PreSubscript: "IfThenElse($Verbosity='Verbose', 'pre-subscript', 'pre-sub')"
- PreSuperscript: "IfThenElse($Verbosity='Verbose', 'pre-superscript', 'pre-super')"
replace:
- test: if: "count($Prescripts) > 2"
then:
- T: "với"
- x: "count($Prescripts) div 2"
- T: "chỉ số trước"
- pause: short
- test:
if: "not($Prescripts[1][self::m:none])"
then:
- x: "$PreSubscript"
- x: "$Prescripts[1]"
- test:
if: "not($Prescripts[1][self::m:none] or $Prescripts[2][self::m:none])"
then: [{T: "và"}]
- test:
if: "not($Prescripts[2][self::m:none])"
then:
- x: "$PreSuperscript"
- x: "$Prescripts[2]"
- pause: short
- test:
if: "count($Prescripts) > 2" then:
- test:
if: "not($Prescripts[3][self::m:none])"
then:
- x: "$PreSubscript"
- x: "$Prescripts[3]"
- test:
if: "not($Prescripts[3][self::m:none] or $Prescripts[4][self::m:none])"
then: [{T: "và"}]
- test:
if: "not($Prescripts[4][self::m:none])"
then:
- x: "$PreSuperscript"
- x: "$Prescripts[4]"
- test:
if: "count($Prescripts) > 4" then:
- T: "và chỉ số trước xen kẽ"
- x: "$Prescripts[position() > 4]"
- T: "hết chỉ số trước"
- test:
if: "$Postscripts"
then:
- with:
variables:
- PostSubscript: "IfThenElse($Verbosity='Verbose', 'subscript', 'sub')"
- PostSuperscript: "IfThenElse($Verbosity='Verbose', 'superscript', 'super')"
replace:
- test: if: "count($Postscripts) > 2"
then:
- test:
if: "$Prescripts"
then: [{T: "và"}]
- T: "với"
- x: "count($Postscripts) div 2"
- T: "chỉ số sau"
- pause: short
- test:
if: "not($Postscripts[1][self::m:none])"
then:
- x: "$PostSubscript"
- x: "$Postscripts[1]"
- test:
if: "not($Postscripts[1][self::m:none] or $Postscripts[2][self::m:none])"
then: [{T: "và"}]
- test:
if: "not($Postscripts[2][self::m:none])"
then:
- x: "$PostSuperscript"
- x: "$Postscripts[2]"
- test:
if: "count($Postscripts) > 2"
then:
- test:
if: "not($Postscripts[3][self::m:none])"
then:
- x: "$PostSubscript"
- x: "$Postscripts[3]"
- test:
if: "not($Postscripts[3][self::m:none] or $Postscripts[4][self::m:none])"
then: [{T: "và"}]
- test:
if: "not($Postscripts[4][self::m:none])"
then:
- x: "$PostSuperscript"
- x: "$Postscripts[4]"
- test:
if: "count($Postscripts) > 4"
then:
- test:
if: "not($Postscripts[5][self::m:none])"
then:
- x: "$PostSubscript"
- x: "$Postscripts[5]"
- test:
if: "not($Postscripts[5][self::m:none] or $Postscripts[6][self::m:none])"
then: [{T: "và"}]
- test:
if: "not($Postscripts[6][self::m:none])"
then:
- x: "$PostSuperscript"
- x: "$Postscripts[6]"
- test:
if: "count($Postscripts) > 6"
then:
- test:
if: "not($Postscripts[7][self::m:none])"
then:
- x: "$PostSubscript"
- x: "$Postscripts[7]"
- test:
if: "not($Postscripts[7][self::m:none] or $Postscripts[8][self::m:none])"
then: [{T: "và"}]
- test:
if: "not($Postscripts[8][self::m:none])"
then:
- x: "$PostSuperscript"
- x: "$Postscripts[8]"
- test:
if: "count($Postscripts) > 8" then:
- T: "và chỉ số xen kẽ"
- x: "$Postscripts[position() > 8]"
- T: "hết chỉ số"
- name: default
tag: mtable
variables: [{IsColumnSilent: false()}]
match: "."
replace:
- T: "bảng gồm"
- x: count(*)
- test:
if: count(*)=1
then: {T: "dòng"}
else: {T: "dòng"}
- T: và
- x: "count(*[1]/*)"
- test:
if: "count(*[1]/*)=1"
then: {T: "cột"}
else: {T: "cột"}
- pause: long
- x: "*"
- name: default
tag: mtr
match: "."
replace:
- x: "*"
- name: default
tag: mtd
match: "."
replace:
- T: "cột"
- x: "count(preceding-sibling::*)+1"
- pause: medium
- x: "*" - pause: long
- name: default
tag: menclose
match: "."
replace:
- test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' box ')]"
then: [{T: hộp}, {pause: short}]
- test:
if: ".[contains(@notation,'roundedbox')]"
then: [{T: hộp tròn}, {pause: short}]
- test:
if: ".[contains(@notation,'circle')]"
then: [{T: hình tròn}, {pause: short}]
- test:
if: ".[ contains(concat(' ', normalize-space(@notation), ' '), ' left ') or contains(concat(' ', normalize-space(@notation), ' '), ' right ') or contains(@notation,'top') or contains(@notation,'bottom') ]"
then:
- T: đường nối
- test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' left ')]"
then: [{T: trái}, {pause: short}]
- test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' right ')]"
then: [{T: phải}, {pause: short}]
- test:
if: ".[contains(@notation,'top')]"
then: [{T: trên}, {pause: short}]
- test:
if: ".[contains(@notation,'bottom')]"
then: [{T: đáy}, {pause: short}]
- test:
if: ".[ contains(@notation,'updiagonalstrike') or contains(@notation,'downdiagonalstrike') or contains(@notation,'verticalstrike') or contains(@notation,'horizontalstrike') ]"
then:
- T: đường cắt
- test:
if: ".[contains(@notation,'updiagonalstrike') and contains(@notation,'downdiagonalstrike')]"
then: [{SPELL: "'x'"}, {pause: short}] else:
- test:
if: ".[contains(@notation,'updiagonalstrike')]"
then: [{T: chéo lên}, {pause: short}]
- test:
if: ".[contains(@notation,'downdiagonalstrike')]"
then: [{T: chéo xuống}, {pause: short}]
- test:
if: ".[contains(@notation,'verticalstrike')]"
then: [{T: thẳng đứng}, {pause: short}]
- test:
if: ".[contains(@notation,'horizontalstrike')]"
then: [{T: ngang}, {pause: short}]
- pause: short
- test:
if: ".[contains(@notation,'uparrow')]"
then: [{T: mũi tên lên}, {pause: short}]
- test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' downarrow ')]"
then: [{T: mũi tên xuống}, {pause: short}]
- test:
if: ".[contains(@notation,'leftarrow')]"
then: [{T: mũi tên trái}, {pause: short}]
- test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' rightarrow ')]"
then: [{T: mũi tên phải}, {pause: short}]
- test:
if: ".[contains(@notation,'northeastarrow')]"
then: [{T: mũi tên đông bắc}, {pause: short}]
- test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' southeastarrow ')]"
then: [{T: mũi tên đông nam}, {pause: short}]
- test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' southwestarrow ')]"
then: [{T: mũi tên tây nam}, {pause: short}]
- test:
if: ".[contains(@notation,'northwestarrow')]"
then: [{T: mũi tên tây bắc}, {pause: short}]
- test:
if: ".[contains(@notation,'updownarrow')]"
then: [{T: mũi tên đứng kết đôi}, {pause: short}]
- test:
if: ".[contains(@notation,'leftrightarrow')]"
then: [{T: mũi tên ngang kết đôi}, {pause: short}]
- test:
if: ".[contains(@notation,'northeastsouthwestarrow')]"
then: [{T: mũi tên chéo lên kết đôi}, {pause: short}]
- test:
if: ".[contains(@notation,'northwestsoutheastarrow')]"
then: [{T: mũi tên chéo xuống kết đôi}, {pause: short}]
- test:
if: ".[contains(@notation,'actuarial')]"
then: [{T: ký hiệu phân tích}, {pause: short}]
- test:
if: ".[contains(@notation,'madrub')]"
then: [{T: ký hiệu giai thừa ả rập}, {pause: short}]
- test:
if: ".[contains(@notation,'phasorangle')]"
then: [{T: góc phasor}, {pause: short}]
- test:
if: ".[contains(@notation,'longdiv') or not(@notation) or normalize-space(@notation) ='']" then: [{T: ký hiệu chia dài}, {pause: short}]
- test:
if: ".[contains(@notation,'radical')]"
then: [{T: căn bậc hai}, {pause: short}]
- T: bọc
- x: "*"
- test:
if: "$Impairment = 'Blindness' and ( $SpeechStyle != 'SimpleSpeak' or not(IsNode(*[1], 'leaf')) )"
then: [{T: hết bọc}]
- pause: short
- name: semantics
tag: "semantics"
match: "*[@encoding='MathML-Presentation']"
replace:
- x: "*[@encoding='MathML-Presentation']/*[1]"
- name: semantics-default
tag: "semantics"
match: .
replace:
- x: "*[1]"
- name: default-text
tag: "literal"
match: "."
replace:
- x: "translate(text(), '-_.', ' ')"
- name: default-children
tag: "*"
match: count(*)>0
replace:
- x: "translate(name(.), '-', ' ')"
- T: "của"
- pause: short
- insert:
nodes: "*"
replace: [{T: "phẩy"}, {pause: auto}]
- name: default-text
tag: "*"
match: "."
replace:
- x: "translate(name(), '-', ' ')"