1 # latex-syntax |
1 # latex-syntax |
2 |
2 |
3 This package provides rich LaTeX _syntax highlighting_ for VSCode. It provides |
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 |
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 |
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. |
6 provides language intelligence/auto-completion and a build system interface. |
7 The present package complements texlab with richer syntax highlighting. The |
7 The present package complements texlab with richer syntax highlighting. The |
8 grammar is derived from LaTeX-Workshop, but has improvements including |
8 grammar is derived from LaTeX-Workshop, but has improvements including |
9 |
9 |
10 a) Highlighting for the `todonotes` package: `\todo` as well as custom-defined |
10 a) Highlighting for the `todonotes` package: `\todo` as well as custom-defined |
11 `\XYtodo` for author initials `X` and `Y`. |
11 `\XYtodo` for author initials `X` and `Y`. |
65 |
65 |
66 Initial-prefixed `\XYtodo` custom todonotes commands are also supported. |
66 Initial-prefixed `\XYtodo` custom todonotes commands are also supported. |
67 For example, `\lstodo{a latex-syntax todo}` will be highlighted if you do |
67 For example, `\lstodo{a latex-syntax todo}` will be highlighted if you do |
68 the above colour customisations and in your LaTeX source define |
68 the above colour customisations and in your LaTeX source define |
69 ```tex |
69 ```tex |
70 \newcommand{\abtodo}[2][]{\todo[color=DarkRed!40,#1]{#2}} |
70 \newcommand{\lstodo}[2][]{\todo[color=DarkRed!40,#1]{#2}} |
71 ``` |
71 ``` |
72 (The colour setting here only affects LaTeX output, not VSCode.) |
72 (The colour setting here only affects LaTeX output, not VSCode.) |
73 |
73 |
74 [texlab]: https://marketplace.visualstudio.com/items?itemName=efoerster.texlab |
74 [texlab]: https://marketplace.visualstudio.com/items?itemName=efoerster.texlab |