Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/markdown-math/syntaxes/md-math.tmLanguage.json
3291 views
1
{
2
"information_for_contributors": [
3
"This file includes some grammar rules copied from https://github.com/James-Yu/LaTeX-Workshop/blob/master/syntax/TeX.tmLanguage.json"
4
],
5
"name": "Markdown Math",
6
"scopeName": "text.html.markdown.math",
7
"patterns": [
8
{
9
"include": "#math"
10
}
11
],
12
"repository": {
13
"math": {
14
"patterns": [
15
{
16
"name": "comment.line.math.tex",
17
"match": "((?<!\\\\)%)(.+)$",
18
"captures": {
19
"1": {
20
"name": "punctuation.definition.comment.math.tex"
21
}
22
}
23
},
24
{
25
"name": "line.separator.math.tex",
26
"match": "(\\\\\\\\)$",
27
"captures": {
28
"1": {
29
"name": "punctuation.line.separator.math.tex"
30
}
31
}
32
},
33
{
34
"name": "meta.function.math.tex",
35
"begin": "((\\\\)([a-zA-Z_]+))\\s*(\\{)",
36
"beginCaptures": {
37
"1": {
38
"name": "storage.type.function.math.tex"
39
},
40
"2": {
41
"name": "punctuation.definition.function.math.tex"
42
},
43
"3": {
44
"name": "entity.name.function.math.tex"
45
},
46
"4": {
47
"name": "punctuation.definition.arguments.begin.math.tex"
48
}
49
},
50
"end": "\\}",
51
"endCaptures": {
52
"0": {
53
"name": "punctuation.definition.arguments.end.math.tex"
54
}
55
},
56
"patterns": [
57
{
58
"include": "$self"
59
}
60
]
61
},
62
{
63
"captures": {
64
"1": {
65
"name": "punctuation.definition.constant.math.tex"
66
}
67
},
68
"match": "(\\\\)([a-zA-Z_]+)\\b",
69
"name": "constant.character.math.tex"
70
},
71
{
72
"captures": {
73
"1": {
74
"name": "punctuation.definition.constant.math.tex"
75
}
76
},
77
"match": "(\\\\)(?!begin\\*\\{|verb)([A-Za-z]+)",
78
"name": "constant.other.general.math.tex"
79
},
80
{
81
"match": "(?<!\\\\)\\{",
82
"name": "punctuation.math.begin.bracket.curly"
83
},
84
{
85
"match": "(?<!\\\\)\\}",
86
"name": "punctuation.math.end.bracket.curly"
87
},
88
{
89
"match": "\\(",
90
"name": "punctuation.math.begin.bracket.round"
91
},
92
{
93
"match": "\\)",
94
"name": "punctuation.math.end.bracket.round"
95
},
96
{
97
"match": "(([0-9]*[\\.][0-9]+)|[0-9]+)",
98
"name": "constant.numeric.math.tex"
99
},
100
{
101
"match": "[\\+\\*/_\\^-]",
102
"name": "punctuation.math.operator.latex"
103
}
104
]
105
}
106
}
107
}
108
109