|
1 # latex-syntax |
|
2 |
|
3 This package provides syntax highlighting for LaTeX to VSCode. It is intended |
|
4 to be used as together with [texlab][] to provide richer syntax highlighting. |
|
5 The grammar is derived from LaTeX-Workshop, but has improvements including |
|
6 |
|
7 a) Highlighting of `todonotes` (see below). |
|
8 |
|
9 b) Footnote highlighting. |
|
10 |
|
11 c) Highlighting of `comment` environments as comment blocks. |
|
12 |
|
13 ### How to enable |
|
14 |
|
15 This package does not override the standard “LaTeX” grammar. It provides the |
|
16 “LaTeX+” grammar. Please select that as the default grammar for `.tex` files. |
|
17 |
|
18 ### Regarding `todonotes` and `footnote` support |
|
19 |
|
20 To enable syntax highlighting for `\todo` and `\footnote`, add the following |
|
21 to your `settings.json` (Cmd+Shift+P, “Open Settings (JSON)”): |
|
22 |
|
23 ```json |
|
24 |
|
25 "editor.tokenColorCustomizations": { |
|
26 "textMateRules": [ |
|
27 { |
|
28 "scope": "entity.name.todo.latex", |
|
29 "settings": { |
|
30 "foreground": "#d17000", |
|
31 "fontStyle": "italic", |
|
32 } |
|
33 }, |
|
34 { |
|
35 "scope": "support.function.todo.latex", |
|
36 "settings": { |
|
37 "foreground": "#d17000", |
|
38 "fontStyle": "italic", |
|
39 } |
|
40 }, |
|
41 { |
|
42 "scope": "entity.name.footnote.latex", |
|
43 "settings": { |
|
44 "foreground": "#e28000", |
|
45 "fontStyle": "italic", |
|
46 } |
|
47 }, |
|
48 { |
|
49 "scope": "support.function.footnote.latex", |
|
50 "settings": { |
|
51 "foreground": "#e28000", |
|
52 "fontStyle": "italic", |
|
53 } |
|
54 } |
|
55 ], |
|
56 }, |
|
57 ``` |
|
58 |
|
59 [texlab]: https://marketplace.visualstudio.com/items?itemName=efoerster.texlab |