README.md

Thu, 14 May 2020 17:47:11 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Thu, 14 May 2020 17:47:11 -0500
changeset 23
6ec219fa34fc
parent 21
1dc4f331d3d5
permissions
-rw-r--r--

More compact colour definitions

0
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
1 # latex-syntax
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
2
4
acf39baa1c7d More README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 3
diff changeset
3 This package provides rich LaTeX _syntax highlighting_ for VSCode. It provides
acf39baa1c7d More README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 3
diff changeset
4 _only_ syntax highlighting: no annoying snippets etc. that only serve to mess
acf39baa1c7d More README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 3
diff changeset
5 up your work. It is recommended to be combined with [texlab][]. The latter
7
fedc1fbea767 typofixes
Tuomo Valkonen <tuomov@iki.fi>
parents: 6
diff changeset
6 provides language intelligence/auto-completion and a build system interface.
4
acf39baa1c7d More README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 3
diff changeset
7 The present package complements texlab with richer syntax highlighting. The
acf39baa1c7d More README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 3
diff changeset
8 grammar is derived from LaTeX-Workshop, but has improvements including
0
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
9
5
993903fd4434 Support initial-prefixed \XYtodo.
Tuomo Valkonen <tuomov@iki.fi>
parents: 4
diff changeset
10 a) Highlighting for the `todonotes` package: `\todo` as well as custom-defined
993903fd4434 Support initial-prefixed \XYtodo.
Tuomo Valkonen <tuomov@iki.fi>
parents: 4
diff changeset
11 `\XYtodo` for author initials `X` and `Y`.
0
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
12
9
caaf16def702 README typofixes
Tuomo Valkonen <tuomov@iki.fi>
parents: 7
diff changeset
13 b) Footnote highlighting (`\footnote`, `\footnotemark`, and `\footnotetext`).
0
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
14
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
15 c) Highlighting of `comment` environments as comment blocks.
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
16
21
1dc4f331d3d5 Failed attempt at injecting token colour customisations
Tuomo Valkonen <tuomov@iki.fi>
parents: 20
diff changeset
17 ## Customising `todonotes` and `footnote` colours
0
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
18
21
1dc4f331d3d5 Failed attempt at injecting token colour customisations
Tuomo Valkonen <tuomov@iki.fi>
parents: 20
diff changeset
19 To customise syntax highlighting for `\todo` and `\footnote`, add the following
1dc4f331d3d5 Failed attempt at injecting token colour customisations
Tuomo Valkonen <tuomov@iki.fi>
parents: 20
diff changeset
20 (with possibly customised colours) to your user `settings.json`
1dc4f331d3d5 Failed attempt at injecting token colour customisations
Tuomo Valkonen <tuomov@iki.fi>
parents: 20
diff changeset
21 (Cmd+Shift+P, “Open Settings (JSON)”):
0
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
22
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
23 ```json
1
6c4986d204ac README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
24 "editor.tokenColorCustomizations": {
6c4986d204ac README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
25 "textMateRules": [
6c4986d204ac README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
26 {
20
2f22cc1afaad More compact example colour definition
Tuomo Valkonen <tuomov@iki.fi>
parents: 15
diff changeset
27 "scope": [
2f22cc1afaad More compact example colour definition
Tuomo Valkonen <tuomov@iki.fi>
parents: 15
diff changeset
28 "entity.name.todo.latex",
2f22cc1afaad More compact example colour definition
Tuomo Valkonen <tuomov@iki.fi>
parents: 15
diff changeset
29 "support.function.todo.latex",
2f22cc1afaad More compact example colour definition
Tuomo Valkonen <tuomov@iki.fi>
parents: 15
diff changeset
30 "entity.name.footnote.latex",
2f22cc1afaad More compact example colour definition
Tuomo Valkonen <tuomov@iki.fi>
parents: 15
diff changeset
31 "support.function.footnote.latex"
2f22cc1afaad More compact example colour definition
Tuomo Valkonen <tuomov@iki.fi>
parents: 15
diff changeset
32 ],
1
6c4986d204ac README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
33 "settings": {
6c4986d204ac README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
34 "foreground": "#d17000",
20
2f22cc1afaad More compact example colour definition
Tuomo Valkonen <tuomov@iki.fi>
parents: 15
diff changeset
35 "fontStyle": "italic"
1
6c4986d204ac README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
36 }
6c4986d204ac README improvements
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
37 }
20
2f22cc1afaad More compact example colour definition
Tuomo Valkonen <tuomov@iki.fi>
parents: 15
diff changeset
38 ]
2f22cc1afaad More compact example colour definition
Tuomo Valkonen <tuomov@iki.fi>
parents: 15
diff changeset
39 }
0
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
40 ```
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
41
21
1dc4f331d3d5 Failed attempt at injecting token colour customisations
Tuomo Valkonen <tuomov@iki.fi>
parents: 20
diff changeset
42 ## Initial-prefixed todo-notes
1dc4f331d3d5 Failed attempt at injecting token colour customisations
Tuomo Valkonen <tuomov@iki.fi>
parents: 20
diff changeset
43
5
993903fd4434 Support initial-prefixed \XYtodo.
Tuomo Valkonen <tuomov@iki.fi>
parents: 4
diff changeset
44 Initial-prefixed `\XYtodo` custom todonotes commands are also supported.
993903fd4434 Support initial-prefixed \XYtodo.
Tuomo Valkonen <tuomov@iki.fi>
parents: 4
diff changeset
45 For example, `\lstodo{a latex-syntax todo}` will be highlighted if you do
993903fd4434 Support initial-prefixed \XYtodo.
Tuomo Valkonen <tuomov@iki.fi>
parents: 4
diff changeset
46 the above colour customisations and in your LaTeX source define
993903fd4434 Support initial-prefixed \XYtodo.
Tuomo Valkonen <tuomov@iki.fi>
parents: 4
diff changeset
47 ```tex
7
fedc1fbea767 typofixes
Tuomo Valkonen <tuomov@iki.fi>
parents: 6
diff changeset
48 \newcommand{\lstodo}[2][]{\todo[color=DarkRed!40,#1]{#2}}
5
993903fd4434 Support initial-prefixed \XYtodo.
Tuomo Valkonen <tuomov@iki.fi>
parents: 4
diff changeset
49 ```
993903fd4434 Support initial-prefixed \XYtodo.
Tuomo Valkonen <tuomov@iki.fi>
parents: 4
diff changeset
50 (The colour setting here only affects LaTeX output, not VSCode.)
993903fd4434 Support initial-prefixed \XYtodo.
Tuomo Valkonen <tuomov@iki.fi>
parents: 4
diff changeset
51
0
aa9fc390ce91 Initial version.
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
52 [texlab]: https://marketplace.visualstudio.com/items?itemName=efoerster.texlab

mercurial