Tue, 12 May 2020 18:17:39 -0500
More README improvements
0 | 1 | # latex-syntax |
2 | ||
4 | 3 | This package provides rich LaTeX _syntax highlighting_ for VSCode. It provides |
4 | _only_ syntax highlighting: no annoying snippets etc. that only serve to mess | |
5 | up your work. It is recommended to be combined with [texlab][]. The latter | |
6 | provides a language intelligence/auto-completion and build system interface. | |
7 | The present package complements texlab with richer syntax highlighting. The | |
8 | grammar is derived from LaTeX-Workshop, but has improvements including | |
0 | 9 | |
10 | a) Highlighting of `todonotes` (see below). | |
11 | ||
12 | b) Footnote highlighting. | |
13 | ||
14 | c) Highlighting of `comment` environments as comment blocks. | |
15 | ||
16 | ### How to enable | |
17 | ||
18 | This package does not override the standard “LaTeX” grammar. It provides the | |
19 | “LaTeX+” grammar. Please select that as the default grammar for `.tex` files. | |
20 | ||
21 | ### Regarding `todonotes` and `footnote` support | |
22 | ||
23 | To enable syntax highlighting for `\todo` and `\footnote`, add the following | |
1 | 24 | (with possibly customised colours) to your user `settings.json` |
25 | (Cmd+Shift+P, “Open Settings (JSON)”): | |
0 | 26 | |
27 | ```json | |
1 | 28 | "editor.tokenColorCustomizations": { |
29 | "textMateRules": [ | |
30 | { | |
31 | "scope": "entity.name.todo.latex", | |
32 | "settings": { | |
33 | "foreground": "#d17000", | |
34 | "fontStyle": "italic", | |
35 | } | |
36 | }, | |
37 | { | |
38 | "scope": "support.function.todo.latex", | |
39 | "settings": { | |
40 | "foreground": "#d17000", | |
41 | "fontStyle": "italic", | |
0 | 42 | } |
1 | 43 | }, |
44 | { | |
45 | "scope": "entity.name.footnote.latex", | |
46 | "settings": { | |
47 | "foreground": "#e28000", | |
48 | "fontStyle": "italic", | |
49 | } | |
50 | }, | |
51 | { | |
52 | "scope": "support.function.footnote.latex", | |
53 | "settings": { | |
54 | "foreground": "#e28000", | |
55 | "fontStyle": "italic", | |
56 | } | |
57 | } | |
58 | ], | |
59 | }, | |
0 | 60 | ``` |
61 | ||
62 | [texlab]: https://marketplace.visualstudio.com/items?itemName=efoerster.texlab |