Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shenlebantongying/rime_latex
Rime Latex 数学符号输入方案 | Typing LaTeX symbols everywhere.
https://github.com/shenlebantongying/rime_latex
latex rime rime-schema
Last synced: 23 days ago
JSON representation
Rime Latex 数学符号输入方案 | Typing LaTeX symbols everywhere.
- Host: GitHub
- URL: https://github.com/shenlebantongying/rime_latex
- Owner: shenlebantongying
- License: gpl-3.0
- Created: 2020-10-08T07:50:09.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-03T20:21:04.000Z (10 months ago)
- Last Synced: 2024-11-06T13:39:05.929Z (about 1 month ago)
- Topics: latex, rime, rime-schema
- Language: Python
- Homepage:
- Size: 97.7 KB
- Stars: 71
- Watchers: 4
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rime - slbtty/rime_latex - LaTeX Symbols (Complete) | 所有 LaTeX 符號的輸入方案 (其他)
README
# RIME_LaTeX
Typing LaTeX math symbols in RIME.
Press `\` key then input latex symbol's name: `\lambda` will automatically become `λ`.
## Use as standalone input method
Copy the `latex.dict.yaml` and `latex.schema.yaml` to rime's config folder.
Add those lines to `default.custom.yaml`
```
patch:
schema_list:
- schema: latex
```## Use with other schemas
For instance, to use with 朙月拼音(简化字), in `luna_pinyin.custom.yaml` (`luna_pinyin_simp.custom.yaml`)
```yaml
patch:
# type '\' will pull in English punctuation, so need to switch to Chinese punctuation
switches/+:
- name: ascii_punct #
states: [ ¥, $ ]
reset: 0
# make '\' go into the candidate box
speller/alphabet: zyxwvutsrqponmlkjihgfedcba\\
# or customize punctuator to make '\' go into the candidate box like below(please uncomment yourself)
# punctuator/half_shape:
# "\\": ["\\"]
# punctuator/full_shape:
# "\\": ["、", "\"]engine/+:
translators/+:
- table_translator@latex_input# meaning of the regex: ^ (start of line), \\(the starting \), .+(any char 1 or more time), $(end)
# first '\\' is recognized as a symbol(half_shape or full_shape). double '\\' make it to be recognized as a pattern
# translator's prefix will consume one '\\'. so user only type once '\' key, only recognize uppercase and lowercase letters, so you can use the number keys to select words.
"recognizer/patterns/latex_input": "^\\\\[a-zA-Z]+$"
schema/dependencies/+:
- latex
latex_input:
tag: latex_input
dictionary: latex
prefix: "\\"
enable_sentence: false
enable_completion: true # enable autocomplete
enable_user_dict: true # enable word frequency, use with user_dict
user_dict: custom_latex_user # generate a file name custom_latex_user.txt
db_class: tabledb
tips: "[LaTeX]"
```Note: due to the complexity of mixing rime schemas, you may need extra efforts to mix RIME_LaTeX with arbitrary other schema.
rime schema's reference:
## RIME_LaTeX's extension to tex symbols
### superscript/subscript
```
\^1 \_1 -> X₁¹
\^a \_b -> Xᵃᵦ
```> [Unicode doesn't have a full set of super/sub scripts, you probably should use text styles or markup in rich text, instead.](https://www.unicode.org/faq/ligature_digraph.html#Pf8)
### Degree
```
° \degree
```
### MISC
```
→ \to
⇒ \To
⇛ \TO
```## Credits
The latex math symbols table sources:
## HELP WANTED
* Check if all Unicode math symbols are included.
+ Complete Latex Symbols:
+ Unicode+ Fuzzy match how??