---
- 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)"
- ClearSpeak_Matrix: "IFTHENELSE($Verbosity='Verbose' and $ClearSpeak_Matrix='Auto', 'EndMatrix', $ClearSpeak_Matrix)"
- IsColumnSilent: false()
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: mn
match: "."
replace:
- bookmark: "@id"
- x: "translate(., $BlockSeparators, '')"
- name: default
tag: [mo, mtext]
match: "."
replace:
- bookmark: "@id"
- x: "text()"
- name: default
tag: mi
match: "."
replace:
- bookmark: "@id"
- test:
if: "string-length(.) = 1 and text() != '_'" then: [x: "text()"]
else: [x: "translate(., '-_', ' ')" ]
- name: default
tag: ms
match: "."
replace:
- T: "strängen" - pause: short
- x: "text()"
- name: default
tag: mstyle
match: "."
replace: [x: "*"]
- name: structure-simple
tag: mfrac
match:
- "(IsNode(*[1],'leaf') and IsNode(*[2],'leaf')) and"
- "not(ancestor::*[name() != 'mrow'][1]/self::m:fraction)" replace:
- x: "*[1]"
- T: "genom" - x: "*[2]"
- pause: short
- name: structure-default
tag: mfrac
match: "."
replace:
- T: "start" - pause: short
- x: "*[1]"
- test:
if: "not(IsNode(*[1],'leaf'))"
then: [{pause: short}]
- T: "genom" - test:
if: "not(IsNode(*[2],'leaf'))"
then: [{pause: short}]
- x: "*[2]"
- pause: short
- T: "slut division" - pause: medium
- name: structure-default
tag: msqrt
match: "."
replace:
- T: "rotsymbolen"
- test:
if: "$Verbosity!='Terse'"
then: [T: "ur"] - x: "*[1]"
- pause: short
- test:
if: "not(IsNode(*[1],'leaf'))"
then: [T: "slut rotsymbol"]
- name: structure-default
tag: mroot
match: "."
replace:
- T: "rotsymbolen"
- T: "med index" - x: "*[1]"
- pause: short
- test:
if: "$Verbosity!='Terse'"
then: [T: "ur"] - x: "*[2]"
- pause: short
- test:
if: "not(IsNode(*[2],'leaf'))"
then: [T: "slut rotsymbol"]
- name: simple-sub
tag: indexed-by
match: "count(*)=2 and $Verbosity='Terse' and *[2][self::m:mn and translate(., '.,', '')=.]"
replace:
- x: "*[1]"
- x: "*[2]"
- pause: short
- name: no-end-sub
tag: indexed-by
match: "count(*)=2 and (IsNode(*[2], 'leaf') or *[2][self::m:mrow][*[2][.='']])"
replace:
- x: "*[1]"
- test:
if: "$Verbosity!='Terse' or not(*[2][self::m:mn])" then: [T: "nedsänkt"] - x: "*[2]"
- name: structure
tag: msub
match: "."
replace:
- x: "*[1]"
- T: "nedsänkt" - x: "*[2]"
- name: structure
tag: [msup, msubsup]
match: "."
replace:
- x: "*[1]"
- test:
if: "name(.)='msubsup'"
then:
- T: "nedsänkt" - x: "*[2]"
- test:
if: "*[last()][translate(., '′″‴⁗†‡°*', '')='']"
then: [x: "*[last()]"]
else_test:
if: "ancestor-or-self::*[contains(@data-intent-property, ':structure:')]" then:
- T: "upphöjt" - x: "*[last()]"
- test:
if: "not(IsNode(*[last()], 'simple'))"
then: [T: "slut upphöjt"] else:
- T: "upphöjt till" - x: "*[last()]"
- name: default
tag: munder
match: "."
replace:
- test:
if: "not(IsNode(*[1], 'leaf'))"
then: [T: "kommenterat uttryck"] - x: "*[1]"
- pause: short
- T: "med kommentar under" - pause: short
- x: "*[2]"
- pause: short
- T: "slut kommentar"
- name: diacriticals
tag: mover
match: "*[1][self::m:mi] and *[2][translate(., '\u0306\u030c.\u00A8\u02D9\u20DB\u20DC`^~→¯_', '')='']"
replace:
- x: "*[1]"
- x: "*[2]"
- name: default
tag: mover
match: "."
replace:
- test:
if: "not(IsNode(*[1], 'leaf'))"
then: [T: "kommenterat uttryck"] - x: "*[1]"
- pause: short
- T: "med kommentar över" - pause: short
- x: "*[2]"
- pause: short
- T: "slut kommentar"
- name: default
tag: munderover
match: "."
replace:
- test:
if: "not(IsNode(*[1], 'leaf'))"
then: [T: "kommenterat uttryck"] - x: "*[1]"
- pause: short
- T: "med kommentar under" - pause: short
- x: "*[2]"
- pause: short
- T: "och kommentar över" - pause: short
- x: "*[3]"
- pause: short
- T: "slut kommentar"
- 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', 'nedsänkt', 'nedsänkt')"
- PreSuperscript: "IFTHENELSE($Verbosity='Verbose', 'upphöjt', 'upphöjt')"
replace:
- test: if: "count($Prescripts) > 2"
then:
- T: "med" - x: "count($Prescripts) div 2"
- T: "vänster index" - 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: "och"] - 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: "och"] - test:
if: "not($Prescripts[4][self::m:none])"
then:
- x: "$PreSuperscript"
- x: "$Prescripts[4]"
- test:
if: "count($Prescripts) > 4" then:
- T: "och resterande vänster index" - x: "$Prescripts[position() > 4]"
- T: "slut vänster index" - test:
if: "$Postscripts"
then:
- with:
variables:
- PostSubscript: "IFTHENELSE($Verbosity='Verbose', 'nedsänkt', 'nedsänkt')"
- PostSuperscript: "IFTHENELSE($Verbosity='Verbose', 'upphöjt', 'upphöjt')"
replace:
- test: if: "count($Postscripts) > 2"
then:
- test:
if: "$Prescripts"
then: [T: "och"] - T: "med" - x: "count($Postscripts) div 2"
- T: "höger index" - 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: "och"] - 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: "och"] - 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: "och"] - 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: "och"] - test:
if: "not($Postscripts[8][self::m:none])"
then:
- x: "$PostSuperscript"
- x: "$Postscripts[8]"
- test:
if: "count($Postscripts) > 8" then:
- T: "och resterande höger index" - x: "$Postscripts[position() > 8]"
- T: "slut index"
- name: default
tag: mtable
variables:
- IsColumnSilent: "false()"
- NumColumns: "count(*[1]/*) - IfThenElse(*/self::m:mlabeledtr, 1, 0)"
match: "."
replace:
- T: "tabell med" - x: count(*)
- test:
if: count(*)=1
then: [T: "rad"] else: [T: "rader"] - T: "och" - x: "$NumColumns"
- test:
if: "$NumColumns"
then: [T: "kolumn"] else: [T: "kolumner"] - pause: long
- x: "*"
- name: default
tag: [mtr, mlabeledtr]
match: "."
replace:
- pause: medium
- T: "rad" - x: "count(preceding-sibling::*)+1"
- test:
if: self::m:mlabeledtr
then:
- T: "med etiketten" - x: "*[1]/*"
- pause: short
- pause: medium
- test:
if: self::m:mlabeledtr
then: [{x: "*[position()>1]"}]
else: {x: "*"}
- name: default
tag: mtd
match: "."
replace:
- test:
if: "not($IsColumnSilent)"
then:
- T: "kolumn" - x: "count(preceding-sibling::*)+IfThenElse(parent::m:mlabeledtr, 0, 1)"
- pause: medium
- x: "*"
- test:
- if: count(following-sibling::*) > 0
then: {pause: short}
- else_if: count(../following-sibling::*) > 0
then: {pause: medium}
else: {pause: long}
- name: empty-box
tag: menclose
match: "@notation='box' and *[self::m:mtext and .=' ']"
replace:
- T: "tom ruta"
- name: default
tag: menclose
match: "."
replace:
- test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' box ')]"
then: [T: "box", pause: short] - test:
if: ".[contains(@notation,'roundedbox')]"
then: [T: "rundad box", pause: short] - test:
if: ".[contains(@notation,'circle')]"
then: [T: "cirkel", 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: "linje" - test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' left ')]"
then: [T: "vänster", pause: short] - test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' right ')]"
then: [T: "höger", pause: short] - test:
if: ".[contains(@notation,'top')]"
then: [T: "ovanför", pause: short] - test:
if: ".[contains(@notation,'bottom')]"
then: [T: "under", pause: short] - test:
if: ".[ contains(@notation,'updiagonalstrike') or contains(@notation,'downdiagonalstrike') or contains(@notation,'verticalstrike') or contains(@notation,'horizontalstrike') ]"
then:
- test:
if: ".[contains(@notation,'updiagonalstrike') and contains(@notation,'downdiagonalstrike')]"
then: [T: "kryss", pause: short] else:
- test:
if: ".[contains(@notation,'updiagonalstrike')]"
then: [T: "diagonal uppåt", pause: short] - test:
if: ".[contains(@notation,'downdiagonalstrike')]"
then: [T: "diagonal nedåt", pause: short] - test:
if: ".[contains(@notation,'verticalstrike')]"
then: [T: "vertikal", pause: short] - test:
if: ".[contains(@notation,'horizontalstrike')]"
then: [T: "horisontell", pause: short] - T: "överstrykning" - pause: short
- test:
if: ".[contains(@notation,'uparrow')]"
then: [T: "uppåt-pil", pause: short] - test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' downarrow ')]"
then: [T: "nedåt-pil", pause: short] - test:
if: ".[contains(@notation,'leftarrow')]"
then: [T: "vänster-pil", pause: short] - test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' rightarrow ')]"
then: [T: "höger-pil", pause: short] - test:
if: ".[contains(@notation,'northeastarrow')]"
then: [T: "nordost-pil", pause: short] - test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' southeastarrow ')]"
then: [T: "sydost-pil", pause: short] - test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' southwestarrow ')]"
then: [T: "sydväst-pil", pause: short] - test:
if: ".[contains(@notation,'northwestarrow')]"
then: [T: "nordväst-pil", pause: short] - test:
if: ".[contains(@notation,'updownarrow')]"
then: [T: "dubbelriktad vertikal pil", pause: short] - test:
if: ".[contains(@notation,'leftrightarrow')]"
then: [T: "dubbelriktad horisontell pil", pause: short] - test:
if: ".[contains(@notation,'northeastsouthwestarrow')]"
then: [T: "dubbelriktad diagonal uppåtpil", pause: short] - test:
if: ".[contains(@notation,'northwestsoutheastarrow')]"
then: [T: "dubbelriktad diagonal nedåtpil", pause: short] - test:
if: ".[contains(@notation,'actuarial')]"
then: [T: "aktuariell symbol", pause: short] - test:
if: ".[contains(@notation,'madrub')]"
then: [T: "arabisk fakultet", pause: short] - test:
if: ".[contains(@notation,'phasorangle')]"
then: [T: "fasorvinkel", pause: short] - test:
if: ".[contains(@notation,'longdiv') or not(@notation) or normalize-space(@notation) ='']" then: [T: "lång division", pause: short] - test:
if: ".[contains(@notation,'radical')]"
then: [T: "kvadratrot", pause: short] - T: "omsluter" - test:
if: "*[self::m:mtext and .=' ']"
then: [T: "blanksteg"] else: [x: "*"]
- test:
if: "$Impairment = 'Blindness' and ( $SpeechStyle != 'SimpleSpeak' or not(IsNode(*[1], 'leaf')) )"
then: [pause: short, T: "slut omslutning"] - 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: apply-function
tag: "apply-function"
match: .
replace:
- x: "*[1]"
- T: "av"
- pause: auto
- x: "*[position() > 1]"
- name: silent-intent
tag: "*"
match: "count(*)>0 and contains(@data-intent-property, ':silent:')"
replace:
- x: "*"
- test:
if: "IsNode(., '2D')"
then: [pause: short]
else: [pause: auto]
- name: prefix-intent
tag: "*"
match: "count(*)>0 and contains(@data-intent-property, ':prefix:')"
replace:
- x: "SpeakIntentName(name(.), $Verbosity, 'prefix')"
- x: "*"
- test:
if: "not( IsBracketed(., '', '') or IsNode(*[last()], 'simple') )"
then: [x: "GetBracketingIntentName(name(.), $Verbosity, 'prefix', 'end')"]
- test:
if: "IsNode(., '2D')"
then: [pause: short]
else: [pause: auto]
- name: postfix-intent
tag: "*"
match: "count(*)>0 and contains(@data-intent-property, ':postfix:')"
replace:
- test:
if: "$Impairment = 'Blindness' and not( IsBracketed(., '', '') or IsNode(*[1], 'simple') )"
then: [x: "GetBracketingIntentName(name(.), $Verbosity, 'postfix', 'start')"]
- x: "*"
- x: "SpeakIntentName(name(.), $Verbosity, 'postfix')"
- name: infix-intent
tag: "*"
match: "count(*)>0 and contains(@data-intent-property, ':infix:')"
replace:
- test:
if: "$Impairment = 'Blindness' and not( IsBracketed(., '', '') or IsNode(*[1], 'simple') )"
then: [x: "GetBracketingIntentName(name(.), $Verbosity, 'infix', 'start')"]
- test:
if: "count(*) = 1" then:
- x: "SpeakIntentName(name(.), $Verbosity, 'infix')"
- pause: auto
- x: "*[1]"
else:
- insert:
nodes: "*"
replace: [x: "SpeakIntentName(name(.), $Verbosity, 'infix')", pause: auto]
- test:
if: "$Impairment = 'Blindness' and not( IsBracketed(., '', '') or IsNode(*[last()], 'simple') )"
then: [x: "GetBracketingIntentName(name(.), $Verbosity, 'infix', 'end')"]
- test:
if: "IsNode(., '2D')" then: [pause: short]
else: [pause: auto]
- name: function-intent
tag: "*"
match: "count(*)>0"
replace:
- x: "SpeakIntentName(name(.), $Verbosity, 'function')"
- test:
if: "not(contains(@data-intent-property, ':literal:')) and
not(count(*)=2 and (IsInDefinition(*[1], 'TrigFunctionNames') or IsInDefinition(name(.), 'TerseFunctionNames')) and IsNode(*[2], 'simple'))"
then: [T: "av", pause: auto] - insert:
nodes: "*"
replace: [T: "", pause: short]
- test:
if: "$Impairment = 'Blindness' and not(*[last()][IsBracketed(., '', '') or IsNode(., 'simple')] )"
then: [x: "GetBracketingIntentName(name(.), $Verbosity, 'function', 'end')"]
- test:
if: "IsNode(., '2D')"
then: [pause: short]
else: [pause: auto]
- name: default-text
tag: "*"
match: "."
replace:
- x: "translate(name(), '-_', ' ')"