https://github.com/astoff/unicode-math-input.el
Insert Unicode math symbols in Emacs
https://github.com/astoff/unicode-math-input.el
Last synced: 7 months ago
JSON representation
Insert Unicode math symbols in Emacs
- Host: GitHub
- URL: https://github.com/astoff/unicode-math-input.el
- Owner: astoff
- Created: 2018-12-09T11:52:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-02T12:31:09.000Z (over 4 years ago)
- Last Synced: 2024-08-05T06:04:26.687Z (almost 2 years ago)
- Language: Emacs Lisp
- Size: 84 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
#+title: unicode-math-input.el
#+html:
This Emacs package provides two methods to insert mathematical symbols:
- A proper input method for efficient typing. Activate with =C-u C-\
unicode-math RET=. Then TeX commands (e.g., =\alpha=) are replaced
automatically as you type with the corresponding Unicode character.
- An interactive command, =unicode-math-input=, which reads the TeX
name of a symbol with completion and inserts the corresponding
Unicode character.
- A completion-at-point backend. This behaves differently in that it
allows you to complete the /name/ of a symbol rather than insert the
symbol itself. To use it, add
#+begin_src emacs-lisp
(add-hook 'completion-at-point-functions 'unicode-math-input)
#+end_src
to your init file or a mode hook, as desired.
In either case, [[http://mirrors.ctan.org/macros/unicodetex/latex/unicode-math/unimath-symbols.pdf][all symbols]] provided by the unicode-math LaTeX package
are available, with the same names.
The =unicode-math= input method is similar to Emacs's built-in =TeX=,
but it differs in a couple of ways. First, it has a much larger
collection of characters, including various alphabets (Fraktur,
calligraphic, etc.) and combining accents (note you have to type, say,
=\pi\hat= to get π̂). Second, it does not include any sequence not
starting with a backslash, so it interferes less with normal typing.
The input method is customizable; see =M-x customize-group RET
unicode-math-input RET= for details (but note that, by the nature of
input methods, any options must be set /before/ loading the package).
Of particular note is the possibility to define some additional
symbols by setting the variable =unicode-math-input-extra-symbols=.
Here is an example:
#+begin_src emacs-lisp
(setq unicode-math-input-extra-symbols
'(("frowny" . #x01F641) ; hex syntax...
("smiley" . ?🙂))) ; or character syntax
#+end_src