---

- name: laplacian
  tag: laplacian
  match: "count(*) <= 1"   # can be on ∇^2 or on enclosing mrow
  replace:
  - t: "лапласиан"      # phrase('laplacian' of x)  -- "LahPlahsian" sounds better with speech engines tested
  - test:
      if: "count(*) = 1"
      then:
      - test:
          if: "$Verbosity!='Terse'"
          then: [t: "от"]             # phrase(function 'of' one variable) -- note OneCore voices spell out "div"
      - test:
          if: "not(IsNode(*[1], 'leaf'))"
          then: [pause: short]
      - x: "*[1]"

- name: divergence
  tag: divergence
  match: "count(*) = 1"
  replace:
  - test:
      if: "$Verbosity='Terse'"
      then: [t: "див"]             # phrase('div' is short for divergence)
      else: [t: "дивергенция"]      # phrase('divergence of' this function from the mean)
  - test:
      if: "$Verbosity!='Terse' and *[1][self::m:mi[contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', text())]]"
      then: [t: "заглавной"]
  - test:
      if: "not(IsNode(*[1], 'leaf'))"
      then: [pause: short]
  - test:
      if: "$Verbosity!='Terse' and *[1][self::m:mi[contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', text())]]"
      then: [x: "translate(*[1], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"]
      else: [x: "*[1]"]

- name: curl
  tag: curl
  match: "count(*) = 1"
  replace:
  - t: "ротор"      # phrase(the 'curl of' a field)
  - test:
      if: "$Verbosity!='Terse' and *[1][self::m:mi[contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', text())]]"
      then: [t: "заглавной"]
  - test:
      if: "not(IsNode(*[1], 'leaf'))"
      then: [pause: short]
  - test:
      if: "$Verbosity!='Terse' and *[1][self::m:mi[contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', text())]]"
      then: [x: "translate(*[1], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"]
      else: [x: "*[1]"]

- name: gradient
  tag: gradient
  match: "count(*) = 1"
  replace:
  - test:
      if: "$Verbosity!='Terse'"
      then: [t: "градиент"]      # phrase(the hill has a 'gradient of' five percent)
      else: [t: "набла"]      # phrase(the delete key is labeled 'del')
  - test:
      if: "$Verbosity!='Terse' and *[1][self::m:mi[contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', text())]]"
      then: [t: "заглавной"]
  - test:
      if: "not(IsNode(*[1], 'leaf'))"
      then: [pause: short]
  - test:
      if: "$Verbosity!='Terse' and *[1][self::m:mi[contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ', text())]]"
      then: [x: "translate(*[1], 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"]
      else: [x: "*[1]"]
