-
Notifications
You must be signed in to change notification settings - Fork 21
/
base-commands.txt
173 lines (170 loc) · 8.1 KB
/
base-commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"\\!" return "NEGSPACE";
"\\," return "THINSPACE";
"\\:" return "MEDSPACE";
"\\;" return "THICKSPACE";
"\\Big" return "BBIG";
"\\Bigg" return "BBIGG";
"\\Biggl" return "BBIGGL";
"\\Biggr" return "BBIGG";
"\\Bigl" return "BBIGL";
"\\Bigr" return "BBIG";
"\\align" { this.pushState("TEXTARG"); return "ALIGN"; }
# Prefix (e.g cos) should be placed after longer words (e.g cosh)
"\\arccos"|"\\arcsin"|"\\arctan"|"\\arg"|"\\cosh"|"\\cos"|"\\coth"|"\\cot"|"\\csc"|"\\deg"|"\\dim"|"\\exp"|"\\hom"|"\\ker"|"\\lg"|"\\ln"|"\\log"|"\\sec"|"\\sinh"|"\\sin"|"\\tanh"|"\\tan" { yytext = yytext.slice(1); return "F"; }
"\\det"|"\\gcd"|"\\liminf"|"\\limsup"|"\\lim"|"\\max"|"\\Pr"|"\\sup" { yytext = yytext.slice(1); return "FM"; }
# These have their own rules because of \mi and \in.
"\\min" { yytext = yytext.slice(1); return "FM"; }
"\\inf" { yytext = yytext.slice(1); return "FM"; }
"\\array" return "ARRAY";
"\\arrayopts" return "ARRAYOPTS";
"\\atop" return "TEXATOP";
"\\bar" { yytext = "\u00AF"; return "ACCENTNS"; }
"\\begin{Bmatrix}" return "BBBMATRIX";
"\\begin{Vmatrix}" return "BVVMATRIX";
"\\begin{aligned}" return "BALIGNED";
"\\begin{array}" { this.pushState("TEXTARG"); this.pushState("TEXTOPTARG"); this.pushState("TRYOPTARG"); return "BARRAY"; }
"\\begin{bmatrix}" return "BBMATRIX";
"\\begin{cases}" return "BCASES";
"\\begin{gathered}" return "BGATHERED";
"\\begin{matrix}" return "BMATRIX";
"\\begin{pmatrix}" return "BPMATRIX";
"\\begin{smallmatrix}" return "BSMALLMATRIX";
"\\begin{split}" return "BALIGNED";
"\\begin{vmatrix}" return "BVMATRIX";
"\\bgcolor" { this.pushState("TEXTARG"); return "BGCOLOR"; }
"\\big" return "BIG";
"\\bigg" return "BIGG";
"\\biggl" return "BIGGL";
"\\biggr" return "BIGG";
"\\bigl" return "BIGL";
"\\bigr" return "BIG";
"\\binom" return "BINOM";
"\\boldsymbol" return "MATHBF";
"\\boxed" return "BOXED";
"\\cellopts" return "CELLOPTS";
"\\check" { yytext = "\u02C7"; return "ACCENTNS"; }
"\\choose" return "TEXCHOOSE";
"\\closure" { yytext = "\u00AF"; return "ACCENT"; }
"\\colalign" { this.begin("TEXTARG"); return "COLALIGN"; }
"\\collayout" { this.pushState("TEXTARG"); return "COLLAYOUT";}
"\\collines" { this.pushState("TEXTARG"); return "COLLINES"; }
"\\color" { this.pushState("TEXTARG"); return "COLOR"; }
"\\colspan" { this.begin("TEXTARG"); return "COLSPAN"; }
"\\ddddot" { yytext = "\u20DC"; return "ACCENT"; }
"\\dddot" { yytext = "\u20DB"; return "ACCENT"; }
"\\ddot" { yytext = "\u0308"; return "ACCENT"; }
"\\displaystyle" return "DISPLAYSTYLE";
"\\dot" { yytext = "\u02D9"; return "ACCENT"; }
"\\endtoggle" { return "ETOGGLE"; }
"\\end{Bmatrix}" return "EBBMATRIX";
"\\end{Vmatrix}" return "EVVMATRIX";
"\\end{aligned}" return "EALIGNED";
"\\end{array}" return "EARRAY";
"\\end{bmatrix}" return "EBMATRIX";
"\\end{cases}" return "ECASES";
"\\end{gathered}" return "EGATHERED";
"\\end{matrix}" return "EMATRIX";
"\\end{pmatrix}" return "EPMATRIX";
"\\end{smallmatrix}" return "ESMALLMATRIX";
"\\end{split}" return "EALIGNED";
"\\end{vmatrix}" return "EVMATRIX";
"\\equalcols" { this.pushState("TEXTARG"); return "EQCOLS"; }
"\\equalrows" { this.pushState("TEXTARG"); return "EQROWS"; }
"\\frac" return "FRAC";
"\\frame" { this.pushState("TEXTARG"); return "FRAME"; }
"\\hat" { yytext = "\u005E"; return "ACCENTNS"; }
"\\href" { this.pushState("TEXTARG"); return "HREF"; }
"\\itexnum" { this.pushState("TEXTARG"); return "MN"; }
"\\left" return "LEFT";
"\\mathbb" return "MATHBB";
"\\mathbcal" return "MATHBSCR";
"\\mathbf" return "MATHBF";
"\\mathbin" { this.begin("TEXTARG"); return "MATHBIN"; }
"\\mathbit" return "MATHBIT";
"\\mathbscr" return "MATHBSCR";
"\\mathcal" return "MATHSCR";
"\\mathclap" return "MATHCLAP";
"\\mathfr" return "MATHFRAK";
"\\mathfrak" return "MATHFRAK";
"\\mathit" return "MATHIT";
"\\mathllap" return "MATHLLAP";
"\\mathmit" return "MATHIT";
"\\mathop" { this.begin("TEXTARG"); return "MATHOP"; }
"\\mathraisebox" { this.pushState("TEXTOPTARG"); this.pushState("TRYOPTARG"); this.pushState("TEXTOPTARG"); this.pushState("TRYOPTARG"); this.pushState("TEXTARG"); return "MATHRAISEBOX"; }
"\\mathrel" { this.begin("TEXTARG"); return "MATHREL"; }
"\\mathrlap" return "MATHRLAP";
"\\mathrm" return "MATHRM";
"\\mathsf" return "MATHSF";
"\\mathscr" return "MATHSCR";
"\\mathtt" return "MATHTT";
"\\medspace" return "MEDSPACE";
"\\mi" { this.pushState("TEXTARG"); return "MI"; }
"\\mn" { this.pushState("TEXTARG"); return "MN"; }
"\\mo" { this.pushState("TEXTARG"); return "MO"; }
"\\ms" { this.pushState("TEXTARG"); this.pushState("TEXTOPTARG"); this.pushState("TRYOPTARG"); this.pushState("TEXTOPTARG"); this.pushState("TRYOPTARG"); return "MS"; }
"\\mtext" { this.begin("TEXTARG"); return "MTEXT"; }
"\\multiscripts" return "MULTI";
"\\negspace" return "NEGSPACE";
"\\negmedspace" return "NEGMEDSPACE";
"\\negthickspace" return "NEGTHICKSPACE";
"\\operatorname" { this.begin("TEXTARG"); return "OPERATORNAME"; }
"\\over" return "TEXOVER";
"\\overbrace" return "OVERBRACE";
"\\overline" { yytext = "\u00AF"; return "ACCENT"; }
"\\overset" return "OVERSET";
"\\padding" { this.pushState("TEXTARG"); return "PADDING"; }
"\\phantom" return "PHANTOM";
"\\mod" { yytext = "mod"; return "MO"; }
"\\pmod" return "PMOD";
"\\qquad" return "QQUAD";
"\\quad" return "QUAD";
"\\right" return "RIGHT";
"\\root" return "ROOT";
"\\rowalign" { this.begin("TEXTARG"); return "ROWALIGN"; }
"\\rowlines" { this.pushState("TEXTARG"); return "ROWLINES"; }
"\\rowopts" return "ROWOPTS";
"\\rowspan" { this.begin("TEXTARG"); return "ROWSPAN"; }
"\\scriptscriptsize" return "SCRIPTSCRIPTSIZE";
"\\scriptsize" return "SCRIPTSIZE";
"\\slash" return "SLASH";
"\\space" { this.pushState("TEXTARG"); this.pushState("TEXTARG"); this.pushState("TEXTARG"); return "SPACE"; }
"\\sqrt" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); return "SQRT"; }
"\\stackrel" return "OVERSET";
"\\statusline" { this.pushState("TEXTARG"); return "STATUSLINE"; }
"\\substack" return "SUBSTACK";
"\\tensor" return "TENSOR";
"\\text" { this.begin("TEXTARG"); return "MTEXT"; }
"\\textsize" return "TEXTSIZE";
"\\textstyle" return "TEXTSTYLE";
"\\tbinom" return "TBINOM";
"\\tfrac" return "TFRAC";
"\\thickspace" return "THICKSPACE";
"\\thinspace" return "THINSPACE";
"\\tilde" { yytext = "\u02DC"; return "ACCENTNS"; }
"\\toggle" { return "TOGGLE"; }
"\\begintoggle" { return "BTOGGLE"; }
"\\tooltip" { this.pushState("TEXTARG"); return "TOOLTIP"; }
"\\underbrace" return "UNDERBRACE";
"\\underline" return "UNDERLINE";
"\\underoverset" return "UNDEROVERSET";
"\\underset" return "UNDERSET";
"\\vec" { yytext = "\u21C0"; return "ACCENTNS"; }
"\\widebar" { yytext = "\u00AF"; return "ACCENT"; }
"\\widecheck" { yytext = "\u02C7"; return "ACCENT"; }
"\\widehat" { yytext = "\u005E"; return "ACCENT"; }
"\\widetilde" { yytext = "\u02DC"; return "ACCENT"; }
"\\widevec" { yytext = "\u21C0"; return "ACCENT"; }
"\\xLeftarrow" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); yytext = "\u21D0"; return "XARROW"; }
"\\xLeftrightarrow" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); yytext = "\u21D4"; return "XARROW"; }
"\\xRightarrow" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); yytext = "\u21D2"; return "XARROW"; }
"\\xhookleftarrow" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); yytext = "\u21A9"; return "XARROW"; }
"\\xhookrightarrow" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); yytext = "\u21AA"; return "XARROW"; }
"\\xleftarrow" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); yytext = "\u2190"; return "XARROW"; }
"\\xleftrightarrow" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); yytext = "\u2194"; return "XARROW"; }
"\\xleftrightharpoons" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); yytext = "\u21CB"; return "XARROW"; }
"\\xmapsto" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); yytext = "\u21A6"; return "XARROW"; }
"\\xrightarrow" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); yytext = "\u2192"; return "XARROW"; }
"\\xrightleftharpoons" { this.pushState("OPTARG"); this.pushState("TRYOPTARG"); yytext = "\u21CC"; return "XARROW"; }