hwp_script_to_latex 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d5cbd40f7bf1c103f0f63edd7628312d8056887095987517557f2fd122e7ccb
4
- data.tar.gz: 353f524bd7ea6ff1dec5f06e806253d76e00a3dfd8f1ab1ca828288b39671507
3
+ metadata.gz: b72e8832e4c28f5e9eb5667a196d0960aa4e968903793d7ba6aed8cc11c2945f
4
+ data.tar.gz: a65a6f06d61ac8da34a373ee94d44f024f7917ae7621cd2a7e6505e8080cc46c
5
5
  SHA512:
6
- metadata.gz: 62f63bc802e1b135719b666b6b988648580fbfe6e90972fb52b98801c2ed94542fd2930383b533fb9e6ad5cc076b467588323672f04fe2acc41e669efe720a2e
7
- data.tar.gz: 407fa86923b2e40093b2487288a5ea87f5f41b5e63fb36ae6858469d770418241a07a451139a000d44cf5e56b85382743d750fd8a1a41bfaa860627c0c5830b8
6
+ metadata.gz: 7fd90ae66f1e3bc7ec8868d63f01b62e3b9a20c7b28c4c151360f575a71b2d4e352d65b81a2c5dece69deaec8461f8d2709a4f82e35610bbcec70c5095761510
7
+ data.tar.gz: c83c769442f60005b40ff917c04bc5f3f42aeb8dac325cd37fad29b580b2c173ce08bb52dc9780aaec56a9e32b8527c9d3c276180b00d59623d51a029a20aa69
@@ -13,37 +13,45 @@ module HwpScriptToLatex
13
13
  f.close
14
14
 
15
15
  @rules= JSON.parse(file_content, symbolize_names: true)
16
- @keywords = @rules[:keywords].sort_by { |hash| -1 * hash[:regex].inspect.length }
16
+ @simple_commands = @rules[:command][:simple].sort_by { |hash| -1 * hash[:script].length }
17
+ @matrix_commands = @rules[:command][:matrix]
18
+ @meta_keywords = @rules[:keyword][:meta].sort_by { |hash| -1 * hash[:regex].inspect.length }
19
+ @command_keywords = @rules[:keyword][:command].sort_by { |hash| -1 * hash[:regex].inspect.length }
20
+ @symbol_keywords = @rules[:keyword][:symbol].sort_by { |hash| -1 * hash[:regex].inspect.length }
21
+ @reserved_keywords = @rules[:keyword][:reserved].sort_by { |hash| -1 * hash[:regex].inspect.length }
17
22
  end
18
23
 
19
24
  def convert(script, math_mode: false, display_mode: false)
20
25
  # Sanitize for starting convert
21
26
  result = pre_sanitize(script)
22
-
27
+ # Simple Command 치환
28
+ result = replace_simple_commands(result)
23
29
  # 키워드 치환
24
- result = replace_keywords(result, @keywords)
25
-
26
- # 루트 변환
27
- result = replace_sqrt(result)
28
-
29
- # 분수 변환
30
- result = replace_fractions(result)
31
-
32
- # 행렬 변환
33
- result = replace_matrix(result)
30
+ result = replace_keywords(result)
31
+
32
+ # 특수 형태의 명령어 치환
33
+ # Case 1. 루트 변환
34
+ # sqrt A => \sqrt {A}
35
+ # sqrt A of B => \sqrt [A]{B}
36
+ # Case 2. 분수 변환
37
+ # A over B => \dfrac {A}{B}
38
+ # Case 3. 행렬 변환
39
+ # dmatrix {...} => \begin{vmatrix}...\end{vmatrix}
40
+ # bmatrix {...} => \begin{Bmatrix}...\end{Bmatrix}
41
+ # pmatrix {...} => \begin{pmatrix}...\end{pmatrix}
42
+ # matrix {...} => \begin{matrix}...\end{matrix}
43
+ result = replace_sqrt(result) # Case 1
44
+ result = replace_fractions(result) # Case 2
45
+ result = replace_matrix(result) # Case 3
34
46
 
35
47
  # 전체 수식에 디스플레이 스타일 적용
36
- if display_mode
37
- result = decorate_displaystyle(result)
38
- end
48
+ result = decorate_displaystyle(result) if display_mode
39
49
 
40
50
  # Sanitize result for removing dirty spaces
41
51
  result = post_sanitize(result)
42
52
 
43
53
  # Math mode
44
- if math_mode
45
- result = "$#{result}$"
46
- end
54
+ result = "$#{result}$" if math_mode
47
55
 
48
56
  return result
49
57
  end
@@ -68,21 +76,35 @@ module HwpScriptToLatex
68
76
  script = script.gsub(/\s+/, " ").strip
69
77
  end
70
78
 
71
- def replace_keywords(script, keywords)
79
+ def replace_simple_commands(script)
80
+ right_term_group_name = "rt"
81
+
82
+ @simple_commands.each do |command|
83
+ right_term_regex = RIGHT_TERM_REGEX % [right_term_group_name, right_term_group_name]
84
+ command_regex = %r((?<![a-zA-Z\\])(?i:#{command[:script]})\s*#{right_term_regex})
85
+
86
+ match_data = script.match(command_regex)
87
+ while match_data
88
+ right_term = remove_curly_brackets(match_data[right_term_group_name])
89
+ script = script.sub(command_regex, " \\#{command[:latex]} {%{#{right_term_group_name}}} " % {
90
+ "#{right_term_group_name}".to_sym => right_term
91
+ })
92
+ match_data = script.match(command_regex)
93
+ end
94
+ end
95
+
96
+ return script
97
+ end
98
+
99
+ def replace_keywords(script)
100
+ keywords = @meta_keywords + @command_keywords + @symbol_keywords + @reserved_keywords
72
101
  keywords.each do |keyword|
73
- full_match1 = script.match(/(?<!\\)([^\\\s]*)(#{keyword[:regex]})/).to_s
74
- full_match2 = script.match(/([^\\\s]*)(#{keyword[:regex]})/).to_s
75
-
76
- # match가 같은 문자열이어야 치환
77
- # ex) \theta는 eta로 치환하지 않아야 할 때
78
- # full_match1 == 'heta'
79
- # full_match2 == 'theta'
80
- # 두 개가 같지 않으므로 치환하지 않는다.
81
- if full_match1 == full_match2
82
- script = script.gsub(
83
- keyword[:ignorecase] ? %r(#{keyword[:regex]})i : %r(#{keyword[:regex]}),
84
- keyword[:latex]
85
- )
102
+ keyword_regex = get_keyword_regex(keyword)
103
+ before_script = script
104
+ script = script.gsub(keyword_regex, keyword[:latex])
105
+ while before_script != script
106
+ before_script = script
107
+ script = script.gsub(keyword_regex, keyword[:latex])
86
108
  end
87
109
  end
88
110
 
@@ -92,18 +114,14 @@ module HwpScriptToLatex
92
114
  def replace_fractions(script)
93
115
  left_term_group_name = "lt"
94
116
  right_term_group_name = "rt"
95
- left_term = LEFT_TERM_REGEX % [left_term_group_name, left_term_group_name]
96
- right_term = RIGHT_TERM_REGEX % [right_term_group_name, right_term_group_name]
97
- fraction_regex = %r(#{left_term}\s*(?<!\\)(?i:over|atop)\s*#{right_term})
117
+ left_term_regex = LEFT_TERM_REGEX % [left_term_group_name, left_term_group_name]
118
+ right_term_regex = RIGHT_TERM_REGEX % [right_term_group_name, right_term_group_name]
119
+ fraction_regex = %r(#{left_term_regex}\s*(?<!\\)(?i:over(?!line)|atop)\s*#{right_term_regex})
98
120
 
99
121
  match_data = script.match(fraction_regex)
100
122
  while match_data
101
123
  matched_groups = Hash[match_data.names.map(&:to_sym).zip(
102
- match_data.captures.map do |term|
103
- term = term.gsub(/^{/, '')
104
- term = term.gsub(/}$/, '')
105
- term
106
- end
124
+ match_data.captures.map {|term| remove_curly_brackets(term) }
107
125
  )]
108
126
  script = script.sub(fraction_regex, " \\dfrac {%{lt}}{%{rt}} " % matched_groups)
109
127
  match_data = script.match(fraction_regex)
@@ -113,48 +131,47 @@ module HwpScriptToLatex
113
131
  end
114
132
 
115
133
  def replace_matrix(script)
116
- matrix_regex = %r((?i:dmatrix)\s*(?<matrix_content>{(?>[^{}]+|(?:\\g<matrix_content>))*}))
134
+ @matrix_commands.each do |command|
135
+ matrix_regex = %r((?<![a-zA-Z])(?i:#{command[:script]})\s*(?<matrix_content>{(?>[^{}]+|(?:\\g<matrix_content>))*}))
117
136
 
118
- match_data = script.match(matrix_regex)
119
- while match_data
120
- # 시작, 끝 중괄호 제거
121
- matrix_content = match_data['matrix_content'].gsub(/^{/, '')
122
- matrix_content = matrix_content.gsub(/}$/, '')
123
- # sub 메서드에 블록 문법을 사용한 이유:
124
- # gsub, sub에서 백슬래시 문제
125
- # https://stackoverflow.com/a/4149087/9605912
126
- script = script.sub(matrix_regex) { " \\begin{bmatrix} %s \\end{bmatrix} " % matrix_content }
127
137
  match_data = script.match(matrix_regex)
138
+ while match_data
139
+ # 시작, 끝 중괄호 제거
140
+ matrix_content = remove_curly_brackets(match_data['matrix_content'])
141
+ # sub 메서드에 블록 문법을 사용한 이유:
142
+ # gsub, sub에서 백슬래시 문제
143
+ script = script.sub(matrix_regex) { " \\begin{#{command[:latex]}} %s \\end{#{command[:latex]}} " % matrix_content }
144
+ match_data = script.match(matrix_regex)
145
+ end
128
146
  end
129
147
 
130
148
  return script
131
149
  end
132
150
 
133
151
  def replace_sqrt(script)
134
- right_term1_name = 'rt1'
135
- right_term2_name = 'rt2'
136
- right_term1 = RIGHT_TERM_REGEX % [right_term1_name, right_term1_name]
137
- right_term2 = RIGHT_TERM_REGEX % [right_term2_name, right_term2_name]
138
- sqrt_regex = %r((?<!\\)(?i:sqrt|root)\s*#{right_term1}(\s*(?i:of)\s*#{right_term2})?)
152
+ right_term_name1 = 'rt1'
153
+ right_term_name2 = 'rt2'
154
+ right_term_regex1 = RIGHT_TERM_REGEX % [right_term_name1, right_term_name1]
155
+ right_term_regex2 = RIGHT_TERM_REGEX % [right_term_name2, right_term_name2]
156
+ sqrt_regex = %r((?<!\\)(?i:sqrt|root)\s*#{right_term_regex1}(\s*(?i:of)\s*#{right_term_regex2})?)
139
157
 
140
158
  match_data = script.match(sqrt_regex)
141
159
  while match_data
142
- has_right_term2 = !!match_data[right_term2_name]
160
+ has_right_term2 = !!match_data[right_term_name2]
143
161
 
144
162
  # 첫 번째 항 중괄호 제거
145
- right_term1_content = match_data[right_term1_name].gsub(/^{/, '')
146
- right_term1_content = right_term1_content.gsub(/}$/, '')
163
+ right_term_content1 = remove_curly_brackets(match_data[right_term_name1])
147
164
 
148
165
  if has_right_term2
149
- right_term2_content = match_data[right_term2_name].gsub(/^{/, '')
150
- right_term2_content = right_term2_content.gsub(/}$/, '')
166
+ # 번째 항 중괄호 제거
167
+ right_term_content2 = remove_curly_brackets(match_data[right_term_name2])
151
168
  end
152
169
 
153
170
  script = script.sub(sqrt_regex) do
154
171
  if has_right_term2
155
- " \\sqrt [%s]{%s} " % [right_term1_content, right_term2_content]
172
+ " \\sqrt [%s]{%s} " % [right_term_content1, right_term_content2]
156
173
  else
157
- " \\sqrt {%s} " % right_term1_content
174
+ " \\sqrt {%s} " % right_term_content1
158
175
  end
159
176
  end
160
177
  match_data = script.match(sqrt_regex)
@@ -163,6 +180,22 @@ module HwpScriptToLatex
163
180
  return script
164
181
  end
165
182
 
183
+ def get_keyword_regex(keyword)
184
+ regexes = []
185
+ if keyword[:regex].class == Array
186
+ regexes = keyword[:regex]
187
+ else
188
+ regexes << keyword[:regex]
189
+ end
190
+
191
+ is_alphabetic = keyword[:alphabetic].nil? ? true : keyword[:alphabetic]
192
+ if is_alphabetic
193
+ return %r((?<![a-zA-Z\\])(#{regexes.join('|')}))
194
+ else
195
+ return %r((?<![\\])(#{regexes.join('|')}))
196
+ end
197
+ end
198
+
166
199
  def decorate_displaystyle(script)
167
200
  script = "{#{script}}"
168
201
  script = script.gsub(/(?<!\\)\s*{\s*\\displaystyle/, " { ")
@@ -170,5 +203,9 @@ module HwpScriptToLatex
170
203
 
171
204
  return script
172
205
  end
206
+
207
+ def remove_curly_brackets(term)
208
+ return term.gsub(/(^{)|(}$)/, '')
209
+ end
173
210
  end
174
211
  end
@@ -1,3 +1,3 @@
1
1
  module HwpScriptToLatex
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
data/rules.json CHANGED
@@ -1,1245 +1,1245 @@
1
1
  {
2
- "keywords": [
3
- {
4
- "regex": "%",
5
- "latex": " \\% "
6
- },
7
- {
8
- "regex": "\r?\n",
9
- "latex": ""
10
- },
11
- {
12
- "regex": "<=",
13
- "latex": " \\leqq "
14
- },
15
- {
16
- "regex": ">=",
17
- "latex": " \\geqq "
18
- },
19
- {
20
- "regex": "!=",
21
- "latex": " \\ne "
22
- },
23
- {
24
- "regex": "==",
25
- "latex": " \\equiv "
26
- },
27
- {
28
- "regex": "∾",
29
- "latex": " \\backsim "
30
- },
31
- {
32
- "regex": "\\xf3\\xb0\\x81\\x80",
33
- "latex": " \\backsim "
34
- },
2
+ "_comments": [
3
+ "command.simple: 1개의 우항을 가지는 간단한 명령어",
4
+ "command.matrix: 행렬 명령어",
5
+ "keyword.meta: 공백, 줄바꿈, left right 등 특수문자",
6
+ "keyword.command: 항이 없는 단순 치환 명령어",
7
+ "keyword.symbol: 기호",
8
+ "keyword.reserved: 로만체로 표시되는 예약어"
9
+ ],
10
+ "command": {
11
+ "simple": [
12
+ {
13
+ "script": "box",
14
+ "latex": "fbox"
15
+ },
16
+ {
17
+ "script": "arch",
18
+ "latex": "stackrel\\frown"
19
+ },
20
+ {
21
+ "script": "bar",
22
+ "latex": "overline"
23
+ },
24
+ {
25
+ "script": "overline",
26
+ "latex": "overline"
27
+ },
28
+ {
29
+ "script": "acute",
30
+ "latex": "acute"
31
+ },
32
+ {
33
+ "script": "grave",
34
+ "latex": "grave"
35
+ },
36
+ {
37
+ "script": "check",
38
+ "latex": "check"
39
+ },
40
+ {
41
+ "script": "breve",
42
+ "latex": "breve"
43
+ },
44
+ {
45
+ "script": "tilde",
46
+ "latex": "tilde"
47
+ },
48
+ {
49
+ "script": "hat",
50
+ "latex": "hat"
51
+ },
52
+ {
53
+ "script": "widehat",
54
+ "latex": "widehat"
55
+ },
56
+ {
57
+ "script": "vec",
58
+ "latex": "vec"
59
+ },
60
+ {
61
+ "script": "dot(?!eq)",
62
+ "latex": "dot"
63
+ },
64
+ {
65
+ "script": "ddot(?!s)",
66
+ "latex": "ddot"
67
+ },
68
+ {
69
+ "script": "dyad",
70
+ "latex": "overleftrightarrow"
71
+ },
72
+ {
73
+ "script": "under",
74
+ "latex": "underline"
75
+ }
76
+ ],
77
+ "matrix": [
78
+ {
79
+ "script": "dmatrix",
80
+ "latex": "vmatrix"
81
+ },
82
+ {
83
+ "script": "bmatrix",
84
+ "latex": "Bmatrix"
85
+ },
86
+ {
87
+ "script": "pmatrix",
88
+ "latex": "pmatrix"
89
+ },
90
+ {
91
+ "script": "matrix",
92
+ "latex": "matrix"
93
+ }
94
+ ]
95
+ },
96
+ "keyword": {
97
+ "meta": [
98
+ {
99
+ "regex": "(?<![a-zA-Z])(?i:left|right)\\b\\s*+(?:(?=[^{}\\[\\]\\|\\(\\)])|(?:$))",
100
+ "latex": "",
101
+ "alphabetic": false
102
+ },
103
+ {
104
+ "regex": "(?<![a-zA-Z])(?i:left)\\s*\\[",
105
+ "latex": " \\left [ ",
106
+ "alphabetic": false
107
+ },
108
+ {
109
+ "regex": "(?<![a-zA-Z])(?i:right)\\s*\\]",
110
+ "latex": " \\right ] ",
111
+ "alphabetic": false
112
+ },
113
+ {
114
+ "regex": "(?<![a-zA-Z])(?i:left)\\s*{",
115
+ "latex": " \\{ ",
116
+ "alphabetic": false
117
+ },
118
+ {
119
+ "regex": "(?<![a-zA-Z])(?i:right)\\s*}",
120
+ "latex": " \\} ",
121
+ "alphabetic": false
122
+ },
123
+ {
124
+ "regex": "(?<![a-zA-Z])(?i:left)\\s*\\(",
125
+ "latex": " \\left ( ",
126
+ "alphabetic": false
127
+ },
128
+ {
129
+ "regex": "(?<![a-zA-Z])(?i:right)\\s*\\)",
130
+ "latex": " \\right ) ",
131
+ "alphabetic": false
132
+ },
133
+ {
134
+ "regex": "(?<![a-zA-Z])(?i:left)\\s*\\|",
135
+ "latex": " \\left | ",
136
+ "alphabetic": false
137
+ },
138
+ {
139
+ "regex": "(?<![a-zA-Z])(?i:right)\\s*\\|",
140
+ "latex": " \\right | ",
141
+ "alphabetic": false
142
+ },
143
+ {
144
+ "regex": "`",
145
+ "latex": " \\, ",
146
+ "alphabetic": false
147
+ },
148
+ {
149
+ "regex": "#",
150
+ "latex": "\\\\\\\\",
151
+ "alphabetic": false
152
+ },
153
+ {
154
+ "regex": "&amp;",
155
+ "latex": "",
156
+ "alphabetic": false
157
+ },
158
+ {
159
+ "regex": "\r?\n",
160
+ "latex": "",
161
+ "alphabetic": false
162
+ }
163
+ ],
164
+ "symbol": [
165
+ {
166
+ "regex": "%",
167
+ "latex": " \\% "
168
+ },
35
169
 
36
- {
37
- "regex": "rm",
38
- "latex": " \\rm ",
39
- "ignorecase": true
40
- },
41
- {
42
- "regex": "it",
43
- "latex": " \\it ",
44
- "ignorecase": true
45
- },
46
- {
47
- "regex": "box",
48
- "latex": " \\fbox ",
49
- "ignorecase": true
50
- },
51
- {
52
- "regex": "dot",
53
- "latex": " \\dot "
54
- },
55
- {
56
- "regex": "ddot",
57
- "latex": " \\ddot "
58
- },
59
- {
60
- "regex": "vdots",
61
- "latex": " \\vdots ",
62
- "ignorecase": true
63
- },
64
- {
65
- "regex": "sum",
66
- "latex": " \\sum ",
67
- "ignorecase": true
68
- },
69
- {
70
- "regex": "acute",
71
- "latex": " \\acute "
72
- },
73
- {
74
- "regex": "grave",
75
- "latex": " \\grave "
76
- },
77
- {
78
- "regex": "check",
79
- "latex": " \\check "
80
- },
81
- {
82
- "regex": "breve",
83
- "latex": " \\breve "
84
- },
85
- {
86
- "regex": "tilde",
87
- "latex": " \\tilde "
88
- },
89
- {
90
- "regex": "hat",
91
- "latex": " \\hat "
92
- },
93
- {
94
- "regex": "widehat",
95
- "latex": " \\widehat "
96
- },
97
- {
98
- "regex": "vec",
99
- "latex": " \\vec "
100
- },
170
+ {
171
+ "regex": ["Alpha", "ALPHA"],
172
+ "latex": " \\mathit {A} "
173
+ },
174
+ {
175
+ "regex": "alpha",
176
+ "latex": " \\alpha "
177
+ },
178
+ {
179
+ "regex": ["Beta", "BETA"],
180
+ "latex": " \\mathit {B} "
181
+ },
182
+ {
183
+ "regex": "beta",
184
+ "latex": " \\beta "
185
+ },
186
+ {
187
+ "regex": ["Gamma","GAMMA"],
188
+ "latex": " \\Gamma "
189
+ },
190
+ {
191
+ "regex": "gamma",
192
+ "latex": " \\gamma "
193
+ },
194
+ {
195
+ "regex": ["Delta","DELTA"],
196
+ "latex": " \\Delta "
197
+ },
198
+ {
199
+ "regex": "delta",
200
+ "latex": " \\delta "
201
+ },
202
+ {
203
+ "regex": ["Epsilon","EPSILON"],
204
+ "latex": "\\mathit {E}"
205
+ },
206
+ {
207
+ "regex": "epsilon",
208
+ "latex": " \\epsilon "
209
+ },
210
+ {
211
+ "regex": ["Zeta","ZETA"],
212
+ "latex": "\\mathit {Z}"
213
+ },
214
+ {
215
+ "regex": "zeta",
216
+ "latex": " \\zeta "
217
+ },
218
+ {
219
+ "regex": ["Eta","ETA"],
220
+ "latex": "\\mathit {H}"
221
+ },
222
+ {
223
+ "regex": "eta",
224
+ "latex": " \\eta "
225
+ },
226
+ {
227
+ "regex": ["Theta","THETA"],
228
+ "latex": " \\Theta "
229
+ },
230
+ {
231
+ "regex": "theta",
232
+ "latex": " \\theta "
233
+ },
234
+ {
235
+ "regex": ["Iota","IOTA"],
236
+ "latex": "\\mathit {I}"
237
+ },
238
+ {
239
+ "regex": "iota",
240
+ "latex": " \\iota "
241
+ },
242
+ {
243
+ "regex": ["Kappa","KAPPA"],
244
+ "latex": "\\mathit {K}"
245
+ },
246
+ {
247
+ "regex": "kappa",
248
+ "latex": " \\kappa "
249
+ },
250
+ {
251
+ "regex": ["Lambda","LAMBDA"],
252
+ "latex": " \\Lambda "
253
+ },
254
+ {
255
+ "regex": "lambda",
256
+ "latex": " \\lambda "
257
+ },
258
+ {
259
+ "regex": ["Mu","MU"],
260
+ "latex": "\\mathit {M}"
261
+ },
262
+ {
263
+ "regex": "mu",
264
+ "latex": " \\mu "
265
+ },
266
+ {
267
+ "regex": ["Nu","NU"],
268
+ "latex": "\\mathit {N}"
269
+ },
270
+ {
271
+ "regex": "nu",
272
+ "latex": " \\nu "
273
+ },
274
+ {
275
+ "regex": ["Xi","XI"],
276
+ "latex": " \\Xi "
277
+ },
278
+ {
279
+ "regex": "xi",
280
+ "latex": " \\xi "
281
+ },
282
+ {
283
+ "regex": ["Omicron", "OMICRON"],
284
+ "latex": " \\mathit {O} "
285
+ },
286
+ {
287
+ "regex": "omicron",
288
+ "latex": " \\omicron "
289
+ },
290
+ {
291
+ "regex": ["Pi","PI"],
292
+ "latex": " \\Pi "
293
+ },
294
+ {
295
+ "regex": "pi",
296
+ "latex": " \\pi "
297
+ },
298
+ {
299
+ "regex": ["Rho","RHO"],
300
+ "latex": "\\mathit {P}"
301
+ },
302
+ {
303
+ "regex": "rho",
304
+ "latex": " \\rho "
305
+ },
306
+ {
307
+ "regex": ["Sigma", "SIGMA"],
308
+ "latex": " \\Sigma "
309
+ },
310
+ {
311
+ "regex": "sigma",
312
+ "latex": " \\sigma "
313
+ },
314
+ {
315
+ "regex": ["Tau","TAU"],
316
+ "latex": "\\mathit {T}"
317
+ },
318
+ {
319
+ "regex": "tau",
320
+ "latex": " \\tau "
321
+ },
322
+ {
323
+ "regex": ["Upsilon","UPSILON"],
324
+ "latex": "\\mathit {Y}"
325
+ },
326
+ {
327
+ "regex": "upsilon",
328
+ "latex": " \\upsilon "
329
+ },
330
+ {
331
+ "regex": ["Phi","PHI"],
332
+ "latex": " \\Phi "
333
+ },
334
+ {
335
+ "regex": "phi",
336
+ "latex": " \\phi "
337
+ },
338
+ {
339
+ "regex": ["Chi","CHI"],
340
+ "latex": "\\mathit {X}"
341
+ },
342
+ {
343
+ "regex": "chi",
344
+ "latex": " \\chi "
345
+ },
346
+ {
347
+ "regex": ["Psi","PSI"],
348
+ "latex": " \\Psi "
349
+ },
350
+ {
351
+ "regex": "psi",
352
+ "latex": " \\psi "
353
+ },
354
+ {
355
+ "regex": ["Omega","OMEGA"],
356
+ "latex": " \\Omega "
357
+ },
358
+ {
359
+ "regex": "omega",
360
+ "latex": " \\omega "
361
+ },
362
+ {
363
+ "regex": ["aleph", "Aleph", "ALEPH"],
364
+ "latex": " \\aleph "
365
+ },
366
+ {
367
+ "regex": ["hbar", "Hbar", "HBAR"],
368
+ "latex": " \\hbar "
369
+ },
370
+ {
371
+ "regex": ["imath", "Imath", "IMATH"],
372
+ "latex": " \\imath "
373
+ },
374
+ {
375
+ "regex": ["jmath", "Jmath", "JMATH"],
376
+ "latex": " \\jmath "
377
+ },
378
+ {
379
+ "regex": ["ell", "Ell", "ELL"],
380
+ "latex": " \\ell "
381
+ },
382
+ {
383
+ "regex": ["liter", "Liter", "LITER"],
384
+ "latex": " \\ell "
385
+ },
386
+ {
387
+ "regex": ["wp", "Wp", "WP"],
388
+ "latex": " \\wp "
389
+ },
390
+ {
391
+ "regex": "IMAG",
392
+ "latex": " \\Im "
393
+ },
394
+ {
395
+ "regex": "ANGSTROM",
396
+ "latex": " \\mathit {\\unicode{x212b}} "
397
+ },
398
+ {
399
+ "regex": "vartheta",
400
+ "latex": " \\vartheta "
401
+ },
402
+ {
403
+ "regex": "varpi",
404
+ "latex": " \\varpi "
405
+ },
406
+ {
407
+ "regex": "varsigma",
408
+ "latex": " \\varsigma "
409
+ },
410
+ {
411
+ "regex": "varupsilon",
412
+ "latex": " \\Upsilon "
413
+ },
414
+ {
415
+ "regex": "varphi",
416
+ "latex": " \\varphi "
417
+ },
418
+ {
419
+ "regex": "varepsilon",
420
+ "latex": " \\varepsilon "
421
+ },
422
+ {
423
+ "regex": ["mho", "Mho", "MHO"],
424
+ "latex": " \\mho "
425
+ },
426
+ {
427
+ "regex": "varrho",
428
+ "latex": " \\varrho "
429
+ },
101
430
 
102
- {
103
- "regex": "exp",
104
- "latex": " \\exp "
105
- },
106
- {
107
- "regex": "ln",
108
- "latex": " \\ln "
109
- },
110
- {
111
- "regex": "lg",
112
- "latex": " \\lg "
113
- },
114
- {
115
- "regex": "log",
116
- "latex": " \\log "
117
- },
118
- {
119
- "regex": "sin",
120
- "latex": " \\sin "
121
- },
122
- {
123
- "regex": "cos",
124
- "latex": " \\cos "
125
- },
126
- {
127
- "regex": "tan",
128
- "latex": " \\tan "
129
- },
130
- {
131
- "regex": "cot",
132
- "latex": " \\cot "
133
- },
134
- {
135
- "regex": "sec",
136
- "latex": " \\sec "
137
- },
138
- {
139
- "regex": "csc",
140
- "latex": " \\csc "
141
- },
142
- {
143
- "regex": "arcsin",
144
- "latex": " \\arcsin "
145
- },
146
- {
147
- "regex": "arccos",
148
- "latex": " \\arccos "
149
- },
150
- {
151
- "regex": "arctan",
152
- "latex": " \\arctan "
153
- },
154
- {
155
- "regex": "sgn",
156
- "latex": " \\sgn "
157
- },
158
- {
159
- "regex": "vert",
160
- "latex": " \\vert "
161
- },
162
- {
163
- "regex": "min",
164
- "latex": " \\min "
165
- },
166
- {
167
- "regex": "max",
168
- "latex": " \\max "
169
- },
170
431
 
171
- {
172
- "regex": "inf",
173
- "latex": " \\inf "
174
- },
175
- {
176
- "regex": "sup",
177
- "latex": " \\sup "
178
- },
179
- {
180
- "regex": "lim",
181
- "latex": " \\lim "
182
- },
183
- {
184
- "regex": "liminf",
185
- "latex": " \\liminf "
186
- },
187
- {
188
- "regex": "limsup",
189
- "latex": " \\limsup "
190
- },
191
- {
192
- "regex": "dim",
193
- "latex": " \\dim "
194
- },
195
- {
196
- "regex": "deg",
197
- "latex": " \\deg "
198
- },
199
- {
200
- "regex": "det",
201
- "latex": " \\det "
202
- },
203
- {
204
- "regex": "ker",
205
- "latex": " \\ker "
206
- },
432
+ {
433
+ "regex": ["prod", "PROD"],
434
+ "latex": " \\prod "
435
+ },
436
+ {
437
+ "regex": ["coprod", "Coprod", "COPROD"],
438
+ "latex": " \\coprod "
439
+ },
440
+ {
441
+ "regex": ["inter", "Inter", "INTER"],
442
+ "latex": " \\bigcap "
443
+ },
444
+ {
445
+ "regex": ["bigcap", "Bigcap", "BIGCAP"],
446
+ "latex": " \\bigcap "
447
+ },
448
+ {
449
+ "regex": ["union", "Union", "UNION"],
450
+ "latex": " \\bigcup "
451
+ },
452
+ {
453
+ "regex": ["bigcup", "Bigcup", "BIGCUP"],
454
+ "latex": " \\bigcup "
455
+ },
456
+ {
457
+ "regex": ["cap", "Cap", "CAP"],
458
+ "latex": " \\cap "
459
+ },
460
+ {
461
+ "regex": ["smallinter", "Smallinter", "SMALLINTER"],
462
+ "latex": " \\cap "
463
+ },
464
+ {
465
+ "regex": ["cup", "Cup", "CUP"],
466
+ "latex": " \\cup "
467
+ },
468
+ {
469
+ "regex": ["smallunion", "Smallunion", "SMALLUNION"],
470
+ "latex": " \\cup "
471
+ },
472
+ {
473
+ "regex": ["sqcap", "Sqcap", "SQCAP"],
474
+ "latex": " \\sqcap "
475
+ },
476
+ {
477
+ "regex": ["sqcup", "Sqcup", "SQCUP"],
478
+ "latex": " \\sqcup "
479
+ },
480
+ {
481
+ "regex": ["bigsqcup", "Bigsqcup", "BIGSQCUP"],
482
+ "latex": " \\bigsqcup "
483
+ },
484
+ {
485
+ "regex": ["uplus", "Uplus", "UPLUS"],
486
+ "latex": " \\uplus "
487
+ },
488
+ {
489
+ "regex": ["biguplus", "Biguplus", "BIGUPLUS"],
490
+ "latex": " \\biguplus "
491
+ },
492
+ {
493
+ "regex": ["subset", "Subset", "SUBSET"],
494
+ "latex": " \\subset "
495
+ },
496
+ {
497
+ "regex": ["supset", "Supset", "SUPSET"],
498
+ "latex": " \\supset "
499
+ },
500
+ {
501
+ "regex": ["subseteq", "Subseteq", "SUBSETEQ"],
502
+ "latex": " \\subseteq "
503
+ },
504
+ {
505
+ "regex": ["supseteq", "Supseteq", "SUPSETEQ"],
506
+ "latex": " \\supseteq "
507
+ },
508
+ {
509
+ "regex": ["nsubseteq", "Nsubseteq", "NSUBSETEQ"],
510
+ "latex": " \\nsubseteq "
511
+ },
512
+ {
513
+ "regex": ["nsupseteq", "Nsupseteq", "NSUPSETEQ"],
514
+ "latex": " \\nsupseteq "
515
+ },
516
+ {
517
+ "regex": ["sqsubset", "Sqsubset", "SQSUBSET"],
518
+ "latex": " \\sqsubset "
519
+ },
520
+ {
521
+ "regex": ["sqsupset", "Sqsupset", "SQSUPSET"],
522
+ "latex": " \\sqsupset "
523
+ },
524
+ {
525
+ "regex": ["sqsubseteq", "Sqsubseteq", "SQSUBSETEQ"],
526
+ "latex": " \\sqsubseteq "
527
+ },
528
+ {
529
+ "regex": ["sqsupseteq", "Sqsupseteq", "SQSUPSETEQ"],
530
+ "latex": " \\sqsupseteq "
531
+ },
532
+ {
533
+ "regex": ["in", "In", "IN"],
534
+ "latex": " \\in "
535
+ },
536
+ {
537
+ "regex": ["ni", "Ni", "NI"],
538
+ "latex": " \\ni "
539
+ },
540
+ {
541
+ "regex": ["owns", "Owns", "OWNS"],
542
+ "latex": " \\owns "
543
+ },
544
+ {
545
+ "regex": ["notin", "Notin", "NOTIN"],
546
+ "latex": " \\not \\in "
547
+ },
548
+ {
549
+ "regex": ["nin", "Nin", "NIN"],
550
+ "latex": " \\not \\in "
551
+ },
552
+ {
553
+ "regex": ["notni", "Notni", "NOTNI"],
554
+ "latex": " \\not \\ni "
555
+ },
556
+ {
557
+ "regex": ["leq", "Leq", "LEQ"],
558
+ "latex": " \\leq "
559
+ },
560
+ {
561
+ "regex": ["le", "Le", "LE"],
562
+ "latex": " \\le "
563
+ },
564
+ {
565
+ "regex": "<=",
566
+ "latex": " \\leqq ",
567
+ "alphabetic": false
568
+ },
569
+ {
570
+ "regex": ["geq", "Geq", "GEQ"],
571
+ "latex": " \\geq "
572
+ },
573
+ {
574
+ "regex": ["ge", "Ge", "GE"],
575
+ "latex": " \\ge "
576
+ },
577
+ {
578
+ "regex": ">=",
579
+ "latex": " \\geqq ",
580
+ "alphabetic": false
581
+ },
207
582
 
208
- {
209
- "regex": "Pr",
210
- "latex": " \\Pr "
211
- },
212
- {
213
- "regex": "hom",
214
- "latex": " \\hom "
215
- },
216
- {
217
- "regex": "(Vert)|(VERT)",
218
- "latex": " \\Vert "
219
- },
220
- {
221
- "regex": "arg",
222
- "latex": " \\arg "
223
- },
583
+ {
584
+ "regex": ["oplus", "Oplus", "OPLUS"],
585
+ "latex": " \\oplus "
586
+ },
587
+ {
588
+ "regex": ["ominus", "Ominus", "OMINUS"],
589
+ "latex": " \\ominus "
590
+ },
591
+ {
592
+ "regex": ["otimes", "Otimes", "OTIMES"],
593
+ "latex": " \\otimes "
594
+ },
595
+ {
596
+ "regex": ["odot", "Odot", "ODOT"],
597
+ "latex": " \\odot "
598
+ },
599
+ {
600
+ "regex": ["oslash", "Oslash", "OSLASH"],
601
+ "latex": " \\oslash "
602
+ },
603
+ {
604
+ "regex": ["lor", "Lor", "LOR"],
605
+ "latex": " \\lor "
606
+ },
607
+ {
608
+ "regex": ["vee", "Vee", "VEE"],
609
+ "latex": " \\vee "
610
+ },
611
+ {
612
+ "regex": ["bigvee", "Bigvee", "BIGVEE"],
613
+ "latex": " \\bigvee "
614
+ },
615
+ {
616
+ "regex": ["land", "Land", "LAND"],
617
+ "latex": " \\land "
618
+ },
619
+ {
620
+ "regex": ["wedge", "Wedge", "WEDGE"],
621
+ "latex": " \\wedge "
622
+ },
623
+ {
624
+ "regex": ["bigwedge", "Bigwedge", "BIGWEDGE"],
625
+ "latex": " \\bigwedge "
626
+ },
627
+ {
628
+ "regex": "(?<!<)<<(?!<)",
629
+ "latex": " \\ll ",
630
+ "alphabetic": false
631
+ },
632
+ {
633
+ "regex": "(?<!>)>>(?!>)",
634
+ "latex": " \\gg ",
635
+ "alphabetic": false
636
+ },
637
+ {
638
+ "regex": "<<<",
639
+ "latex": " \\lll ",
640
+ "alphabetic": false
641
+ },
642
+ {
643
+ "regex": ["lll", "Lll", "LLL"],
644
+ "latex": " \\lll "
645
+ },
646
+ {
647
+ "regex": ">>>",
648
+ "latex": " \\ggg ",
649
+ "alphabetic": false
650
+ },
651
+ {
652
+ "regex": "ggg",
653
+ "latex": " \\ggg "
654
+ },
655
+ {
656
+ "regex": ["prec", "PREC"],
657
+ "latex": " \\prec "
658
+ },
659
+ {
660
+ "regex": ["succ", "Succ", "SUCC"],
661
+ "latex": " \\succ "
662
+ },
224
663
 
225
- {
226
- "regex": "partial",
227
- "latex": " \\partial ",
228
- "ignorecase": true
229
- },
230
- {
231
- "regex": "nabla",
232
- "latex": " \\nabla ",
233
- "ignorecase": true
234
- },
235
- {
236
- "regex": "prime",
237
- "latex": " ' "
238
- },
239
664
 
240
- {
241
- "regex": "infty",
242
- "latex": " \\infty ",
243
- "ignorecase": true
244
- },
245
- {
246
- "regex": "hbar",
247
- "latex": " \\hbar ",
248
- "ignorecase": true
249
- },
250
- {
251
- "regex": "imath",
252
- "latex": " \\imath ",
253
- "ignorecase": true
254
- },
255
- {
256
- "regex": "jmath",
257
- "latex": " \\jmath ",
258
- "ignorecase": true
259
- },
260
- {
261
- "regex": "ell",
262
- "latex": " \\ell ",
263
- "ignorecase": true
264
- },
265
- {
266
- "regex": "mho",
267
- "latex": " \\mho ",
268
- "ignorecase": true
269
- },
270
- {
271
- "regex": "wp",
272
- "latex": " \\wp ",
273
- "ignorecase": true
274
- },
665
+ {
666
+ "regex": ["plusminus", "Plusminus", "PLUSMINUS"],
667
+ "latex": " \\pm "
668
+ },
669
+ {
670
+ "regex": ["minusplus", "Minusplus", "MINUSPLUS"],
671
+ "latex": " \\mp "
672
+ },
673
+ {
674
+ "regex": ["dsum", "Dsum", "DSUM"],
675
+ "latex": " \\dotplus "
676
+ },
677
+ {
678
+ "regex": ["times", "Times", "TIMES"],
679
+ "latex": " \\times "
680
+ },
681
+ {
682
+ "regex": ["divide", "Divide", "DIVIDE"],
683
+ "latex": " \\div "
684
+ },
685
+ {
686
+ "regex": ["div", "Div", "DIV"],
687
+ "latex": " \\div "
688
+ },
689
+ {
690
+ "regex": ["circ", "Circ", "CIRC"],
691
+ "latex": " \\circ "
692
+ },
693
+ {
694
+ "regex": ["bullet", "Bullet", "BULLET"],
695
+ "latex": " \\bullet "
696
+ },
697
+ {
698
+ "regex": ["Deg", "DEG"],
699
+ "latex": " \\,^{\\circ} "
700
+ },
701
+ {
702
+ "regex": ["ast", "Ast", "AST"],
703
+ "latex": " \\ast "
704
+ },
705
+ {
706
+ "regex": ["star", "Star", "STAR"],
707
+ "latex": " \\star "
708
+ },
709
+ {
710
+ "regex": ["bigcirc", "Bigcirc", "BIGCIRC"],
711
+ "latex": " \\bigcirc "
712
+ },
713
+ {
714
+ "regex": ["emptyset", "Emptyset", "EMPTYSET"],
715
+ "latex": " \\emptyset "
716
+ },
717
+ {
718
+ "regex": ["therefore", "Therefore", "THEREFORE"],
719
+ "latex": " \\therefore "
720
+ },
721
+ {
722
+ "regex": ["because", "Because", "BECAUSE"],
723
+ "latex": " \\because "
724
+ },
725
+ {
726
+ "regex": ["exists?", "Exists?", "EXISTS?"],
727
+ "latex": " \\exists "
728
+ },
729
+ {
730
+ "regex": ["ne", "Ne", "NE"],
731
+ "latex": " \\ne "
732
+ },
733
+ {
734
+ "regex": "!=",
735
+ "latex": " \\ne ",
736
+ "alphabetic": false
737
+ },
738
+ {
739
+ "regex": ["neq", "Neq", "NEQ"],
740
+ "latex": " \\neq "
741
+ },
742
+ {
743
+ "regex": ["doteq", "Doteq", "DOTEQ"],
744
+ "latex": " \\doteq "
745
+ },
746
+ {
747
+ "regex": ["image", "Image"],
748
+ "latex": " \\fallingdotseq "
749
+ },
750
+ {
751
+ "regex": ["reimage", "Reimage", "REIMAGE"],
752
+ "latex": " \\risingdotseq "
753
+ },
754
+ {
755
+ "regex": ["sim", "Sim", "SIM"],
756
+ "latex": " \\backsim "
757
+ },
758
+ {
759
+ "regex": "∾",
760
+ "latex": " \\backsim ",
761
+ "alphabetic": false
762
+ },
763
+ {
764
+ "regex": "\\xf3\\xb0\\x81\\x80",
765
+ "latex": " \\backsim ",
766
+ "alphabetic": false
767
+ },
768
+ {
769
+ "regex": ["simeq", "Simeq", "SIMEQ"],
770
+ "latex": " \\simeq "
771
+ },
772
+ {
773
+ "regex": ["approx", "Approx", "APPROX"],
774
+ "latex": " \\approx "
775
+ },
776
+ {
777
+ "regex": ["cong", "Cong", "CONG"],
778
+ "latex": " \\cong "
779
+ },
780
+ {
781
+ "regex": ["equiv", "Equiv", "EQUIV"],
782
+ "latex": " \\equiv "
783
+ },
784
+ {
785
+ "regex": "==",
786
+ "latex": " \\equiv ",
787
+ "alphabetic": false
788
+ },
789
+ {
790
+ "regex": ["asymp", "Asymp", "ASYMP"],
791
+ "latex": " \\asymp "
792
+ },
793
+ {
794
+ "regex": ["iso", "Iso", "ISO"],
795
+ "latex": " \\Bumpeq "
796
+ },
797
+ {
798
+ "regex": ["diamond", "Diamond", "DIAMOND"],
799
+ "latex": " \\diamond "
800
+ },
801
+ {
802
+ "regex": ["Forall", "FORALL"],
803
+ "latex": " \\forall "
804
+ },
805
+ {
806
+ "regex": "prime",
807
+ "latex": " ' "
808
+ },
809
+ {
810
+ "regex": ["partial", "Partial", "PARTIAL"],
811
+ "latex": " \\partial "
812
+ },
813
+ {
814
+ "regex": ["infty", "Infty", "INFTY"],
815
+ "latex": " \\infty "
816
+ },
817
+ {
818
+ "regex": ["inf", "Inf", "INF"],
819
+ "latex": " \\infty "
820
+ },
821
+ {
822
+ "regex": ["infinity", "Infinity", "INFINITY"],
823
+ "latex": " \\infty "
824
+ },
825
+ {
826
+ "regex": ["LNOT"],
827
+ "latex": " \\lnot "
828
+ },
829
+ {
830
+ "regex": ["neg", "Neg", "NEG"],
831
+ "latex": " \\neg "
832
+ },
833
+ {
834
+ "regex": ["propto", "PROPTO"],
835
+ "latex": " \\propto "
836
+ },
837
+ {
838
+ "regex": ["xor", "Xor", "XOR"],
839
+ "latex": " \\veebar "
840
+ },
841
+ {
842
+ "regex": ["dagger", "Dagger", "DAGGER"],
843
+ "latex": " \\dagger "
844
+ },
845
+ {
846
+ "regex": ["ddagger", "Ddagger", "DDAGGER"],
847
+ "latex": " \\ddagger "
848
+ },
849
+ {
850
+ "regex": ["parallel", "Parallel", "PARALLEL"],
851
+ "latex": " \\parallel "
852
+ },
275
853
 
276
- {
277
- "regex": "plusminus",
278
- "latex": " \\pm ",
279
- "ignorecase": true
280
- },
281
- {
282
- "regex": "minusplus",
283
- "latex": " \\mp ",
284
- "ignorecase": true
285
- },
286
- {
287
- "regex": "dsum",
288
- "latex": " \\dotplus ",
289
- "ignorecase": true
290
- },
291
- {
292
- "regex": "times",
293
- "latex": " \\times ",
294
- "ignorecase": true
295
- },
296
- {
297
- "regex": "divide",
298
- "latex": " \\div ",
299
- "ignorecase": true
300
- },
301
- {
302
- "regex": "div",
303
- "latex": " \\div ",
304
- "ignorecase": true
305
- },
306
- {
307
- "regex": "dyad",
308
- "latex": " \\overset {\\longleftrightarrow} ",
309
- "ignorecase": true
310
- },
311
- {
312
- "regex": "backslash",
313
- "latex": " \\backslash ",
314
- "ignorecase": true
315
- },
316
- {
317
- "regex": "cdot",
318
- "latex": " \\cdot ",
319
- "ignorecase": true
320
- },
321
- {
322
- "regex": "ast",
323
- "latex": " \\ast ",
324
- "ignorecase": true
325
- },
326
- {
327
- "regex": "star",
328
- "latex": " \\star ",
329
- "ignorecase": true
330
- },
331
- {
332
- "regex": "circ",
333
- "latex": " \\circ ",
334
- "ignorecase": true
335
- },
336
- {
337
- "regex": "bullet",
338
- "latex": " \\bullet ",
339
- "ignorecase": true
340
- },
341
- {
342
- "regex": "oplus",
343
- "latex": " \\oplus ",
344
- "ignorecase": true
345
- },
346
- {
347
- "regex": "ominus",
348
- "latex": " \\ominus ",
349
- "ignorecase": true
350
- },
351
- {
352
- "regex": "otimes",
353
- "latex": " \\otimes ",
354
- "ignorecase": true
355
- },
356
- {
357
- "regex": "oslash",
358
- "latex": " \\oslash ",
359
- "ignorecase": true
360
- },
361
- {
362
- "regex": "odot",
363
- "latex": " \\odot ",
364
- "ignorecase": true
365
- },
366
854
 
367
- {
368
- "regex": "in",
369
- "latex": " \\in ",
370
- "ignorecase": true
371
- },
372
- {
373
- "regex": "notin|not in",
374
- "latex": " \\notin ",
375
- "ignorecase": true
376
- },
377
- {
378
- "regex": "ni",
379
- "latex": " \\ni ",
380
- "ignorecase": true
381
- },
382
- {
383
- "regex": "notni|not ni",
384
- "latex": " \\notni ",
385
- "ignorecase": true
386
- },
387
- {
388
- "regex": "succ",
389
- "latex": " \\succ "
390
- },
391
- {
392
- "regex": "SUCC",
393
- "latex": " \\succ "
394
- },
395
- {
396
- "regex": "Succ",
397
- "latex": " \\succ "
398
- },
399
- {
400
- "regex": "cap",
401
- "latex": " \\cap "
402
- },
403
- {
404
- "regex": "CAP",
405
- "latex": " \\cap "
406
- },
407
- {
408
- "regex": "Cap",
409
- "latex": " \\Cap "
410
- },
411
- {
412
- "regex": "sqcap",
413
- "latex": " \\sqcap ",
414
- "ignorecase": true
415
- },
416
- {
417
- "regex": "bigcap",
418
- "latex": " \\bigcap ",
419
- "ignorecase": true
420
- },
421
- {
422
- "regex": "cup",
423
- "latex": " \\cup "
424
- },
425
- {
426
- "regex": "CUP",
427
- "latex": " \\cup "
428
- },
429
- {
430
- "regex": "Cup",
431
- "latex": " \\Cup "
432
- },
433
- {
434
- "regex": "union",
435
- "latex": " \\cup ",
436
- "ignorecase": true
437
- },
438
- {
439
- "regex": "smallunion",
440
- "latex": " \\cup ",
441
- "ignorecase": true
442
- },
443
- {
444
- "regex": "inter",
445
- "latex": " \\cap ",
446
- "ignorecase": true
447
- },
448
- {
449
- "regex": "smallinter",
450
- "latex": " \\cap ",
451
- "ignorecase": true
452
- },
453
- {
454
- "regex": "sqcup",
455
- "latex": " \\sqcup ",
456
- "ignorecase": true
457
- },
458
- {
459
- "regex": "bigcup",
460
- "latex": " \\bigcup ",
461
- "ignorecase": true
462
- },
463
- {
464
- "regex": "bigsqcup",
465
- "latex": " \\bigsqcup ",
466
- "ignorecase": true
467
- },
468
- {
469
- "regex": "uplus",
470
- "latex": " \\uplus ",
471
- "ignorecase": true
472
- },
473
- {
474
- "regex": "biguplus",
475
- "latex": " \\biguplus ",
476
- "ignorecase": true
477
- },
478
- {
479
- "regex": "subset",
480
- "latex": " \\subset "
481
- },
482
- {
483
- "regex": "Subset",
484
- "latex": " \\Subset "
485
- },
486
- {
487
- "regex": "sqsubset",
488
- "latex": " \\sqsubset ",
489
- "ignorecase": true
490
- },
491
- {
492
- "regex": "supset",
493
- "latex": " \\supset "
494
- },
495
- {
496
- "regex": "Supset",
497
- "latex": " \\Supset "
498
- },
499
- {
500
- "regex": "sqsupset",
501
- "latex": " \\sqsupset ",
502
- "ignorecase": true
503
- },
504
- {
505
- "regex": "subseteq",
506
- "latex": " \\subseteq ",
507
- "ignorecase": true
508
- },
509
- {
510
- "regex": "nsubseteq",
511
- "latex": " \\nsubseteq ",
512
- "ignorecase": true
513
- },
514
- {
515
- "regex": "subsetneq",
516
- "latex": " \\subsetneq ",
517
- "ignorecase": true
518
- },
519
- {
520
- "regex": "varsubsetneq",
521
- "latex": " \\varsubsetneq ",
522
- "ignorecase": true
523
- },
524
- {
525
- "regex": "sqsubseteq",
526
- "latex": " \\sqsubseteq ",
527
- "ignorecase": true
528
- },
529
- {
530
- "regex": "supseteq",
531
- "latex": " \\supseteq ",
532
- "ignorecase": true
533
- },
534
- {
535
- "regex": "nsupseteq",
536
- "latex": " \\nsupseteq ",
537
- "ignorecase": true
538
- },
539
- {
540
- "regex": "supsetneq",
541
- "latex": " \\supsetneq ",
542
- "ignorecase": true
543
- },
544
- {
545
- "regex": "varsupsetneq",
546
- "latex": " \\varsupsetneq ",
547
- "ignorecase": true
548
- },
549
- {
550
- "regex": "sqsupseteq",
551
- "latex": " \\sqsupseteq ",
552
- "ignorecase": true
553
- },
855
+ {
856
+ "regex": ["larrow", "leftarrow"],
857
+ "latex": " \\leftarrow "
858
+ },
859
+ {
860
+ "regex": ["Leftarrow", "LEFTARROW", "LARROW", "Larrow"],
861
+ "latex": " \\Leftarrow "
862
+ },
863
+ {
864
+ "regex": ["rarrow", "rightarrow"],
865
+ "latex": " \\rightarrow "
866
+ },
867
+ {
868
+ "regex": ["Rightarrow", "RIGHTARROW", "RARROW", "Rarrow"],
869
+ "latex": " \\Rightarrow "
870
+ },
871
+ {
872
+ "regex": "uparrow",
873
+ "latex": " \\uparrow "
874
+ },
875
+ {
876
+ "regex": ["Uparrow", "UPARROW"],
877
+ "latex": " \\Uparrow "
878
+ },
879
+ {
880
+ "regex": "downarrow",
881
+ "latex": " \\downarrow "
882
+ },
883
+ {
884
+ "regex": ["Downarrow", "DOWNARROW"],
885
+ "latex": " \\Downarrow "
886
+ },
887
+ {
888
+ "regex": "udarrow",
889
+ "latex": " \\updownarrow "
890
+ },
891
+ {
892
+ "regex": ["Udarrow", "UDARROW"],
893
+ "latex": " \\Updownarrow "
894
+ },
895
+ {
896
+ "regex": "lrarrow",
897
+ "latex": " \\leftrightarrow "
898
+ },
899
+ {
900
+ "regex": ["Lrarrow", "LRARROW"],
901
+ "latex": " \\Leftrightarrow "
902
+ },
903
+ {
904
+ "regex": ["nwarrow", "Nwarrow", "NWARROW"],
905
+ "latex": " \\nwarrow "
906
+ },
907
+ {
908
+ "regex": ["searrow", "Searrow", "SEARROW"],
909
+ "latex": " \\searrow "
910
+ },
911
+ {
912
+ "regex": ["nearrow", "Nearrow", "NEARROW"],
913
+ "latex": " \\nearrow "
914
+ },
915
+ {
916
+ "regex": ["swarrow", "Swarrow", "SWARROW"],
917
+ "latex": " \\swarrow "
918
+ },
919
+ {
920
+ "regex": ["hookleft", "Hookleft", "HOOKLEFT"],
921
+ "latex": " \\hookleftarrow "
922
+ },
923
+ {
924
+ "regex": ["hookright", "Hookright", "HOOKRIGHT"],
925
+ "latex": " \\hookrightarrow "
926
+ },
927
+ {
928
+ "regex": ["mapsto", "Mapsto", "MAPSTO"],
929
+ "latex": " \\mapsto "
930
+ },
931
+ {
932
+ "regex": ["Vert", "VERT"],
933
+ "latex": " \\Vert "
934
+ },
935
+ {
936
+ "regex": "vert",
937
+ "latex": " \\vert "
938
+ },
554
939
 
555
- {
556
- "regex": "ne",
557
- "latex": " \\ne ",
558
- "ignorecase": true
559
- },
560
- {
561
- "regex": "neq",
562
- "latex": " \\neq ",
563
- "ignorecase": true
564
- },
565
- {
566
- "regex": "equiv",
567
- "latex": " \\equiv ",
568
- "ignorecase": true
569
- },
570
- {
571
- "regex": "notequiv|not equiv",
572
- "latex": " \\not\\equiv ",
573
- "ignorecase": true
574
- },
575
- {
576
- "regex": "sim",
577
- "latex": " \\sim ",
578
- "ignorecase": true
579
- },
580
- {
581
- "regex": "simeq",
582
- "latex": " \\simeq ",
583
- "ignorecase": true
584
- },
585
- {
586
- "regex": "cong",
587
- "latex": " \\cong ",
588
- "ignorecase": true
589
- },
590
- {
591
- "regex": "approx",
592
- "latex": " \\approx ",
593
- "ignorecase": true
594
- },
595
- {
596
- "regex": "asymp",
597
- "latex": " \\asymp ",
598
- "ignorecase": true
599
- },
600
- {
601
- "regex": "propto",
602
- "latex": " \\propto ",
603
- "ignorecase": true
604
- },
605
- {
606
- "regex": "not\s*<",
607
- "latex": " \\nless ",
608
- "ignorecase": true
609
- },
610
- {
611
- "regex": "<<",
612
- "latex": " \\ll ",
613
- "ignorecase": true
614
- },
615
- {
616
- "regex": "not\s*<<",
617
- "latex": " \\not\\ll ",
618
- "ignorecase": true
619
- },
620
- {
621
- "regex": "<<<|lll",
622
- "latex": " \\lll ",
623
- "ignorecase": true
624
- },
625
- {
626
- "regex": "not\s*<<<|not\s*lll",
627
- "latex": " \\not\\lll ",
628
- "ignorecase": true
629
- },
630
- {
631
- "regex": "not\s*>",
632
- "latex": " \\ngtr ",
633
- "ignorecase": true
634
- },
635
- {
636
- "regex": ">>",
637
- "latex": " \\gg ",
638
- "ignorecase": true
639
- },
640
- {
641
- "regex": "not\s*>>",
642
- "latex": " \\not\\gg ",
643
- "ignorecase": true
644
- },
645
- {
646
- "regex": ">>>|ggg",
647
- "latex": " \\ggg ",
648
- "ignorecase": true
649
- },
650
- {
651
- "regex": "not\s*>>>|not\s*ggg",
652
- "latex": " \\not\\ggg ",
653
- "ignorecase": true
654
- },
655
- {
656
- "regex": "le",
657
- "latex": " \\le ",
658
- "ignorecase": true
659
- },
660
- {
661
- "regex": "leq",
662
- "latex": " \\leq ",
663
- "ignorecase": true
664
- },
665
- {
666
- "regex": "ge",
667
- "latex": " \\ge ",
668
- "ignorecase": true
669
- },
670
- {
671
- "regex": "geq",
672
- "latex": " \\geq ",
673
- "ignorecase": true
674
- },
675
940
 
676
- {
677
- "regex": "parallel",
678
- "latex": " \\parallel ",
679
- "ignorecase": true
680
- },
681
- {
682
- "regex": "not\s*parallel",
683
- "latex": " \\nparallel ",
684
- "ignorecase": true
685
- },
686
- {
687
- "regex": "angle",
688
- "latex": " \\angle ",
689
- "ignorecase": true
690
- },
691
- {
692
- "regex": "deg",
693
- "latex": " ^\\circ ",
694
- "ignorecase": true
695
- },
696
- {
697
- "regex": "diamond",
698
- "latex": " \\diamond "
699
- },
700
- {
701
- "regex": "Diamond",
702
- "latex": " \\Diamond "
703
- },
704
- {
705
- "regex": "bigcirc",
706
- "latex": " \\bigcirc ",
707
- "ignorecase": true
708
- },
709
- {
710
- "regex": "triangle",
711
- "latex": " \\triangle ",
712
- "ignorecase": true
713
- },
714
- {
715
- "regex": "triangled",
716
- "latex": " \\triangledown ",
717
- "ignorecase": true
718
- },
719
- {
720
- "regex": "trianglel",
721
- "latex": " \\triangleleft ",
722
- "ignorecase": true
723
- },
724
- {
725
- "regex": "triangler",
726
- "latex": " \\triangleright ",
727
- "ignorecase": true
728
- },
729
- {
730
- "regex": "bar",
731
- "latex": " \\overline ",
732
- "ignorecase": true
733
- },
734
- {
735
- "regex": "overline",
736
- "latex": " \\overline ",
737
- "ignorecase": true
738
- },
739
- {
740
- "regex": "arch",
741
- "latex": " \\stackrel\\frown ",
742
- "ignorecase": true
743
- },
941
+ {
942
+ "regex": ["backslash", "Backslash", "BACKSLASH"],
943
+ "latex": " \\backslash "
944
+ },
945
+ {
946
+ "regex": ["cdot(?!s)", "Cdot(?!s)", "CDOT(?!S)"],
947
+ "latex": " \\cdot "
948
+ },
949
+ {
950
+ "regex": ["cdots", "Cdots", "CDOTS"],
951
+ "latex": " \\cdots "
952
+ },
953
+ {
954
+ "regex": ["ldots", "Ldots", "LDOTS"],
955
+ "latex": " \\ldots "
956
+ },
957
+ {
958
+ "regex": ["vdots", "Vdots", "VDOTS"],
959
+ "latex": " \\vdots "
960
+ },
961
+ {
962
+ "regex": ["ddots", "Ddots", "DDOTS"],
963
+ "latex": " \\ddots "
964
+ },
965
+ {
966
+ "regex": ["triangle(?![dlr])", "Triangle(?![dlr])", "TRIANGLE(?![DLR])"],
967
+ "latex": " \\triangle "
968
+ },
969
+ {
970
+ "regex": ["triangled", "Triangled", "TRIANGLED"],
971
+ "latex": " \\triangledown "
972
+ },
973
+ {
974
+ "regex": ["trianglel", "Trianglel", "TRIANGLEL"],
975
+ "latex": " \\triangleleft "
976
+ },
977
+ {
978
+ "regex": ["triangler", "Triangler", "TRIANGLER"],
979
+ "latex": " \\triangleright "
980
+ },
981
+ {
982
+ "regex": ["nabla", "Nabla", "NABLA"],
983
+ "latex": " \\nabla "
984
+ },
985
+ {
986
+ "regex": ["angle", "Angle", "ANGLE"],
987
+ "latex": " \\angle "
988
+ },
989
+ {
990
+ "regex": ["langle", "Langle", "LANGLE"],
991
+ "latex": " \\langle "
992
+ },
993
+ {
994
+ "regex": ["rangle", "Rangle", "RANGLE"],
995
+ "latex": " \\rangle "
996
+ },
997
+ {
998
+ "regex": ["msangle", "Msangle", "MSANGLE"],
999
+ "latex": " \\measuredangle "
1000
+ },
1001
+ {
1002
+ "regex": ["sangle", "Sangle", "SANGLE"],
1003
+ "latex": " \\sphericalangle "
1004
+ },
1005
+ {
1006
+ "regex": ["vdash", "Vdash", "VDASH"],
1007
+ "latex": " \\vdash "
1008
+ },
1009
+ {
1010
+ "regex": ["hright", "Hright", "HRIGHT"],
1011
+ "latex": " \\vdash "
1012
+ },
1013
+ {
1014
+ "regex": ["dashv", "Dashv", "DASHV"],
1015
+ "latex": " \\dashv "
1016
+ },
1017
+ {
1018
+ "regex": ["hleft", "Hleft", "HLEFT"],
1019
+ "latex": " \\dashv "
1020
+ },
1021
+ {
1022
+ "regex": ["bot", "Bot", "BOT"],
1023
+ "latex": " \\bot "
1024
+ },
1025
+ {
1026
+ "regex": ["top", "Top", "TOP"],
1027
+ "latex": " \\top "
1028
+ },
1029
+ {
1030
+ "regex": ["Models", "MODELS"],
1031
+ "latex": " \\models "
1032
+ },
1033
+ {
1034
+ "regex": ["laplace", "Laplace", "LAPLACE"],
1035
+ "latex": " \\mathscr {L} "
1036
+ },
1037
+ {
1038
+ "regex": ["centigrade", "Centigrade", "CENTIGRADE"],
1039
+ "latex": " \\,^{\\circ}\\mathrm {C} "
1040
+ },
1041
+ {
1042
+ "regex": ["fahrenheit", "Fahrenheit", "FAHRENHEIT"],
1043
+ "latex": " \\,^{\\circ}\\mathrm {F} "
1044
+ },
1045
+ {
1046
+ "regex": ["amalg", "Amalg", "AMALG"],
1047
+ "latex": " \\amalg "
1048
+ },
1049
+ {
1050
+ "regex": ["lfloor", "Lfloor", "LFLOOR"],
1051
+ "latex": " \\lfloor "
1052
+ },
1053
+ {
1054
+ "regex": ["rfloor", "Rfloor", "RFLOOR"],
1055
+ "latex": " \\rfloor "
1056
+ },
1057
+ {
1058
+ "regex": ["lceil", "Lceil", "LCEIL"],
1059
+ "latex": " \\lceil "
1060
+ },
1061
+ {
1062
+ "regex": ["rceil", "Rceil", "RCEIL"],
1063
+ "latex": " \\rceil "
1064
+ },
1065
+ {
1066
+ "regex": "->",
1067
+ "latex": " \\to ",
1068
+ "alphabetic": false
1069
+ }
1070
+ ],
1071
+ "command": [
1072
+ {
1073
+ "regex": ["rm", "Rm", "RM"],
1074
+ "latex": " \\rm "
1075
+ },
1076
+ {
1077
+ "regex": ["it", "It", "IT"],
1078
+ "latex": " \\it "
1079
+ },
1080
+ {
1081
+ "regex": ["cases", "Cases", "CASES"],
1082
+ "latex": " \\cases "
1083
+ },
1084
+ {
1085
+ "regex": ["sum", "Sum", "SUM"],
1086
+ "latex": " \\sum "
1087
+ },
1088
+ {
1089
+ "regex": ["int(?!er)", "Int(?!er)", "INT(?!ER)"],
1090
+ "latex": " \\int "
1091
+ },
1092
+ {
1093
+ "regex": ["oint", "Oint", "OINT"],
1094
+ "latex": " \\oint "
1095
+ }
1096
+ ],
1097
+ "reserved": [
1098
+ {
1099
+ "regex": "(?<!mathrm\\s{)sin(?!h)",
1100
+ "latex": " \\mathrm {sin} "
1101
+ },
1102
+ {
1103
+ "regex": "(?<!mathrm\\s{)cos(?!ec|h)",
1104
+ "latex": " \\mathrm {cos} "
1105
+ },
1106
+ {
1107
+ "regex": "(?<!mathrm\\s{)coth",
1108
+ "latex": " \\mathrm {coth} "
1109
+ },
1110
+ {
1111
+ "regex": "(?<!mathrm\\s{)log",
1112
+ "latex": " \\mathrm {log} "
1113
+ },
1114
+ {
1115
+ "regex": "(?<!mathrm\\s{)tan(?!h)",
1116
+ "latex": " \\mathrm {tan} "
1117
+ },
1118
+ {
1119
+ "regex": "(?<!mathrm\\s{)cot(?!h)",
1120
+ "latex": " \\mathrm {cot} "
1121
+ },
1122
+ {
1123
+ "regex": "(?<!mathrm\\s{)ln(?!ot)",
1124
+ "latex": " \\mathrm {ln} "
1125
+ },
1126
+ {
1127
+ "regex": "(?<!mathrm\\s{)lg",
1128
+ "latex": " \\mathrm {lg} "
1129
+ },
1130
+ {
1131
+ "regex": "(?<!mathrm\\s{)sec",
1132
+ "latex": " \\mathrm {sec} "
1133
+ },
1134
+ {
1135
+ "regex": "(?<!mathrm\\s{)cosec",
1136
+ "latex": " \\mathrm {cosec} "
1137
+ },
1138
+ {
1139
+ "regex": "(?<!mathrm\\s{)max",
1140
+ "latex": " \\mathrm {max} "
1141
+ },
1142
+ {
1143
+ "regex": "(?<!mathrm\\s{)min",
1144
+ "latex": " \\mathrm {min} "
1145
+ },
1146
+ {
1147
+ "regex": "(?<!mathrm\\s{)csc",
1148
+ "latex": " \\mathrm {csc} "
1149
+ },
1150
+ {
1151
+ "regex": "(?<!mathrm\\s{)arcsin",
1152
+ "latex": " \\mathrm {arcsin} "
1153
+ },
1154
+ {
1155
+ "regex": "(?<!mathrm\\s{)lim",
1156
+ "latex": " \\mathrm {lim} "
1157
+ },
1158
+ {
1159
+ "regex": "(?<!mathrm\\s{)Lim",
1160
+ "latex": " \\mathrm {Lim} "
1161
+ },
1162
+ {
1163
+ "regex": "(?<!mathrm\\s{)arccos",
1164
+ "latex": " \\mathrm {arccos} "
1165
+ },
1166
+ {
1167
+ "regex": "(?<!mathrm\\s{)arctan",
1168
+ "latex": " \\mathrm {arctan} "
1169
+ },
1170
+ {
1171
+ "regex": "(?<!mathrm\\s{)exp",
1172
+ "latex": " \\mathrm {exp} "
1173
+ },
1174
+ {
1175
+ "regex": "(?<!mathrm\\s{)Exp",
1176
+ "latex": " \\mathrm {Exp} "
1177
+ },
1178
+ {
1179
+ "regex": "(?<!mathrm\\s{)arc(?!h|sin|cos|tan)",
1180
+ "latex": " \\mathrm {arc} "
1181
+ },
1182
+ {
1183
+ "regex": "(?<!mathrm\\s{)sinh",
1184
+ "latex": " \\mathrm {sinh} "
1185
+ },
1186
+ {
1187
+ "regex": "(?<!mathrm\\s{)det",
1188
+ "latex": " \\mathrm {det} "
1189
+ },
1190
+ {
1191
+ "regex": "(?<!mathrm\\s{)gcd",
1192
+ "latex": " \\mathrm {gcd} "
1193
+ },
1194
+ {
1195
+ "regex": "(?<!mathrm\\s{)cosh",
1196
+ "latex": " \\mathrm {cosh} "
1197
+ },
1198
+ {
1199
+ "regex": "(?<!mathrm\\s{)tanh",
1200
+ "latex": " \\mathrm {tanh} "
1201
+ },
1202
+ {
1203
+ "regex": "(?<!mathrm\\s{)mod",
1204
+ "latex": " \\mathrm {mod} "
1205
+ },
744
1206
 
745
- {
746
- "regex": "Forall|FORALL",
747
- "latex": " \\forall "
748
- },
749
- {
750
- "regex": "exists",
751
- "latex": " \\exists ",
752
- "ignorecase": true
753
- },
754
- {
755
- "regex": "therefore",
756
- "latex": " \\therefore ",
757
- "ignorecase": true
758
- },
759
- {
760
- "regex": "because",
761
- "latex": " \\because ",
762
- "ignorecase": true
763
- },
764
- {
765
- "regex": "lor",
766
- "latex": " \\lor ",
767
- "ignorecase": true
768
- },
769
- {
770
- "regex": "vee",
771
- "latex": " \\vee ",
772
- "ignorecase": true
773
- },
774
- {
775
- "regex": "bigvee",
776
- "latex": " \\bigvee ",
777
- "ignorecase": true
778
- },
779
- {
780
- "regex": "land",
781
- "latex": " \\land ",
782
- "ignorecase": true
783
- },
784
- {
785
- "regex": "wedge",
786
- "latex": " \\wedge ",
787
- "ignorecase": true
788
- },
789
- {
790
- "regex": "bigwedge",
791
- "latex": " \\bigwedge ",
792
- "ignorecase": true
793
- },
794
- {
795
- "regex": "neg",
796
- "latex": " \\neg ",
797
- "ignorecase": true
798
- },
799
- {
800
- "regex": "bot",
801
- "latex": " \\bot ",
802
- "ignorecase": true
803
- },
804
- {
805
- "regex": "top",
806
- "latex": " \\top ",
807
- "ignorecase": true
808
- },
809
- {
810
- "regex": "vdash",
811
- "latex": " \\vdash ",
812
- "ignorecase": true
813
- },
814
- {
815
- "regex": "dashv",
816
- "latex": " \\dashv ",
817
- "ignorecase": true
818
- },
819
-
820
- {
821
- "regex": "leftarrow|larrow",
822
- "latex": " \\leftarrow "
823
- },
824
- {
825
- "regex": "Leftarrow|LEFTARROW|LARROW",
826
- "latex": " \\Leftarrow "
827
- },
828
- {
829
- "regex": "rightarrow|rarrow",
830
- "latex": " \\rightarrow "
831
- },
832
- {
833
- "regex": "Rightarrow|RIGHTARROW|RARROW",
834
- "latex": " \\Rightarrow "
835
- },
836
- {
837
- "regex": "uparrow",
838
- "latex": " \\uparrow "
839
- },
840
- {
841
- "regex": "Uparrow|UPARROW",
842
- "latex": " \\Uparrow "
843
- },
844
- {
845
- "regex": "downarrow",
846
- "latex": " \\downarrow "
847
- },
848
- {
849
- "regex": "Downarrow|DOWNARROW",
850
- "latex": " \\Downarrow "
851
- },
852
- {
853
- "regex": "udarrow",
854
- "latex": " \\updownarrow "
855
- },
856
- {
857
- "regex": "Udarrow|UDARROW",
858
- "latex": " \\Updownarrow "
859
- },
860
- {
861
- "regex": "lrarrow",
862
- "latex": " \\leftrightarrow "
863
- },
864
- {
865
- "regex": "Lrarrow|LRARROW",
866
- "latex": " \\Leftrightarrow "
867
- },
868
- {
869
- "regex": "nwarrow",
870
- "latex": " \\nwarrow ",
871
- "ignorecase": true
872
- },
873
- {
874
- "regex": "searrow",
875
- "latex": " \\searrow ",
876
- "ignorecase": true
877
- },
878
- {
879
- "regex": "nearrow",
880
- "latex": " \\nearrow ",
881
- "ignorecase": true
882
- },
883
- {
884
- "regex": "swarrow",
885
- "latex": " \\swarrow ",
886
- "ignorecase": true
887
- },
888
- {
889
- "regex": "hookleft",
890
- "latex": " \\hookleftarrow ",
891
- "ignorecase": true
892
- },
893
- {
894
- "regex": "hookright",
895
- "latex": " \\hookrightarrow ",
896
- "ignorecase": true
897
- },
898
- {
899
- "regex": "mapsto",
900
- "latex": " \\mapsto ",
901
- "ignorecase": true
902
- },
903
-
904
- {
905
- "regex": "amalg",
906
- "latex": " \\amalg ",
907
- "ignorecase": true
908
- },
909
- {
910
- "regex": "dagger",
911
- "latex": " \\dagger ",
912
- "ignorecase": true
913
- },
914
- {
915
- "regex": "ddagger",
916
- "latex": " \\ddager ",
917
- "ignorecase": true
918
- },
919
- {
920
- "regex": "ldots",
921
- "latex": " \\ldots ",
922
- "ignorecase": true
923
- },
924
- {
925
- "regex": "cdots",
926
- "latex": " \\cdots ",
927
- "ignorecase": true
928
- },
929
- {
930
- "regex": "ddots",
931
- "latex": " \\ddots ",
932
- "ignorecase": true
933
- },
934
-
935
- {
936
- "regex": "`",
937
- "latex": " \\, "
938
- },
939
- {
940
- "regex": "~",
941
- "latex": " \\ "
942
- },
943
- {
944
- "regex": "#",
945
- "latex": "\\\\\\\\"
946
- },
947
- {
948
- "regex": "&amp;",
949
- "latex": ""
950
- },
951
- {
952
- "regex": "cases",
953
- "latex": " \\cases "
954
- },
955
-
956
- {
957
- "regex": "\\bleft\\b\\s*{",
958
- "latex": " \\{ ",
959
- "ignorecase": true
960
- },
961
- {
962
- "regex": "\\bright\\b\\s*}",
963
- "latex": " \\} ",
964
- "ignorecase": true
965
- },
966
- {
967
- "regex": "\\bleft\\b\\s*\\(",
968
- "latex": " \\left ( ",
969
- "ignorecase": true
970
- },
971
- {
972
- "regex": "\\bright\\b\\s*\\)",
973
- "latex": " \\right ) ",
974
- "ignorecase": true
975
- },
976
- {
977
- "regex": "langle",
978
- "latex": " \\langle ",
979
- "ignorecase": true
980
- },
981
- {
982
- "regex": "rangle",
983
- "latex": " \\rangle ",
984
- "ignorecase": true
985
- },
986
- {
987
- "regex": "lfloor",
988
- "latex": " \\lfloor ",
989
- "ignorecase": true
990
- },
991
- {
992
- "regex": "rfloor",
993
- "latex": " \\rfloor ",
994
- "ignorecase": true
995
- },
996
- {
997
- "regex": "lceil",
998
- "latex": " \\lceil ",
999
- "ignorecase": true
1000
- },
1001
- {
1002
- "regex": "rceil",
1003
- "latex": " \\rceil ",
1004
- "ignorecase": true
1005
- },
1006
-
1007
- {
1008
- "regex": "(Alpha)|(ALPHA)",
1009
- "latex": " A "
1010
- },
1011
- {
1012
- "regex": "alpha",
1013
- "latex": " \\alpha "
1014
- },
1015
- {
1016
- "regex": "(Beta)|(BETA)",
1017
- "latex": " B "
1018
- },
1019
- {
1020
- "regex": "beta",
1021
- "latex": " \\beta "
1022
- },
1023
- {
1024
- "regex": "(Gamma)|(GAMMA)",
1025
- "latex": " \\Gamma "
1026
- },
1027
- {
1028
- "regex": "gamma",
1029
- "latex": " \\gamma "
1030
- },
1031
- {
1032
- "regex": "(Delta)|(DELTA)",
1033
- "latex": " \\Delta "
1034
- },
1035
- {
1036
- "regex": "delta",
1037
- "latex": " \\delta "
1038
- },
1039
- {
1040
- "regex": "(Epsilon)|(EPSILON)",
1041
- "latex": " E "
1042
- },
1043
- {
1044
- "regex": "epsilon",
1045
- "latex": " \\epsilon "
1046
- },
1047
- {
1048
- "regex": "(Zeta)|(ZETA)",
1049
- "latex": " Z "
1050
- },
1051
- {
1052
- "regex": "zeta",
1053
- "latex": " \\zeta "
1054
- },
1055
- {
1056
- "regex": "(Eta)|(ETA)",
1057
- "latex": " H "
1058
- },
1059
- {
1060
- "regex": "eta",
1061
- "latex": " \\eta "
1062
- },
1063
- {
1064
- "regex": "(Theta)|(THETA)",
1065
- "latex": " \\Theta "
1066
- },
1067
- {
1068
- "regex": "theta",
1069
- "latex": " \\theta "
1070
- },
1071
- {
1072
- "regex": "(Iota)|(IOTA)",
1073
- "latex": " I "
1074
- },
1075
- {
1076
- "regex": "iota",
1077
- "latex": " \\iota "
1078
- },
1079
- {
1080
- "regex": "(Kappa)|(KAPPA)",
1081
- "latex": " K "
1082
- },
1083
- {
1084
- "regex": "kappa",
1085
- "latex": " \\kappa "
1086
- },
1087
- {
1088
- "regex": "(Lambda)|(LAMBDA)",
1089
- "latex": " \\Lambda "
1090
- },
1091
- {
1092
- "regex": "lambda",
1093
- "latex": " \\lambda "
1094
- },
1095
- {
1096
- "regex": "(Mu)|(MU)",
1097
- "latex": " M "
1098
- },
1099
- {
1100
- "regex": "mu",
1101
- "latex": " \\mu "
1102
- },
1103
- {
1104
- "regex": "(Nu)|(NU)",
1105
- "latex": " N "
1106
- },
1107
- {
1108
- "regex": "nu",
1109
- "latex": " \\nu "
1110
- },
1111
- {
1112
- "regex": "(Xi)|(XI)",
1113
- "latex": " \\Xi "
1114
- },
1115
- {
1116
- "regex": "xi",
1117
- "latex": " \\xi "
1118
- },
1119
- {
1120
- "regex": "(Pi)|(PI)",
1121
- "latex": " \\Pi "
1122
- },
1123
- {
1124
- "regex": "pi",
1125
- "latex": " \\pi "
1126
- },
1127
- {
1128
- "regex": "(Rho)|(RHO)",
1129
- "latex": " P "
1130
- },
1131
- {
1132
- "regex": "rho",
1133
- "latex": " \\rho "
1134
- },
1135
- {
1136
- "regex": "(Sigma)|(SIGMA)",
1137
- "latex": " \\Sigma "
1138
- },
1139
- {
1140
- "regex": "sigma",
1141
- "latex": " \\sigma "
1142
- },
1143
- {
1144
- "regex": "(Tau)|(TAU)",
1145
- "latex": " T "
1146
- },
1147
- {
1148
- "regex": "tau",
1149
- "latex": " \\tau "
1150
- },
1151
- {
1152
- "regex": "(Upsilon)|(UPSILON)",
1153
- "latex": " \\Upsilon "
1154
- },
1155
- {
1156
- "regex": "upsilon",
1157
- "latex": " \\upsilon "
1158
- },
1159
- {
1160
- "regex": "(Phi)|(PHI)",
1161
- "latex": " \\Phi "
1162
- },
1163
- {
1164
- "regex": "phi",
1165
- "latex": " \\phi "
1166
- },
1167
- {
1168
- "regex": "(Chi)|(CHI)",
1169
- "latex": " X "
1170
- },
1171
- {
1172
- "regex": "chi",
1173
- "latex": " \\chi "
1174
- },
1175
- {
1176
- "regex": "(Psi)|(PSI)",
1177
- "latex": " \\Psi "
1178
- },
1179
- {
1180
- "regex": "psi",
1181
- "latex": " \\psi "
1182
- },
1183
- {
1184
- "regex": "(Omega)|(OMEGA)",
1185
- "latex": " \\Omega "
1186
- },
1187
- {
1188
- "regex": "omega",
1189
- "latex": " \\omega "
1190
- },
1191
- {
1192
- "regex": "varepsilon",
1193
- "latex": " \\varepsilon "
1194
- },
1195
- {
1196
- "regex": "digamma",
1197
- "latex": " \\digamma "
1198
- },
1199
- {
1200
- "regex": "varkappa",
1201
- "latex": " \\varkappa "
1202
- },
1203
- {
1204
- "regex": "varpi",
1205
- "latex": " \\varpi "
1206
- },
1207
- {
1208
- "regex": "varrho",
1209
- "latex": " \\varrho "
1210
- },
1211
- {
1212
- "regex": "varsigma",
1213
- "latex": " \\varsigma "
1214
- },
1215
- {
1216
- "regex": "vartheta",
1217
- "latex": " \\vartheta "
1218
- },
1219
- {
1220
- "regex": "varphi",
1221
- "latex": " \\varphi "
1222
- },
1223
- {
1224
- "regex": "aleph",
1225
- "latex": " \\aleph "
1226
- },
1227
- {
1228
- "regex": "beth",
1229
- "latex": " \\beth "
1230
- },
1231
- {
1232
- "regex": "gimel",
1233
- "latex": " \\gimel "
1234
- },
1235
- {
1236
- "regex": "daleth",
1237
- "latex": " \\daleth "
1238
- },
1239
-
1240
- {
1241
- "regex": "->",
1242
- "latex": " \\to "
1243
- }
1244
- ]
1207
+ {
1208
+ "regex": "(?<!mathrm\\s{)if",
1209
+ "latex": " \\mathrm {if} "
1210
+ },
1211
+ {
1212
+ "regex": "(?<!mathrm\\s{)for",
1213
+ "latex": " \\mathrm {for} "
1214
+ },
1215
+ {
1216
+ "regex": "(?<!mathrm\\s{)and",
1217
+ "latex": " \\mathrm {and} "
1218
+ },
1219
+ {
1220
+ "regex": "(?<!mathrm\\s{)hom",
1221
+ "latex": " \\mathrm {hom} "
1222
+ },
1223
+ {
1224
+ "regex": "(?<!mathrm\\s{)ker",
1225
+ "latex": " \\mathrm {ker} "
1226
+ },
1227
+ {
1228
+ "regex": "(?<!mathrm\\s{)deg",
1229
+ "latex": " \\mathrm {deg} "
1230
+ },
1231
+ {
1232
+ "regex": "(?<!mathrm\\s{)arg",
1233
+ "latex": " \\mathrm {arg} "
1234
+ },
1235
+ {
1236
+ "regex": "(?<!mathrm\\s{)dim",
1237
+ "latex": " \\mathrm {dim} "
1238
+ },
1239
+ {
1240
+ "regex": "(?<!mathrm\\s{)Pr",
1241
+ "latex": " \\mathrm {Pr} "
1242
+ }
1243
+ ]
1244
+ }
1245
1245
  }