]> code.delx.au - gnu-emacs-elpa/blob - packages/company-math/readme.md
multishell - a bit more for 1.1.2, including missed change log entries.
[gnu-emacs-elpa] / packages / company-math / readme.md
1 This add-on defines three *[company-mode](http://company-mode.github.io/)* backends:
2
3 * `company-math-symbols-latex` - math latex tags (_by default, active only on latex math faces_)
4
5 ![symbols](https://raw.github.com/vspinu/company-math/master/img/latex-symbols.png)
6
7 * `company-math-symbols-unicode` - unicode symbols (_by default, active everywhere except math faces_)
8
9 ![math](https://raw.github.com/vspinu/company-math/master/img/unicode-symbols.png)
10
11 * `company-latex-commands` - latex commands
12
13 ## Usage ##
14
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.
18
19 ## Activation ##
20
21 Install from [MELPA](http://melpa.milkbox.net/) repository.
22
23 You can either register each backend globally:
24
25
26 ```lisp
27
28 ;; global activation of the unicode symbol completion
29 (add-to-list 'company-backends 'company-math-symbols-unicode)
30
31
32 ```
33
34 or locally per emacs mode:
35
36
37 ```lisp
38
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)
43 company-backends)))
44
45 (add-hook 'TeX-mode-hook 'my-latex-mode-setup)
46
47 ```
48
49 ## Customization ##
50
51 Set `company-tooltip-align-annotations` to t in order to allin symbols to the
52 right as in the above previews.
53
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`.
62