README.md

changeset 21
1dc4f331d3d5
parent 20
2f22cc1afaad
equal deleted inserted replaced
20:2f22cc1afaad 21:1dc4f331d3d5
12 12
13 b) Footnote highlighting (`\footnote`, `\footnotemark`, and `\footnotetext`). 13 b) Footnote highlighting (`\footnote`, `\footnotemark`, and `\footnotetext`).
14 14
15 c) Highlighting of `comment` environments as comment blocks. 15 c) Highlighting of `comment` environments as comment blocks.
16 16
17 The highlighting of todo-notes and footnotes has to be specifically configured: 17 ## Customising `todonotes` and `footnote` colours
18 see below.
19 18
20 ### Regarding `todonotes` and `footnote` support 19 To customise syntax highlighting for `\todo` and `\footnote`, add the following
21 20 (with possibly customised colours) to your user `settings.json`
22 Unfortunately, VSCode does not appear to let extensions contribute token colours 21 (Cmd+Shift+P, “Open Settings (JSON)”):
23 for syntax highlighting. Therefore, to enable syntax highlighting for `\todo` and
24 `\footnote`, add the following (with possibly customised colours) to your user
25 `settings.json` (Cmd+Shift+P, “Open Settings (JSON)”):
26 22
27 ```json 23 ```json
28 "editor.tokenColorCustomizations": { 24 "editor.tokenColorCustomizations": {
29 "textMateRules": [ 25 "textMateRules": [
30 { 26 {
41 } 37 }
42 ] 38 ]
43 } 39 }
44 ``` 40 ```
45 41
42 ## Initial-prefixed todo-notes
43
46 Initial-prefixed `\XYtodo` custom todonotes commands are also supported. 44 Initial-prefixed `\XYtodo` custom todonotes commands are also supported.
47 For example, `\lstodo{a latex-syntax todo}` will be highlighted if you do 45 For example, `\lstodo{a latex-syntax todo}` will be highlighted if you do
48 the above colour customisations and in your LaTeX source define 46 the above colour customisations and in your LaTeX source define
49 ```tex 47 ```tex
50 \newcommand{\lstodo}[2][]{\todo[color=DarkRed!40,#1]{#2}} 48 \newcommand{\lstodo}[2][]{\todo[color=DarkRed!40,#1]{#2}}

mercurial