README.md

Mon, 11 May 2020 17:50:17 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Mon, 11 May 2020 17:50:17 -0500
changeset 0
aa9fc390ce91
child 1
6c4986d204ac
permissions
-rw-r--r--

Initial version.

# latex-syntax

This package provides syntax highlighting for LaTeX to VSCode. It is intended
to be used as together with [texlab][] to provide richer syntax highlighting.
The grammar is derived from LaTeX-Workshop, but has improvements including

  a) Highlighting of `todonotes` (see below).

  b) Footnote highlighting.

  c) Highlighting of `comment` environments as comment blocks.

### How to enable

This package does not override the standard “LaTeX” grammar. It provides the
“LaTeX+” grammar. Please select that as the default grammar for `.tex` files.

### Regarding `todonotes` and `footnote` support

To enable syntax highlighting for `\todo` and `\footnote`, add the following
to your `settings.json` (Cmd+Shift+P, “Open Settings (JSON)”):

```json

    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "entity.name.todo.latex",
                "settings": {
                    "foreground": "#d17000",
                    "fontStyle": "italic",
                }
            },
            {
                "scope": "support.function.todo.latex",
                "settings": {
                    "foreground": "#d17000",
                    "fontStyle": "italic",
                }
            },
            {
                "scope": "entity.name.footnote.latex",
                "settings": {
                    "foreground": "#e28000",
                    "fontStyle": "italic",
                }
            },
            {
                "scope": "support.function.footnote.latex",
                "settings": {
                    "foreground": "#e28000",
                    "fontStyle": "italic",
                }
            }
        ],
    },
```

  [texlab]: https://marketplace.visualstudio.com/items?itemName=efoerster.texlab

mercurial