Commit Graph

20 Commits

Author SHA1 Message Date
Takashi Tamura
9acb0cc93f ditto 2018-09-25 21:56:06 +09:00
Takashi Tamura
f20e598394 highlight $\{\}$ properly. 2018-09-25 15:48:40 +09:00
Jerome Lelong
71027a4516
Merge pull request #821 from tamuratak/fix_underscore
Do not include underscore in command name
2018-09-25 08:09:53 +02:00
Takashi Tamura
6edaa423ef use lookahead regexp to make underscore not to be included in constant.character.math.tex. 2018-09-25 08:36:12 +09:00
Jerome Lelong
8cc7d68a22 Fix #819: associate .ltx with TeX filetype 2018-09-24 21:36:22 +02:00
Takashi Tamura
5b943e473c make plist files well-formed in XML. 2018-09-24 06:59:04 +02:00
Jerome Lelong
41b3418ce1 Fix #803. Use dedicated scopes for curly/round brackets
The scopes are
- punctuation.math.begin.bracket.curly
- punctuation.math.end.bracket.curly
- punctuation.math.begin.bracket.round
- punctuation.math.end.bracket.round
2018-09-18 09:56:30 +02:00
Jerome Lelong
4a45f3fd92 Use a specific highlighting for layout macros
The following macros have dedicated but homogeneous highlighting:
\\, \newpage, \clearpage, \pagebreak, \lineabreak, \pause.
Thanks @bnord01 for the suggestion.

Related to #668.
2018-06-16 14:26:18 +02:00
Jerome Lelong
9d3faeda77 Add '(){}[].,' to macro boundaries.
This fixes highlighting of \{ or \} in math mode when followed by any of
the above characters.

Related to #668.
2018-06-16 14:18:01 +02:00
Jerome Lelong
ba3abd31e8 Fix math keyword highlighting followed by '_'
We add '_' as a world delimiter as '\b' does not match '_'.

Related to #668.
2018-06-16 14:17:46 +02:00
Jerome Lelong
679f24da59 Fix nested maths environment highlighting
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.
2018-06-03 06:38:33 +02:00
Jerome Lelong
0be87bf2fe Merge $...$ and $$...$$ cases in tex syntax 2018-05-10 14:17:43 +02:00
Jerome Lelong
e1ee3e4653 Fix nested { } constructions 2018-05-08 19:18:33 +02:00
Jerome Lelong
ddb63892a9 Handle nested {...} in macro arguments
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.
2018-05-08 16:59:12 +02:00
Jerome Lelong
d80f144537 Remove commented sections in TeX syntax 2018-04-27 11:30:13 +02:00
Jerome Lelong
c10ca0cf57 Do not capture {...} groups
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
2018-04-25 16:49:01 +02:00
Jerome Lelong
0a0d852ae3 Fix highlighting of {\{...\}} blocks
Make sure the right paren in \} does not match the first opening {.
This closes #515
2018-04-07 14:54:08 +02:00
Jerome Lelong
611bf18b76 Fix inconsistent highlighting of math content 2018-03-21 07:16:16 +01:00
Jerome Lelong
1eb5bad809 Highlight maths as support.class.math
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
2018-03-17 15:46:34 +01:00
James-Yu
f1c8e68429 Rearrange syntax files 2017-03-26 10:05:22 +08:00