The following macros have dedicated but homogeneous highlighting:
\\, \newpage, \clearpage, \pagebreak, \lineabreak, \pause.
Thanks @bnord01 for the suggestion.
Related to #668.
We need to make sure that rules for matching macros do not take
precedence over the begin/end one. Otherwise, \begin is considered as a
macro.
This closes#652.
Since commit c10ca0c, we have stopped capturing {...}. This has a side
effect of mistakenly detecting the end of argument in constructions like
\section{title \LaTeX{} some text \LaTeX{}}
To fix this, we only capture braces inside macro arguments, when the
argument itself is captured.
This solves #595.
To avoid troubles with constructions like
\newenvironment{mathenv}{$}{$}
we stop capturing {...} groups. It does not change anything visually as
it was set to a meta scope calling the whole syntax file again but it
solves many issues with elaborated constructs.
This closes#574
Originally, math stuff was highlighted as string.other.math, which
somehow tells vscode that maths are considered as strings.
A consequence of that is that highlighting matching parentheses does not
work inside math blocks.
See https://github.com/Microsoft/vscode/issues/45890