PythonNut / quark-emacs

:rocket: An incredible wonderland of code
MIT License
137 stars 6 forks source link

Make a better "TeX" input method #140

Closed PythonNut closed 3 years ago

PythonNut commented 3 years ago

Some resources that will help along the way:

(require 'math-symbol-lists)
(quail-define-package "math" "UTF-8" "Ω" t)
(quail-define-rules ; add whatever extra rules you want to define here...
 ("\\from"    #X2190)
 ("\\to"      #X2192)
 ("\\lhd"     #X22B2)
 ("\\rhd"     #X22B3)
 ("^\\alpha" ?ᵅ)
 ("\\unlhd"   #X22B4)
 ("\\unrhd"   #X22B5))
(mapc (lambda (x)
        (if (cddr x)
            (quail-defrule (cadr x) (car (cddr x)))))
      (nreverse (append math-symbol-list-superscripts
                        math-symbol-list-subscripts
                        math-symbol-list-packages
                        math-symbol-list-extended
                        math-symbol-list-basic)))