wklchris / Rime-latex-symbols

用于 RIME 输入法引擎的一个 LaTeX 风格的数学符号输入配置文件 | A LaTeX-style math symbol YAML configuration file for input engine RIME.
GNU General Public License v3.0
11 stars 1 forks source link

patch的方式 #2

Closed ITCJ closed 2 weeks ago

ITCJ commented 2 weeks ago

我在 double_pinyin_flypy.schema.yaml 尝试使用

patch:
  punctuator/import_preset: latexmath
  recognizer/patterns:
    punct: "^/([0-9]0?|[A-Za-z]+)$"

无效,随后直接在punctuator的最后添加import_preset: latexmath后生效

punctuator:
  import_preset: symbols
  # 定义部分半角字符
  half_shape:
      "#": "#"
      "*": "*"
      '.' : { commit: 。 }
      "`": "`"
      "~": "~"
      "@": "@"
      "=": "="
      "/": ["/", "÷",]
      '\': "、"
      "_" : "──"
      "'": {pair: ["「", "」"]}
      "[": ["【", "["]
      "]": ["】", "]"]
      "$": ["¥", "$", "€", "£", "¢", "¤"]
      "<": ["《", "〈", "«", "<"]
      ">": ["》", "〉", "»", ">"]
  import_preset: latexmath

请问这是啥原因

wklchris commented 2 weeks ago

不清楚原因。把 import_preset 值写在 punctuator 之下的末尾,与把该值写在 patch 之下的 punctuator/import_preset 项中,这两种语法应当是没有区别的。

顺便,不建议直接在 scheme 文件上修改,而是新建一个 double_pinyin_flypy.custom.yaml 文件来修改。