1 This add-on defines three *[company-mode](http://company-mode.github.io/)* backends:
3 * `company-math-symbols-latex` - math latex tags (_by default, active only on latex math faces_)
5 ![symbols](https://raw.github.com/vspinu/company-math/master/img/latex-symbols.png)
7 * `company-math-symbols-unicode` - unicode symbols (_by default, active everywhere except math faces_)
9 ![math](https://raw.github.com/vspinu/company-math/master/img/unicode-symbols.png)
11 * `company-latex-commands` - latex commands
15 Start math completion by typing the prefix <kbd>`\`</kbd> key. To select the
16 completion type <kbd>RET</kbd>. Depending on the context and your configuration
17 unicode symbol or latex tag will be inserted.
21 Install from [MELPA](http://melpa.milkbox.net/) repository.
23 You can either register each backend globally:
28 ;; global activation of the unicode symbol completion
29 (add-to-list 'company-backends 'company-math-symbols-unicode)
34 or locally per emacs mode:
39 ;; local configuration for TeX modes
40 (defun my-latex-mode-setup ()
41 (setq-local company-backends
42 (append '(company-math-symbols-latex company-latex-commands)
45 (add-hook 'TeX-mode-hook 'my-latex-mode-setup)
51 Set `company-tooltip-align-annotations` to t in order to allin symbols to the
52 right as in the above previews.
54 By default unicode symbols backend (`company-math-symbols-unicode`) is not
55 active in latex math environments and latex math symbols
56 (`company-math-symbols-latex`) is not available outside of math latex
57 environmnts. You can use the following variables to adjust this behavior to your
58 liking: `company-math-disallow-unicode-symbols-in-faces`,
59 `company-math-allow-unicode-symbols-in-faces`,
60 `company-math-disallow-latex-symbols-in-faces`,
61 `company-math-allow-latex-symbols-in-faces`.