---

- name: laplacian
  tag: laplacian
  match: "count(*) <= 1"   # can be on ∇^2 or on enclosing mrow
  replace:
  - T: "Laplace-Operator"      # phrase('laplacian' of x)
  - test:
      if: "count(*) = 1"
      then:
      - test:
          if: "$Verbosity!='Terse'"
          then: [T: "von"]             # phrase(function 'of' one variable)
      - test:
          if: "not(IsNode(*[1], 'leaf'))"
          then: [pause: short]
      - x: "*[1]"


- name: divergence
  tag: divergence
  match: "."
  replace:
  - test:
      if: "$Verbosity='Verbose'"
      then: [t: "divergenz"]      # phrase('divergence' from the mean)
      else: [t: "div"]      # phrase('divergence' from the mean)
  - t: "von"      # phrase(systems 'of' linear equations)
  - test:
      if: "not(IsNode(*[1], 'leaf'))"
      then: [pause: short]
  - x: "*[1]"

- name: curl
  tag: curl
  match: "count(*) = 1"
  replace:
  - T: "Rotation"      # phrase(die 'Rotation' eines Feldes)
  - test:
      if: "$Verbosity!='Terse'"
      then: [T: "von"]
  - test:
      if: "not(IsNode(*[1], 'leaf'))"
      then: [pause: short]
  - x: "*[1]"

- name: gradient
  tag: gradient
  match: "."
  replace:
  - test:
      if: "$Verbosity!='Terse'"
      then: [t: "gradient von"]      # phrase('divergence' from the mean)
      else: [t: "grad"]      # phrase('divergence' from the mean)
  - test:
      if: "not(IsNode(*[1], 'leaf'))"
      then: [pause: short]
  - x: "*[1]"
