##// END OF EJS Templates
worjk latex completion and back
Matthias Bussonnier -
Show More
@@ -1,1172 +1,1267 b''
1 # encoding: utf-8
1 # encoding: utf-8
2 """Word completion for IPython.
2 """Word completion for IPython.
3
3
4 This module is a fork of the rlcompleter module in the Python standard
4 This module is a fork of the rlcompleter module in the Python standard
5 library. The original enhancements made to rlcompleter have been sent
5 library. The original enhancements made to rlcompleter have been sent
6 upstream and were accepted as of Python 2.3, but we need a lot more
6 upstream and were accepted as of Python 2.3, but we need a lot more
7 functionality specific to IPython, so this module will continue to live as an
7 functionality specific to IPython, so this module will continue to live as an
8 IPython-specific utility.
8 IPython-specific utility.
9
9
10 Original rlcompleter documentation:
10 Original rlcompleter documentation:
11
11
12 This requires the latest extension to the readline module (the
12 This requires the latest extension to the readline module (the
13 completes keywords, built-ins and globals in __main__; when completing
13 completes keywords, built-ins and globals in __main__; when completing
14 NAME.NAME..., it evaluates (!) the expression up to the last dot and
14 NAME.NAME..., it evaluates (!) the expression up to the last dot and
15 completes its attributes.
15 completes its attributes.
16
16
17 It's very cool to do "import string" type "string.", hit the
17 It's very cool to do "import string" type "string.", hit the
18 completion key (twice), and see the list of names defined by the
18 completion key (twice), and see the list of names defined by the
19 string module!
19 string module!
20
20
21 Tip: to use the tab key as the completion key, call
21 Tip: to use the tab key as the completion key, call
22
22
23 readline.parse_and_bind("tab: complete")
23 readline.parse_and_bind("tab: complete")
24
24
25 Notes:
25 Notes:
26
26
27 - Exceptions raised by the completer function are *ignored* (and
27 - Exceptions raised by the completer function are *ignored* (and
28 generally cause the completion to fail). This is a feature -- since
28 generally cause the completion to fail). This is a feature -- since
29 readline sets the tty device in raw (or cbreak) mode, printing a
29 readline sets the tty device in raw (or cbreak) mode, printing a
30 traceback wouldn't work well without some complicated hoopla to save,
30 traceback wouldn't work well without some complicated hoopla to save,
31 reset and restore the tty state.
31 reset and restore the tty state.
32
32
33 - The evaluation of the NAME.NAME... form may cause arbitrary
33 - The evaluation of the NAME.NAME... form may cause arbitrary
34 application defined code to be executed if an object with a
34 application defined code to be executed if an object with a
35 ``__getattr__`` hook is found. Since it is the responsibility of the
35 ``__getattr__`` hook is found. Since it is the responsibility of the
36 application (or the user) to enable this feature, I consider this an
36 application (or the user) to enable this feature, I consider this an
37 acceptable risk. More complicated expressions (e.g. function calls or
37 acceptable risk. More complicated expressions (e.g. function calls or
38 indexing operations) are *not* evaluated.
38 indexing operations) are *not* evaluated.
39
39
40 - GNU readline is also used by the built-in functions input() and
40 - GNU readline is also used by the built-in functions input() and
41 raw_input(), and thus these also benefit/suffer from the completer
41 raw_input(), and thus these also benefit/suffer from the completer
42 features. Clearly an interactive application can benefit by
42 features. Clearly an interactive application can benefit by
43 specifying its own completer function and using raw_input() for all
43 specifying its own completer function and using raw_input() for all
44 its input.
44 its input.
45
45
46 - When the original stdin is not a tty device, GNU readline is never
46 - When the original stdin is not a tty device, GNU readline is never
47 used, and this module (and the readline module) are silently inactive.
47 used, and this module (and the readline module) are silently inactive.
48 """
48 """
49
49
50 # Copyright (c) IPython Development Team.
50 # Copyright (c) IPython Development Team.
51 # Distributed under the terms of the Modified BSD License.
51 # Distributed under the terms of the Modified BSD License.
52 #
52 #
53 # Some of this code originated from rlcompleter in the Python standard library
53 # Some of this code originated from rlcompleter in the Python standard library
54 # Copyright (C) 2001 Python Software Foundation, www.python.org
54 # Copyright (C) 2001 Python Software Foundation, www.python.org
55
55
56 import __main__
56 import __main__
57 import glob
57 import glob
58 import inspect
58 import inspect
59 import itertools
59 import itertools
60 import keyword
60 import keyword
61 import os
61 import os
62 import re
62 import re
63 import sys
63 import sys
64 import unicodedata
65 import string
64
66
65 from IPython.config.configurable import Configurable
67 from IPython.config.configurable import Configurable
66 from IPython.core.error import TryNext
68 from IPython.core.error import TryNext
67 from IPython.core.inputsplitter import ESC_MAGIC
69 from IPython.core.inputsplitter import ESC_MAGIC
68 from IPython.core.latex_symbols import latex_symbols
70 from IPython.core.latex_symbols import latex_symbols, reverse_latex_symbol
69 from IPython.utils import generics
71 from IPython.utils import generics
70 from IPython.utils import io
72 from IPython.utils import io
71 from IPython.utils.decorators import undoc
73 from IPython.utils.decorators import undoc
72 from IPython.utils.dir2 import dir2
74 from IPython.utils.dir2 import dir2
73 from IPython.utils.process import arg_split
75 from IPython.utils.process import arg_split
74 from IPython.utils.py3compat import builtin_mod, string_types, PY3
76 from IPython.utils.py3compat import builtin_mod, string_types, PY3
75 from IPython.utils.traitlets import CBool, Enum
77 from IPython.utils.traitlets import CBool, Enum
76
78
77 #-----------------------------------------------------------------------------
79 #-----------------------------------------------------------------------------
78 # Globals
80 # Globals
79 #-----------------------------------------------------------------------------
81 #-----------------------------------------------------------------------------
80
82
81 # Public API
83 # Public API
82 __all__ = ['Completer','IPCompleter']
84 __all__ = ['Completer','IPCompleter']
83
85
84 if sys.platform == 'win32':
86 if sys.platform == 'win32':
85 PROTECTABLES = ' '
87 PROTECTABLES = ' '
86 else:
88 else:
87 PROTECTABLES = ' ()[]{}?=\\|;:\'#*"^&'
89 PROTECTABLES = ' ()[]{}?=\\|;:\'#*"^&'
88
90
89
91
90 #-----------------------------------------------------------------------------
92 #-----------------------------------------------------------------------------
91 # Main functions and classes
93 # Main functions and classes
92 #-----------------------------------------------------------------------------
94 #-----------------------------------------------------------------------------
93
95
94 def has_open_quotes(s):
96 def has_open_quotes(s):
95 """Return whether a string has open quotes.
97 """Return whether a string has open quotes.
96
98
97 This simply counts whether the number of quote characters of either type in
99 This simply counts whether the number of quote characters of either type in
98 the string is odd.
100 the string is odd.
99
101
100 Returns
102 Returns
101 -------
103 -------
102 If there is an open quote, the quote character is returned. Else, return
104 If there is an open quote, the quote character is returned. Else, return
103 False.
105 False.
104 """
106 """
105 # We check " first, then ', so complex cases with nested quotes will get
107 # We check " first, then ', so complex cases with nested quotes will get
106 # the " to take precedence.
108 # the " to take precedence.
107 if s.count('"') % 2:
109 if s.count('"') % 2:
108 return '"'
110 return '"'
109 elif s.count("'") % 2:
111 elif s.count("'") % 2:
110 return "'"
112 return "'"
111 else:
113 else:
112 return False
114 return False
113
115
114
116
115 def protect_filename(s):
117 def protect_filename(s):
116 """Escape a string to protect certain characters."""
118 """Escape a string to protect certain characters."""
117
119
118 return "".join([(ch in PROTECTABLES and '\\' + ch or ch)
120 return "".join([(ch in PROTECTABLES and '\\' + ch or ch)
119 for ch in s])
121 for ch in s])
120
122
121 def expand_user(path):
123 def expand_user(path):
122 """Expand '~'-style usernames in strings.
124 """Expand '~'-style usernames in strings.
123
125
124 This is similar to :func:`os.path.expanduser`, but it computes and returns
126 This is similar to :func:`os.path.expanduser`, but it computes and returns
125 extra information that will be useful if the input was being used in
127 extra information that will be useful if the input was being used in
126 computing completions, and you wish to return the completions with the
128 computing completions, and you wish to return the completions with the
127 original '~' instead of its expanded value.
129 original '~' instead of its expanded value.
128
130
129 Parameters
131 Parameters
130 ----------
132 ----------
131 path : str
133 path : str
132 String to be expanded. If no ~ is present, the output is the same as the
134 String to be expanded. If no ~ is present, the output is the same as the
133 input.
135 input.
134
136
135 Returns
137 Returns
136 -------
138 -------
137 newpath : str
139 newpath : str
138 Result of ~ expansion in the input path.
140 Result of ~ expansion in the input path.
139 tilde_expand : bool
141 tilde_expand : bool
140 Whether any expansion was performed or not.
142 Whether any expansion was performed or not.
141 tilde_val : str
143 tilde_val : str
142 The value that ~ was replaced with.
144 The value that ~ was replaced with.
143 """
145 """
144 # Default values
146 # Default values
145 tilde_expand = False
147 tilde_expand = False
146 tilde_val = ''
148 tilde_val = ''
147 newpath = path
149 newpath = path
148
150
149 if path.startswith('~'):
151 if path.startswith('~'):
150 tilde_expand = True
152 tilde_expand = True
151 rest = len(path)-1
153 rest = len(path)-1
152 newpath = os.path.expanduser(path)
154 newpath = os.path.expanduser(path)
153 if rest:
155 if rest:
154 tilde_val = newpath[:-rest]
156 tilde_val = newpath[:-rest]
155 else:
157 else:
156 tilde_val = newpath
158 tilde_val = newpath
157
159
158 return newpath, tilde_expand, tilde_val
160 return newpath, tilde_expand, tilde_val
159
161
160
162
161 def compress_user(path, tilde_expand, tilde_val):
163 def compress_user(path, tilde_expand, tilde_val):
162 """Does the opposite of expand_user, with its outputs.
164 """Does the opposite of expand_user, with its outputs.
163 """
165 """
164 if tilde_expand:
166 if tilde_expand:
165 return path.replace(tilde_val, '~')
167 return path.replace(tilde_val, '~')
166 else:
168 else:
167 return path
169 return path
168
170
169
171
170
172
171 def penalize_magics_key(word):
173 def penalize_magics_key(word):
172 """key for sorting that penalizes magic commands in the ordering
174 """key for sorting that penalizes magic commands in the ordering
173
175
174 Normal words are left alone.
176 Normal words are left alone.
175
177
176 Magic commands have the initial % moved to the end, e.g.
178 Magic commands have the initial % moved to the end, e.g.
177 %matplotlib is transformed as follows:
179 %matplotlib is transformed as follows:
178
180
179 %matplotlib -> matplotlib%
181 %matplotlib -> matplotlib%
180
182
181 [The choice of the final % is arbitrary.]
183 [The choice of the final % is arbitrary.]
182
184
183 Since "matplotlib" < "matplotlib%" as strings,
185 Since "matplotlib" < "matplotlib%" as strings,
184 "timeit" will appear before the magic "%timeit" in the ordering
186 "timeit" will appear before the magic "%timeit" in the ordering
185
187
186 For consistency, move "%%" to the end, so cell magics appear *after*
188 For consistency, move "%%" to the end, so cell magics appear *after*
187 line magics with the same name.
189 line magics with the same name.
188
190
189 A check is performed that there are no other "%" in the string;
191 A check is performed that there are no other "%" in the string;
190 if there are, then the string is not a magic command and is left unchanged.
192 if there are, then the string is not a magic command and is left unchanged.
191
193
192 """
194 """
193
195
194 # Move any % signs from start to end of the key
196 # Move any % signs from start to end of the key
195 # provided there are no others elsewhere in the string
197 # provided there are no others elsewhere in the string
196
198
197 if word[:2] == "%%":
199 if word[:2] == "%%":
198 if not "%" in word[2:]:
200 if not "%" in word[2:]:
199 return word[2:] + "%%"
201 return word[2:] + "%%"
200
202
201 if word[:1] == "%":
203 if word[:1] == "%":
202 if not "%" in word[1:]:
204 if not "%" in word[1:]:
203 return word[1:] + "%"
205 return word[1:] + "%"
204
206
205 return word
207 return word
206
208
207
209
208 @undoc
210 @undoc
209 class Bunch(object): pass
211 class Bunch(object): pass
210
212
211
213
212 DELIMS = ' \t\n`!@#$^&*()=+[{]}\\|;:\'",<>?'
214 DELIMS = ' \t\n`!@#$^&*()=+[{]}\\|;:\'",<>?'
213 GREEDY_DELIMS = ' =\r\n'
215 GREEDY_DELIMS = ' =\r\n'
214
216
215
217
216 class CompletionSplitter(object):
218 class CompletionSplitter(object):
217 """An object to split an input line in a manner similar to readline.
219 """An object to split an input line in a manner similar to readline.
218
220
219 By having our own implementation, we can expose readline-like completion in
221 By having our own implementation, we can expose readline-like completion in
220 a uniform manner to all frontends. This object only needs to be given the
222 a uniform manner to all frontends. This object only needs to be given the
221 line of text to be split and the cursor position on said line, and it
223 line of text to be split and the cursor position on said line, and it
222 returns the 'word' to be completed on at the cursor after splitting the
224 returns the 'word' to be completed on at the cursor after splitting the
223 entire line.
225 entire line.
224
226
225 What characters are used as splitting delimiters can be controlled by
227 What characters are used as splitting delimiters can be controlled by
226 setting the `delims` attribute (this is a property that internally
228 setting the `delims` attribute (this is a property that internally
227 automatically builds the necessary regular expression)"""
229 automatically builds the necessary regular expression)"""
228
230
229 # Private interface
231 # Private interface
230
232
231 # A string of delimiter characters. The default value makes sense for
233 # A string of delimiter characters. The default value makes sense for
232 # IPython's most typical usage patterns.
234 # IPython's most typical usage patterns.
233 _delims = DELIMS
235 _delims = DELIMS
234
236
235 # The expression (a normal string) to be compiled into a regular expression
237 # The expression (a normal string) to be compiled into a regular expression
236 # for actual splitting. We store it as an attribute mostly for ease of
238 # for actual splitting. We store it as an attribute mostly for ease of
237 # debugging, since this type of code can be so tricky to debug.
239 # debugging, since this type of code can be so tricky to debug.
238 _delim_expr = None
240 _delim_expr = None
239
241
240 # The regular expression that does the actual splitting
242 # The regular expression that does the actual splitting
241 _delim_re = None
243 _delim_re = None
242
244
243 def __init__(self, delims=None):
245 def __init__(self, delims=None):
244 delims = CompletionSplitter._delims if delims is None else delims
246 delims = CompletionSplitter._delims if delims is None else delims
245 self.delims = delims
247 self.delims = delims
246
248
247 @property
249 @property
248 def delims(self):
250 def delims(self):
249 """Return the string of delimiter characters."""
251 """Return the string of delimiter characters."""
250 return self._delims
252 return self._delims
251
253
252 @delims.setter
254 @delims.setter
253 def delims(self, delims):
255 def delims(self, delims):
254 """Set the delimiters for line splitting."""
256 """Set the delimiters for line splitting."""
255 expr = '[' + ''.join('\\'+ c for c in delims) + ']'
257 expr = '[' + ''.join('\\'+ c for c in delims) + ']'
256 self._delim_re = re.compile(expr)
258 self._delim_re = re.compile(expr)
257 self._delims = delims
259 self._delims = delims
258 self._delim_expr = expr
260 self._delim_expr = expr
259
261
260 def split_line(self, line, cursor_pos=None):
262 def split_line(self, line, cursor_pos=None):
261 """Split a line of text with a cursor at the given position.
263 """Split a line of text with a cursor at the given position.
262 """
264 """
263 l = line if cursor_pos is None else line[:cursor_pos]
265 l = line if cursor_pos is None else line[:cursor_pos]
264 return self._delim_re.split(l)[-1]
266 return self._delim_re.split(l)[-1]
265
267
266
268
267 class Completer(Configurable):
269 class Completer(Configurable):
268
270
269 greedy = CBool(False, config=True,
271 greedy = CBool(False, config=True,
270 help="""Activate greedy completion
272 help="""Activate greedy completion
271
273
272 This will enable completion on elements of lists, results of function calls, etc.,
274 This will enable completion on elements of lists, results of function calls, etc.,
273 but can be unsafe because the code is actually evaluated on TAB.
275 but can be unsafe because the code is actually evaluated on TAB.
274 """
276 """
275 )
277 )
276
278
277
279
278 def __init__(self, namespace=None, global_namespace=None, **kwargs):
280 def __init__(self, namespace=None, global_namespace=None, **kwargs):
279 """Create a new completer for the command line.
281 """Create a new completer for the command line.
280
282
281 Completer(namespace=ns,global_namespace=ns2) -> completer instance.
283 Completer(namespace=ns,global_namespace=ns2) -> completer instance.
282
284
283 If unspecified, the default namespace where completions are performed
285 If unspecified, the default namespace where completions are performed
284 is __main__ (technically, __main__.__dict__). Namespaces should be
286 is __main__ (technically, __main__.__dict__). Namespaces should be
285 given as dictionaries.
287 given as dictionaries.
286
288
287 An optional second namespace can be given. This allows the completer
289 An optional second namespace can be given. This allows the completer
288 to handle cases where both the local and global scopes need to be
290 to handle cases where both the local and global scopes need to be
289 distinguished.
291 distinguished.
290
292
291 Completer instances should be used as the completion mechanism of
293 Completer instances should be used as the completion mechanism of
292 readline via the set_completer() call:
294 readline via the set_completer() call:
293
295
294 readline.set_completer(Completer(my_namespace).complete)
296 readline.set_completer(Completer(my_namespace).complete)
295 """
297 """
296
298
297 # Don't bind to namespace quite yet, but flag whether the user wants a
299 # Don't bind to namespace quite yet, but flag whether the user wants a
298 # specific namespace or to use __main__.__dict__. This will allow us
300 # specific namespace or to use __main__.__dict__. This will allow us
299 # to bind to __main__.__dict__ at completion time, not now.
301 # to bind to __main__.__dict__ at completion time, not now.
300 if namespace is None:
302 if namespace is None:
301 self.use_main_ns = 1
303 self.use_main_ns = 1
302 else:
304 else:
303 self.use_main_ns = 0
305 self.use_main_ns = 0
304 self.namespace = namespace
306 self.namespace = namespace
305
307
306 # The global namespace, if given, can be bound directly
308 # The global namespace, if given, can be bound directly
307 if global_namespace is None:
309 if global_namespace is None:
308 self.global_namespace = {}
310 self.global_namespace = {}
309 else:
311 else:
310 self.global_namespace = global_namespace
312 self.global_namespace = global_namespace
311
313
312 super(Completer, self).__init__(**kwargs)
314 super(Completer, self).__init__(**kwargs)
313
315
314 def complete(self, text, state):
316 def complete(self, text, state):
315 """Return the next possible completion for 'text'.
317 """Return the next possible completion for 'text'.
316
318
317 This is called successively with state == 0, 1, 2, ... until it
319 This is called successively with state == 0, 1, 2, ... until it
318 returns None. The completion should begin with 'text'.
320 returns None. The completion should begin with 'text'.
319
321
320 """
322 """
321 if self.use_main_ns:
323 if self.use_main_ns:
322 self.namespace = __main__.__dict__
324 self.namespace = __main__.__dict__
323
325
324 if state == 0:
326 if state == 0:
325 if "." in text:
327 if "." in text:
326 self.matches = self.attr_matches(text)
328 self.matches = self.attr_matches(text)
327 else:
329 else:
328 self.matches = self.global_matches(text)
330 self.matches = self.global_matches(text)
329 try:
331 try:
330 return self.matches[state]
332 return self.matches[state]
331 except IndexError:
333 except IndexError:
332 return None
334 return None
333
335
334 def global_matches(self, text):
336 def global_matches(self, text):
335 """Compute matches when text is a simple name.
337 """Compute matches when text is a simple name.
336
338
337 Return a list of all keywords, built-in functions and names currently
339 Return a list of all keywords, built-in functions and names currently
338 defined in self.namespace or self.global_namespace that match.
340 defined in self.namespace or self.global_namespace that match.
339
341
340 """
342 """
341 #print 'Completer->global_matches, txt=%r' % text # dbg
343 #print 'Completer->global_matches, txt=%r' % text # dbg
342 matches = []
344 matches = []
343 match_append = matches.append
345 match_append = matches.append
344 n = len(text)
346 n = len(text)
345 for lst in [keyword.kwlist,
347 for lst in [keyword.kwlist,
346 builtin_mod.__dict__.keys(),
348 builtin_mod.__dict__.keys(),
347 self.namespace.keys(),
349 self.namespace.keys(),
348 self.global_namespace.keys()]:
350 self.global_namespace.keys()]:
349 for word in lst:
351 for word in lst:
350 if word[:n] == text and word != "__builtins__":
352 if word[:n] == text and word != "__builtins__":
351 match_append(word)
353 match_append(word)
352 return matches
354 return matches
353
355
354 def attr_matches(self, text):
356 def attr_matches(self, text):
355 """Compute matches when text contains a dot.
357 """Compute matches when text contains a dot.
356
358
357 Assuming the text is of the form NAME.NAME....[NAME], and is
359 Assuming the text is of the form NAME.NAME....[NAME], and is
358 evaluatable in self.namespace or self.global_namespace, it will be
360 evaluatable in self.namespace or self.global_namespace, it will be
359 evaluated and its attributes (as revealed by dir()) are used as
361 evaluated and its attributes (as revealed by dir()) are used as
360 possible completions. (For class instances, class members are are
362 possible completions. (For class instances, class members are are
361 also considered.)
363 also considered.)
362
364
363 WARNING: this can still invoke arbitrary C code, if an object
365 WARNING: this can still invoke arbitrary C code, if an object
364 with a __getattr__ hook is evaluated.
366 with a __getattr__ hook is evaluated.
365
367
366 """
368 """
367
369
368 #io.rprint('Completer->attr_matches, txt=%r' % text) # dbg
370 #io.rprint('Completer->attr_matches, txt=%r' % text) # dbg
369 # Another option, seems to work great. Catches things like ''.<tab>
371 # Another option, seems to work great. Catches things like ''.<tab>
370 m = re.match(r"(\S+(\.\w+)*)\.(\w*)$", text)
372 m = re.match(r"(\S+(\.\w+)*)\.(\w*)$", text)
371
373
372 if m:
374 if m:
373 expr, attr = m.group(1, 3)
375 expr, attr = m.group(1, 3)
374 elif self.greedy:
376 elif self.greedy:
375 m2 = re.match(r"(.+)\.(\w*)$", self.line_buffer)
377 m2 = re.match(r"(.+)\.(\w*)$", self.line_buffer)
376 if not m2:
378 if not m2:
377 return []
379 return []
378 expr, attr = m2.group(1,2)
380 expr, attr = m2.group(1,2)
379 else:
381 else:
380 return []
382 return []
381
383
382 try:
384 try:
383 obj = eval(expr, self.namespace)
385 obj = eval(expr, self.namespace)
384 except:
386 except:
385 try:
387 try:
386 obj = eval(expr, self.global_namespace)
388 obj = eval(expr, self.global_namespace)
387 except:
389 except:
388 return []
390 return []
389
391
390 if self.limit_to__all__ and hasattr(obj, '__all__'):
392 if self.limit_to__all__ and hasattr(obj, '__all__'):
391 words = get__all__entries(obj)
393 words = get__all__entries(obj)
392 else:
394 else:
393 words = dir2(obj)
395 words = dir2(obj)
394
396
395 try:
397 try:
396 words = generics.complete_object(obj, words)
398 words = generics.complete_object(obj, words)
397 except TryNext:
399 except TryNext:
398 pass
400 pass
399 except Exception:
401 except Exception:
400 # Silence errors from completion function
402 # Silence errors from completion function
401 #raise # dbg
403 #raise # dbg
402 pass
404 pass
403 # Build match list to return
405 # Build match list to return
404 n = len(attr)
406 n = len(attr)
405 res = ["%s.%s" % (expr, w) for w in words if w[:n] == attr ]
407 res = ["%s.%s" % (expr, w) for w in words if w[:n] == attr ]
406 return res
408 return res
407
409
408
410
409 def get__all__entries(obj):
411 def get__all__entries(obj):
410 """returns the strings in the __all__ attribute"""
412 """returns the strings in the __all__ attribute"""
411 try:
413 try:
412 words = getattr(obj, '__all__')
414 words = getattr(obj, '__all__')
413 except:
415 except:
414 return []
416 return []
415
417
416 return [w for w in words if isinstance(w, string_types)]
418 return [w for w in words if isinstance(w, string_types)]
417
419
418
420
419 def match_dict_keys(keys, prefix):
421 def match_dict_keys(keys, prefix):
420 """Used by dict_key_matches, matching the prefix to a list of keys"""
422 """Used by dict_key_matches, matching the prefix to a list of keys"""
421 if not prefix:
423 if not prefix:
422 return None, 0, [repr(k) for k in keys
424 return None, 0, [repr(k) for k in keys
423 if isinstance(k, (string_types, bytes))]
425 if isinstance(k, (string_types, bytes))]
424 quote_match = re.search('["\']', prefix)
426 quote_match = re.search('["\']', prefix)
425 quote = quote_match.group()
427 quote = quote_match.group()
426 try:
428 try:
427 prefix_str = eval(prefix + quote, {})
429 prefix_str = eval(prefix + quote, {})
428 except Exception:
430 except Exception:
429 return None, 0, []
431 return None, 0, []
430
432
431 token_match = re.search(r'\w*$', prefix, re.UNICODE)
433 token_match = re.search(r'\w*$', prefix, re.UNICODE)
432 token_start = token_match.start()
434 token_start = token_match.start()
433 token_prefix = token_match.group()
435 token_prefix = token_match.group()
434
436
435 # TODO: support bytes in Py3k
437 # TODO: support bytes in Py3k
436 matched = []
438 matched = []
437 for key in keys:
439 for key in keys:
438 try:
440 try:
439 if not key.startswith(prefix_str):
441 if not key.startswith(prefix_str):
440 continue
442 continue
441 except (AttributeError, TypeError, UnicodeError):
443 except (AttributeError, TypeError, UnicodeError):
442 # Python 3+ TypeError on b'a'.startswith('a') or vice-versa
444 # Python 3+ TypeError on b'a'.startswith('a') or vice-versa
443 continue
445 continue
444
446
445 # reformat remainder of key to begin with prefix
447 # reformat remainder of key to begin with prefix
446 rem = key[len(prefix_str):]
448 rem = key[len(prefix_str):]
447 # force repr wrapped in '
449 # force repr wrapped in '
448 rem_repr = repr(rem + '"')
450 rem_repr = repr(rem + '"')
449 if rem_repr.startswith('u') and prefix[0] not in 'uU':
451 if rem_repr.startswith('u') and prefix[0] not in 'uU':
450 # Found key is unicode, but prefix is Py2 string.
452 # Found key is unicode, but prefix is Py2 string.
451 # Therefore attempt to interpret key as string.
453 # Therefore attempt to interpret key as string.
452 try:
454 try:
453 rem_repr = repr(rem.encode('ascii') + '"')
455 rem_repr = repr(rem.encode('ascii') + '"')
454 except UnicodeEncodeError:
456 except UnicodeEncodeError:
455 continue
457 continue
456
458
457 rem_repr = rem_repr[1 + rem_repr.index("'"):-2]
459 rem_repr = rem_repr[1 + rem_repr.index("'"):-2]
458 if quote == '"':
460 if quote == '"':
459 # The entered prefix is quoted with ",
461 # The entered prefix is quoted with ",
460 # but the match is quoted with '.
462 # but the match is quoted with '.
461 # A contained " hence needs escaping for comparison:
463 # A contained " hence needs escaping for comparison:
462 rem_repr = rem_repr.replace('"', '\\"')
464 rem_repr = rem_repr.replace('"', '\\"')
463
465
464 # then reinsert prefix from start of token
466 # then reinsert prefix from start of token
465 matched.append('%s%s' % (token_prefix, rem_repr))
467 matched.append('%s%s' % (token_prefix, rem_repr))
466 return quote, token_start, matched
468 return quote, token_start, matched
467
469
468
470
469 def _safe_isinstance(obj, module, class_name):
471 def _safe_isinstance(obj, module, class_name):
470 """Checks if obj is an instance of module.class_name if loaded
472 """Checks if obj is an instance of module.class_name if loaded
471 """
473 """
472 return (module in sys.modules and
474 return (module in sys.modules and
473 isinstance(obj, getattr(__import__(module), class_name)))
475 isinstance(obj, getattr(__import__(module), class_name)))
474
476
475
477
476
478
477 class IPCompleter(Completer):
479 class IPCompleter(Completer):
478 """Extension of the completer class with IPython-specific features"""
480 """Extension of the completer class with IPython-specific features"""
479
481
480 def _greedy_changed(self, name, old, new):
482 def _greedy_changed(self, name, old, new):
481 """update the splitter and readline delims when greedy is changed"""
483 """update the splitter and readline delims when greedy is changed"""
482 if new:
484 if new:
483 self.splitter.delims = GREEDY_DELIMS
485 self.splitter.delims = GREEDY_DELIMS
484 else:
486 else:
485 self.splitter.delims = DELIMS
487 self.splitter.delims = DELIMS
486
488
487 if self.readline:
489 if self.readline:
488 self.readline.set_completer_delims(self.splitter.delims)
490 self.readline.set_completer_delims(self.splitter.delims)
489
491
490 merge_completions = CBool(True, config=True,
492 merge_completions = CBool(True, config=True,
491 help="""Whether to merge completion results into a single list
493 help="""Whether to merge completion results into a single list
492
494
493 If False, only the completion results from the first non-empty
495 If False, only the completion results from the first non-empty
494 completer will be returned.
496 completer will be returned.
495 """
497 """
496 )
498 )
497 omit__names = Enum((0,1,2), default_value=2, config=True,
499 omit__names = Enum((0,1,2), default_value=2, config=True,
498 help="""Instruct the completer to omit private method names
500 help="""Instruct the completer to omit private method names
499
501
500 Specifically, when completing on ``object.<tab>``.
502 Specifically, when completing on ``object.<tab>``.
501
503
502 When 2 [default]: all names that start with '_' will be excluded.
504 When 2 [default]: all names that start with '_' will be excluded.
503
505
504 When 1: all 'magic' names (``__foo__``) will be excluded.
506 When 1: all 'magic' names (``__foo__``) will be excluded.
505
507
506 When 0: nothing will be excluded.
508 When 0: nothing will be excluded.
507 """
509 """
508 )
510 )
509 limit_to__all__ = CBool(default_value=False, config=True,
511 limit_to__all__ = CBool(default_value=False, config=True,
510 help="""Instruct the completer to use __all__ for the completion
512 help="""Instruct the completer to use __all__ for the completion
511
513
512 Specifically, when completing on ``object.<tab>``.
514 Specifically, when completing on ``object.<tab>``.
513
515
514 When True: only those names in obj.__all__ will be included.
516 When True: only those names in obj.__all__ will be included.
515
517
516 When False [default]: the __all__ attribute is ignored
518 When False [default]: the __all__ attribute is ignored
517 """
519 """
518 )
520 )
519
521
520 def __init__(self, shell=None, namespace=None, global_namespace=None,
522 def __init__(self, shell=None, namespace=None, global_namespace=None,
521 use_readline=True, config=None, **kwargs):
523 use_readline=True, config=None, **kwargs):
522 """IPCompleter() -> completer
524 """IPCompleter() -> completer
523
525
524 Return a completer object suitable for use by the readline library
526 Return a completer object suitable for use by the readline library
525 via readline.set_completer().
527 via readline.set_completer().
526
528
527 Inputs:
529 Inputs:
528
530
529 - shell: a pointer to the ipython shell itself. This is needed
531 - shell: a pointer to the ipython shell itself. This is needed
530 because this completer knows about magic functions, and those can
532 because this completer knows about magic functions, and those can
531 only be accessed via the ipython instance.
533 only be accessed via the ipython instance.
532
534
533 - namespace: an optional dict where completions are performed.
535 - namespace: an optional dict where completions are performed.
534
536
535 - global_namespace: secondary optional dict for completions, to
537 - global_namespace: secondary optional dict for completions, to
536 handle cases (such as IPython embedded inside functions) where
538 handle cases (such as IPython embedded inside functions) where
537 both Python scopes are visible.
539 both Python scopes are visible.
538
540
539 use_readline : bool, optional
541 use_readline : bool, optional
540 If true, use the readline library. This completer can still function
542 If true, use the readline library. This completer can still function
541 without readline, though in that case callers must provide some extra
543 without readline, though in that case callers must provide some extra
542 information on each call about the current line."""
544 information on each call about the current line."""
543
545
544 self.magic_escape = ESC_MAGIC
546 self.magic_escape = ESC_MAGIC
545 self.splitter = CompletionSplitter()
547 self.splitter = CompletionSplitter()
546
548
547 # Readline configuration, only used by the rlcompleter method.
549 # Readline configuration, only used by the rlcompleter method.
548 if use_readline:
550 if use_readline:
549 # We store the right version of readline so that later code
551 # We store the right version of readline so that later code
550 import IPython.utils.rlineimpl as readline
552 import IPython.utils.rlineimpl as readline
551 self.readline = readline
553 self.readline = readline
552 else:
554 else:
553 self.readline = None
555 self.readline = None
554
556
555 # _greedy_changed() depends on splitter and readline being defined:
557 # _greedy_changed() depends on splitter and readline being defined:
556 Completer.__init__(self, namespace=namespace, global_namespace=global_namespace,
558 Completer.__init__(self, namespace=namespace, global_namespace=global_namespace,
557 config=config, **kwargs)
559 config=config, **kwargs)
558
560
559 # List where completion matches will be stored
561 # List where completion matches will be stored
560 self.matches = []
562 self.matches = []
561 self.shell = shell
563 self.shell = shell
562 # Regexp to split filenames with spaces in them
564 # Regexp to split filenames with spaces in them
563 self.space_name_re = re.compile(r'([^\\] )')
565 self.space_name_re = re.compile(r'([^\\] )')
564 # Hold a local ref. to glob.glob for speed
566 # Hold a local ref. to glob.glob for speed
565 self.glob = glob.glob
567 self.glob = glob.glob
566
568
567 # Determine if we are running on 'dumb' terminals, like (X)Emacs
569 # Determine if we are running on 'dumb' terminals, like (X)Emacs
568 # buffers, to avoid completion problems.
570 # buffers, to avoid completion problems.
569 term = os.environ.get('TERM','xterm')
571 term = os.environ.get('TERM','xterm')
570 self.dumb_terminal = term in ['dumb','emacs']
572 self.dumb_terminal = term in ['dumb','emacs']
571
573
572 # Special handling of backslashes needed in win32 platforms
574 # Special handling of backslashes needed in win32 platforms
573 if sys.platform == "win32":
575 if sys.platform == "win32":
574 self.clean_glob = self._clean_glob_win32
576 self.clean_glob = self._clean_glob_win32
575 else:
577 else:
576 self.clean_glob = self._clean_glob
578 self.clean_glob = self._clean_glob
577
579
578 #regexp to parse docstring for function signature
580 #regexp to parse docstring for function signature
579 self.docstring_sig_re = re.compile(r'^[\w|\s.]+\(([^)]*)\).*')
581 self.docstring_sig_re = re.compile(r'^[\w|\s.]+\(([^)]*)\).*')
580 self.docstring_kwd_re = re.compile(r'[\s|\[]*(\w+)(?:\s*=\s*.*)')
582 self.docstring_kwd_re = re.compile(r'[\s|\[]*(\w+)(?:\s*=\s*.*)')
581 #use this if positional argument name is also needed
583 #use this if positional argument name is also needed
582 #= re.compile(r'[\s|\[]*(\w+)(?:\s*=?\s*.*)')
584 #= re.compile(r'[\s|\[]*(\w+)(?:\s*=?\s*.*)')
583
585
584 # All active matcher routines for completion
586 # All active matcher routines for completion
585 self.matchers = [self.python_matches,
587 self.matchers = [self.python_matches,
586 self.file_matches,
588 self.file_matches,
587 self.magic_matches,
589 self.magic_matches,
588 self.python_func_kw_matches,
590 self.python_func_kw_matches,
589 self.dict_key_matches,
591 self.dict_key_matches,
590 ]
592 ]
591
593
592 def all_completions(self, text):
594 def all_completions(self, text):
593 """
595 """
594 Wrapper around the complete method for the benefit of emacs
596 Wrapper around the complete method for the benefit of emacs
595 and pydb.
597 and pydb.
596 """
598 """
597 return self.complete(text)[1]
599 return self.complete(text)[1]
598
600
599 def _clean_glob(self,text):
601 def _clean_glob(self,text):
600 return self.glob("%s*" % text)
602 return self.glob("%s*" % text)
601
603
602 def _clean_glob_win32(self,text):
604 def _clean_glob_win32(self,text):
603 return [f.replace("\\","/")
605 return [f.replace("\\","/")
604 for f in self.glob("%s*" % text)]
606 for f in self.glob("%s*" % text)]
605
607
606 def file_matches(self, text):
608 def file_matches(self, text):
607 """Match filenames, expanding ~USER type strings.
609 """Match filenames, expanding ~USER type strings.
608
610
609 Most of the seemingly convoluted logic in this completer is an
611 Most of the seemingly convoluted logic in this completer is an
610 attempt to handle filenames with spaces in them. And yet it's not
612 attempt to handle filenames with spaces in them. And yet it's not
611 quite perfect, because Python's readline doesn't expose all of the
613 quite perfect, because Python's readline doesn't expose all of the
612 GNU readline details needed for this to be done correctly.
614 GNU readline details needed for this to be done correctly.
613
615
614 For a filename with a space in it, the printed completions will be
616 For a filename with a space in it, the printed completions will be
615 only the parts after what's already been typed (instead of the
617 only the parts after what's already been typed (instead of the
616 full completions, as is normally done). I don't think with the
618 full completions, as is normally done). I don't think with the
617 current (as of Python 2.3) Python readline it's possible to do
619 current (as of Python 2.3) Python readline it's possible to do
618 better."""
620 better."""
619
621
620 #io.rprint('Completer->file_matches: <%r>' % text) # dbg
622 #io.rprint('Completer->file_matches: <%r>' % text) # dbg
621
623
622 # chars that require escaping with backslash - i.e. chars
624 # chars that require escaping with backslash - i.e. chars
623 # that readline treats incorrectly as delimiters, but we
625 # that readline treats incorrectly as delimiters, but we
624 # don't want to treat as delimiters in filename matching
626 # don't want to treat as delimiters in filename matching
625 # when escaped with backslash
627 # when escaped with backslash
626 if text.startswith('!'):
628 if text.startswith('!'):
627 text = text[1:]
629 text = text[1:]
628 text_prefix = '!'
630 text_prefix = '!'
629 else:
631 else:
630 text_prefix = ''
632 text_prefix = ''
631
633
632 text_until_cursor = self.text_until_cursor
634 text_until_cursor = self.text_until_cursor
633 # track strings with open quotes
635 # track strings with open quotes
634 open_quotes = has_open_quotes(text_until_cursor)
636 open_quotes = has_open_quotes(text_until_cursor)
635
637
636 if '(' in text_until_cursor or '[' in text_until_cursor:
638 if '(' in text_until_cursor or '[' in text_until_cursor:
637 lsplit = text
639 lsplit = text
638 else:
640 else:
639 try:
641 try:
640 # arg_split ~ shlex.split, but with unicode bugs fixed by us
642 # arg_split ~ shlex.split, but with unicode bugs fixed by us
641 lsplit = arg_split(text_until_cursor)[-1]
643 lsplit = arg_split(text_until_cursor)[-1]
642 except ValueError:
644 except ValueError:
643 # typically an unmatched ", or backslash without escaped char.
645 # typically an unmatched ", or backslash without escaped char.
644 if open_quotes:
646 if open_quotes:
645 lsplit = text_until_cursor.split(open_quotes)[-1]
647 lsplit = text_until_cursor.split(open_quotes)[-1]
646 else:
648 else:
647 return []
649 return []
648 except IndexError:
650 except IndexError:
649 # tab pressed on empty line
651 # tab pressed on empty line
650 lsplit = ""
652 lsplit = ""
651
653
652 if not open_quotes and lsplit != protect_filename(lsplit):
654 if not open_quotes and lsplit != protect_filename(lsplit):
653 # if protectables are found, do matching on the whole escaped name
655 # if protectables are found, do matching on the whole escaped name
654 has_protectables = True
656 has_protectables = True
655 text0,text = text,lsplit
657 text0,text = text,lsplit
656 else:
658 else:
657 has_protectables = False
659 has_protectables = False
658 text = os.path.expanduser(text)
660 text = os.path.expanduser(text)
659
661
660 if text == "":
662 if text == "":
661 return [text_prefix + protect_filename(f) for f in self.glob("*")]
663 return [text_prefix + protect_filename(f) for f in self.glob("*")]
662
664
663 # Compute the matches from the filesystem
665 # Compute the matches from the filesystem
664 m0 = self.clean_glob(text.replace('\\',''))
666 m0 = self.clean_glob(text.replace('\\',''))
665
667
666 if has_protectables:
668 if has_protectables:
667 # If we had protectables, we need to revert our changes to the
669 # If we had protectables, we need to revert our changes to the
668 # beginning of filename so that we don't double-write the part
670 # beginning of filename so that we don't double-write the part
669 # of the filename we have so far
671 # of the filename we have so far
670 len_lsplit = len(lsplit)
672 len_lsplit = len(lsplit)
671 matches = [text_prefix + text0 +
673 matches = [text_prefix + text0 +
672 protect_filename(f[len_lsplit:]) for f in m0]
674 protect_filename(f[len_lsplit:]) for f in m0]
673 else:
675 else:
674 if open_quotes:
676 if open_quotes:
675 # if we have a string with an open quote, we don't need to
677 # if we have a string with an open quote, we don't need to
676 # protect the names at all (and we _shouldn't_, as it
678 # protect the names at all (and we _shouldn't_, as it
677 # would cause bugs when the filesystem call is made).
679 # would cause bugs when the filesystem call is made).
678 matches = m0
680 matches = m0
679 else:
681 else:
680 matches = [text_prefix +
682 matches = [text_prefix +
681 protect_filename(f) for f in m0]
683 protect_filename(f) for f in m0]
682
684
683 #io.rprint('mm', matches) # dbg
685 #io.rprint('mm', matches) # dbg
684
686
685 # Mark directories in input list by appending '/' to their names.
687 # Mark directories in input list by appending '/' to their names.
686 matches = [x+'/' if os.path.isdir(x) else x for x in matches]
688 matches = [x+'/' if os.path.isdir(x) else x for x in matches]
687 return matches
689 return matches
688
690
689 def magic_matches(self, text):
691 def magic_matches(self, text):
690 """Match magics"""
692 """Match magics"""
691 #print 'Completer->magic_matches:',text,'lb',self.text_until_cursor # dbg
693 #print 'Completer->magic_matches:',text,'lb',self.text_until_cursor # dbg
692 # Get all shell magics now rather than statically, so magics loaded at
694 # Get all shell magics now rather than statically, so magics loaded at
693 # runtime show up too.
695 # runtime show up too.
694 lsm = self.shell.magics_manager.lsmagic()
696 lsm = self.shell.magics_manager.lsmagic()
695 line_magics = lsm['line']
697 line_magics = lsm['line']
696 cell_magics = lsm['cell']
698 cell_magics = lsm['cell']
697 pre = self.magic_escape
699 pre = self.magic_escape
698 pre2 = pre+pre
700 pre2 = pre+pre
699
701
700 # Completion logic:
702 # Completion logic:
701 # - user gives %%: only do cell magics
703 # - user gives %%: only do cell magics
702 # - user gives %: do both line and cell magics
704 # - user gives %: do both line and cell magics
703 # - no prefix: do both
705 # - no prefix: do both
704 # In other words, line magics are skipped if the user gives %% explicitly
706 # In other words, line magics are skipped if the user gives %% explicitly
705 bare_text = text.lstrip(pre)
707 bare_text = text.lstrip(pre)
706 comp = [ pre2+m for m in cell_magics if m.startswith(bare_text)]
708 comp = [ pre2+m for m in cell_magics if m.startswith(bare_text)]
707 if not text.startswith(pre2):
709 if not text.startswith(pre2):
708 comp += [ pre+m for m in line_magics if m.startswith(bare_text)]
710 comp += [ pre+m for m in line_magics if m.startswith(bare_text)]
709 return comp
711 return comp
710
712
711 def python_matches(self,text):
713 def python_matches(self,text):
712 """Match attributes or global python names"""
714 """Match attributes or global python names"""
713
715
714 #io.rprint('Completer->python_matches, txt=%r' % text) # dbg
716 #io.rprint('Completer->python_matches, txt=%r' % text) # dbg
715 if "." in text:
717 if "." in text:
716 try:
718 try:
717 matches = self.attr_matches(text)
719 matches = self.attr_matches(text)
718 if text.endswith('.') and self.omit__names:
720 if text.endswith('.') and self.omit__names:
719 if self.omit__names == 1:
721 if self.omit__names == 1:
720 # true if txt is _not_ a __ name, false otherwise:
722 # true if txt is _not_ a __ name, false otherwise:
721 no__name = (lambda txt:
723 no__name = (lambda txt:
722 re.match(r'.*\.__.*?__',txt) is None)
724 re.match(r'.*\.__.*?__',txt) is None)
723 else:
725 else:
724 # true if txt is _not_ a _ name, false otherwise:
726 # true if txt is _not_ a _ name, false otherwise:
725 no__name = (lambda txt:
727 no__name = (lambda txt:
726 re.match(r'\._.*?',txt[txt.rindex('.'):]) is None)
728 re.match(r'\._.*?',txt[txt.rindex('.'):]) is None)
727 matches = filter(no__name, matches)
729 matches = filter(no__name, matches)
728 except NameError:
730 except NameError:
729 # catches <undefined attributes>.<tab>
731 # catches <undefined attributes>.<tab>
730 matches = []
732 matches = []
731 else:
733 else:
732 matches = self.global_matches(text)
734 matches = self.global_matches(text)
733
735
734 return matches
736 return matches
735
737
736 def _default_arguments_from_docstring(self, doc):
738 def _default_arguments_from_docstring(self, doc):
737 """Parse the first line of docstring for call signature.
739 """Parse the first line of docstring for call signature.
738
740
739 Docstring should be of the form 'min(iterable[, key=func])\n'.
741 Docstring should be of the form 'min(iterable[, key=func])\n'.
740 It can also parse cython docstring of the form
742 It can also parse cython docstring of the form
741 'Minuit.migrad(self, int ncall=10000, resume=True, int nsplit=1)'.
743 'Minuit.migrad(self, int ncall=10000, resume=True, int nsplit=1)'.
742 """
744 """
743 if doc is None:
745 if doc is None:
744 return []
746 return []
745
747
746 #care only the firstline
748 #care only the firstline
747 line = doc.lstrip().splitlines()[0]
749 line = doc.lstrip().splitlines()[0]
748
750
749 #p = re.compile(r'^[\w|\s.]+\(([^)]*)\).*')
751 #p = re.compile(r'^[\w|\s.]+\(([^)]*)\).*')
750 #'min(iterable[, key=func])\n' -> 'iterable[, key=func]'
752 #'min(iterable[, key=func])\n' -> 'iterable[, key=func]'
751 sig = self.docstring_sig_re.search(line)
753 sig = self.docstring_sig_re.search(line)
752 if sig is None:
754 if sig is None:
753 return []
755 return []
754 # iterable[, key=func]' -> ['iterable[' ,' key=func]']
756 # iterable[, key=func]' -> ['iterable[' ,' key=func]']
755 sig = sig.groups()[0].split(',')
757 sig = sig.groups()[0].split(',')
756 ret = []
758 ret = []
757 for s in sig:
759 for s in sig:
758 #re.compile(r'[\s|\[]*(\w+)(?:\s*=\s*.*)')
760 #re.compile(r'[\s|\[]*(\w+)(?:\s*=\s*.*)')
759 ret += self.docstring_kwd_re.findall(s)
761 ret += self.docstring_kwd_re.findall(s)
760 return ret
762 return ret
761
763
762 def _default_arguments(self, obj):
764 def _default_arguments(self, obj):
763 """Return the list of default arguments of obj if it is callable,
765 """Return the list of default arguments of obj if it is callable,
764 or empty list otherwise."""
766 or empty list otherwise."""
765 call_obj = obj
767 call_obj = obj
766 ret = []
768 ret = []
767 if inspect.isbuiltin(obj):
769 if inspect.isbuiltin(obj):
768 pass
770 pass
769 elif not (inspect.isfunction(obj) or inspect.ismethod(obj)):
771 elif not (inspect.isfunction(obj) or inspect.ismethod(obj)):
770 if inspect.isclass(obj):
772 if inspect.isclass(obj):
771 #for cython embededsignature=True the constructor docstring
773 #for cython embededsignature=True the constructor docstring
772 #belongs to the object itself not __init__
774 #belongs to the object itself not __init__
773 ret += self._default_arguments_from_docstring(
775 ret += self._default_arguments_from_docstring(
774 getattr(obj, '__doc__', ''))
776 getattr(obj, '__doc__', ''))
775 # for classes, check for __init__,__new__
777 # for classes, check for __init__,__new__
776 call_obj = (getattr(obj, '__init__', None) or
778 call_obj = (getattr(obj, '__init__', None) or
777 getattr(obj, '__new__', None))
779 getattr(obj, '__new__', None))
778 # for all others, check if they are __call__able
780 # for all others, check if they are __call__able
779 elif hasattr(obj, '__call__'):
781 elif hasattr(obj, '__call__'):
780 call_obj = obj.__call__
782 call_obj = obj.__call__
781
783
782 ret += self._default_arguments_from_docstring(
784 ret += self._default_arguments_from_docstring(
783 getattr(call_obj, '__doc__', ''))
785 getattr(call_obj, '__doc__', ''))
784
786
785 try:
787 try:
786 args,_,_1,defaults = inspect.getargspec(call_obj)
788 args,_,_1,defaults = inspect.getargspec(call_obj)
787 if defaults:
789 if defaults:
788 ret+=args[-len(defaults):]
790 ret+=args[-len(defaults):]
789 except TypeError:
791 except TypeError:
790 pass
792 pass
791
793
792 return list(set(ret))
794 return list(set(ret))
793
795
794 def python_func_kw_matches(self,text):
796 def python_func_kw_matches(self,text):
795 """Match named parameters (kwargs) of the last open function"""
797 """Match named parameters (kwargs) of the last open function"""
796
798
797 if "." in text: # a parameter cannot be dotted
799 if "." in text: # a parameter cannot be dotted
798 return []
800 return []
799 try: regexp = self.__funcParamsRegex
801 try: regexp = self.__funcParamsRegex
800 except AttributeError:
802 except AttributeError:
801 regexp = self.__funcParamsRegex = re.compile(r'''
803 regexp = self.__funcParamsRegex = re.compile(r'''
802 '.*?(?<!\\)' | # single quoted strings or
804 '.*?(?<!\\)' | # single quoted strings or
803 ".*?(?<!\\)" | # double quoted strings or
805 ".*?(?<!\\)" | # double quoted strings or
804 \w+ | # identifier
806 \w+ | # identifier
805 \S # other characters
807 \S # other characters
806 ''', re.VERBOSE | re.DOTALL)
808 ''', re.VERBOSE | re.DOTALL)
807 # 1. find the nearest identifier that comes before an unclosed
809 # 1. find the nearest identifier that comes before an unclosed
808 # parenthesis before the cursor
810 # parenthesis before the cursor
809 # e.g. for "foo (1+bar(x), pa<cursor>,a=1)", the candidate is "foo"
811 # e.g. for "foo (1+bar(x), pa<cursor>,a=1)", the candidate is "foo"
810 tokens = regexp.findall(self.text_until_cursor)
812 tokens = regexp.findall(self.text_until_cursor)
811 tokens.reverse()
813 tokens.reverse()
812 iterTokens = iter(tokens); openPar = 0
814 iterTokens = iter(tokens); openPar = 0
813
815
814 for token in iterTokens:
816 for token in iterTokens:
815 if token == ')':
817 if token == ')':
816 openPar -= 1
818 openPar -= 1
817 elif token == '(':
819 elif token == '(':
818 openPar += 1
820 openPar += 1
819 if openPar > 0:
821 if openPar > 0:
820 # found the last unclosed parenthesis
822 # found the last unclosed parenthesis
821 break
823 break
822 else:
824 else:
823 return []
825 return []
824 # 2. Concatenate dotted names ("foo.bar" for "foo.bar(x, pa" )
826 # 2. Concatenate dotted names ("foo.bar" for "foo.bar(x, pa" )
825 ids = []
827 ids = []
826 isId = re.compile(r'\w+$').match
828 isId = re.compile(r'\w+$').match
827
829
828 while True:
830 while True:
829 try:
831 try:
830 ids.append(next(iterTokens))
832 ids.append(next(iterTokens))
831 if not isId(ids[-1]):
833 if not isId(ids[-1]):
832 ids.pop(); break
834 ids.pop(); break
833 if not next(iterTokens) == '.':
835 if not next(iterTokens) == '.':
834 break
836 break
835 except StopIteration:
837 except StopIteration:
836 break
838 break
837 # lookup the candidate callable matches either using global_matches
839 # lookup the candidate callable matches either using global_matches
838 # or attr_matches for dotted names
840 # or attr_matches for dotted names
839 if len(ids) == 1:
841 if len(ids) == 1:
840 callableMatches = self.global_matches(ids[0])
842 callableMatches = self.global_matches(ids[0])
841 else:
843 else:
842 callableMatches = self.attr_matches('.'.join(ids[::-1]))
844 callableMatches = self.attr_matches('.'.join(ids[::-1]))
843 argMatches = []
845 argMatches = []
844 for callableMatch in callableMatches:
846 for callableMatch in callableMatches:
845 try:
847 try:
846 namedArgs = self._default_arguments(eval(callableMatch,
848 namedArgs = self._default_arguments(eval(callableMatch,
847 self.namespace))
849 self.namespace))
848 except:
850 except:
849 continue
851 continue
850
852
851 for namedArg in namedArgs:
853 for namedArg in namedArgs:
852 if namedArg.startswith(text):
854 if namedArg.startswith(text):
853 argMatches.append("%s=" %namedArg)
855 argMatches.append("%s=" %namedArg)
854 return argMatches
856 return argMatches
855
857
856 def dict_key_matches(self, text):
858 def dict_key_matches(self, text):
857 "Match string keys in a dictionary, after e.g. 'foo[' "
859 "Match string keys in a dictionary, after e.g. 'foo[' "
858 def get_keys(obj):
860 def get_keys(obj):
859 # Only allow completion for known in-memory dict-like types
861 # Only allow completion for known in-memory dict-like types
860 if isinstance(obj, dict) or\
862 if isinstance(obj, dict) or\
861 _safe_isinstance(obj, 'pandas', 'DataFrame'):
863 _safe_isinstance(obj, 'pandas', 'DataFrame'):
862 try:
864 try:
863 return list(obj.keys())
865 return list(obj.keys())
864 except Exception:
866 except Exception:
865 return []
867 return []
866 elif _safe_isinstance(obj, 'numpy', 'ndarray') or\
868 elif _safe_isinstance(obj, 'numpy', 'ndarray') or\
867 _safe_isinstance(obj, 'numpy', 'void'):
869 _safe_isinstance(obj, 'numpy', 'void'):
868 return obj.dtype.names or []
870 return obj.dtype.names or []
869 return []
871 return []
870
872
871 try:
873 try:
872 regexps = self.__dict_key_regexps
874 regexps = self.__dict_key_regexps
873 except AttributeError:
875 except AttributeError:
874 dict_key_re_fmt = r'''(?x)
876 dict_key_re_fmt = r'''(?x)
875 ( # match dict-referring expression wrt greedy setting
877 ( # match dict-referring expression wrt greedy setting
876 %s
878 %s
877 )
879 )
878 \[ # open bracket
880 \[ # open bracket
879 \s* # and optional whitespace
881 \s* # and optional whitespace
880 ([uUbB]? # string prefix (r not handled)
882 ([uUbB]? # string prefix (r not handled)
881 (?: # unclosed string
883 (?: # unclosed string
882 '(?:[^']|(?<!\\)\\')*
884 '(?:[^']|(?<!\\)\\')*
883 |
885 |
884 "(?:[^"]|(?<!\\)\\")*
886 "(?:[^"]|(?<!\\)\\")*
885 )
887 )
886 )?
888 )?
887 $
889 $
888 '''
890 '''
889 regexps = self.__dict_key_regexps = {
891 regexps = self.__dict_key_regexps = {
890 False: re.compile(dict_key_re_fmt % '''
892 False: re.compile(dict_key_re_fmt % '''
891 # identifiers separated by .
893 # identifiers separated by .
892 (?!\d)\w+
894 (?!\d)\w+
893 (?:\.(?!\d)\w+)*
895 (?:\.(?!\d)\w+)*
894 '''),
896 '''),
895 True: re.compile(dict_key_re_fmt % '''
897 True: re.compile(dict_key_re_fmt % '''
896 .+
898 .+
897 ''')
899 ''')
898 }
900 }
899
901
900 match = regexps[self.greedy].search(self.text_until_cursor)
902 match = regexps[self.greedy].search(self.text_until_cursor)
901 if match is None:
903 if match is None:
902 return []
904 return []
903
905
904 expr, prefix = match.groups()
906 expr, prefix = match.groups()
905 try:
907 try:
906 obj = eval(expr, self.namespace)
908 obj = eval(expr, self.namespace)
907 except Exception:
909 except Exception:
908 try:
910 try:
909 obj = eval(expr, self.global_namespace)
911 obj = eval(expr, self.global_namespace)
910 except Exception:
912 except Exception:
911 return []
913 return []
912
914
913 keys = get_keys(obj)
915 keys = get_keys(obj)
914 if not keys:
916 if not keys:
915 return keys
917 return keys
916 closing_quote, token_offset, matches = match_dict_keys(keys, prefix)
918 closing_quote, token_offset, matches = match_dict_keys(keys, prefix)
917 if not matches:
919 if not matches:
918 return matches
920 return matches
919
921
920 # get the cursor position of
922 # get the cursor position of
921 # - the text being completed
923 # - the text being completed
922 # - the start of the key text
924 # - the start of the key text
923 # - the start of the completion
925 # - the start of the completion
924 text_start = len(self.text_until_cursor) - len(text)
926 text_start = len(self.text_until_cursor) - len(text)
925 if prefix:
927 if prefix:
926 key_start = match.start(2)
928 key_start = match.start(2)
927 completion_start = key_start + token_offset
929 completion_start = key_start + token_offset
928 else:
930 else:
929 key_start = completion_start = match.end()
931 key_start = completion_start = match.end()
930
932
931 # grab the leading prefix, to make sure all completions start with `text`
933 # grab the leading prefix, to make sure all completions start with `text`
932 if text_start > key_start:
934 if text_start > key_start:
933 leading = ''
935 leading = ''
934 else:
936 else:
935 leading = text[text_start:completion_start]
937 leading = text[text_start:completion_start]
936
938
937 # the index of the `[` character
939 # the index of the `[` character
938 bracket_idx = match.end(1)
940 bracket_idx = match.end(1)
939
941
940 # append closing quote and bracket as appropriate
942 # append closing quote and bracket as appropriate
941 # this is *not* appropriate if the opening quote or bracket is outside
943 # this is *not* appropriate if the opening quote or bracket is outside
942 # the text given to this method
944 # the text given to this method
943 suf = ''
945 suf = ''
944 continuation = self.line_buffer[len(self.text_until_cursor):]
946 continuation = self.line_buffer[len(self.text_until_cursor):]
945 if key_start > text_start and closing_quote:
947 if key_start > text_start and closing_quote:
946 # quotes were opened inside text, maybe close them
948 # quotes were opened inside text, maybe close them
947 if continuation.startswith(closing_quote):
949 if continuation.startswith(closing_quote):
948 continuation = continuation[len(closing_quote):]
950 continuation = continuation[len(closing_quote):]
949 else:
951 else:
950 suf += closing_quote
952 suf += closing_quote
951 if bracket_idx > text_start:
953 if bracket_idx > text_start:
952 # brackets were opened inside text, maybe close them
954 # brackets were opened inside text, maybe close them
953 if not continuation.startswith(']'):
955 if not continuation.startswith(']'):
954 suf += ']'
956 suf += ']'
955
957
956 return [leading + k + suf for k in matches]
958 return [leading + k + suf for k in matches]
957
959
960 def unicode_name_matches(self, text):
961 u"""Match Latex-like syntax for unicode characters base
962 on the name of the character.
963
964 This does \\GREEK SMALL LETTER ETA -> η
965
966 Works only on valid python 3 identifier, or on combining characters that
967 will combine to form a valid identifier.
968
969 Used on Python 3 only.
970 """
971 slashpos = text.rfind('\\')
972 if slashpos > -1:
973 s = text[slashpos+1:]
974 try :
975 unic = unicodedata.lookup(s)
976 # allow combining chars
977 if ('a'+unic).isidentifier():
978 return '\\'+s,[unic]
979 except KeyError as e:
980 pass
981 return u'', []
982
983 def back_unicode_name_matches(self, text):
984 u"""Match unicode characters back to unicode name
985
986 This does ☃ -> \\snowman
987
988 Note that snowman is not a valid python3 combining character but will be expanded.
989 Though it will not recombine back to the snowman character by the completion machinery.
990
991 This will not either back-complete standard sequences like \n, \b ...
992
993 Used on Python 3 only.
994 """
995 if len(text)<2:
996 return u'', ()
997 maybe_slash = text[-2]
998 if maybe_slash != '\\':
999 return u'', ()
1000
1001 char = text[-1]
1002 # no expand on quote for completion in strings.
1003 # nor backcomplete standard ascii keys
1004 if char in string.ascii_letters or char in ['"',"'"]:
1005 return u'', ()
1006 try :
1007 unic = unicodedata.name(char)
1008 return '\\'+char,['\\'+unic]
1009 except KeyError as e:
1010 pass
1011 return u'', ()
1012
1013 def back_latex_name_matches(self, text):
1014 u"""Match latex characters back to unicode name
1015
1016 This does ->\\sqrt
1017
1018 Used on Python 3 only.
1019 """
1020 if len(text)<2:
1021 return u'', ()
1022 maybe_slash = text[-2]
1023 if maybe_slash != '\\':
1024 return u'', ()
1025
1026
1027 char = text[-1]
1028 # no expand on quote for completion in strings.
1029 # nor backcomplete standard ascii keys
1030 if char in string.ascii_letters or char in ['"',"'"]:
1031 return u'', ()
1032 try :
1033 latex = reverse_latex_symbol[char]
1034 # '\\' replace the \ as well
1035 return '\\'+char,[latex]
1036 except KeyError as e:
1037 pass
1038 return u'', ()
1039
1040
1041
958 def latex_matches(self, text):
1042 def latex_matches(self, text):
959 u"""Match Latex syntax for unicode characters.
1043 u"""Match Latex syntax for unicode characters.
960
1044
961 This does both \\alp -> \\alpha and \\alpha -> α
1045 This does both \\alp -> \\alpha and \\alpha -> α
962
1046
963 Used on Python 3 only.
1047 Used on Python 3 only.
964 """
1048 """
965 slashpos = text.rfind('\\')
1049 slashpos = text.rfind('\\')
966 if slashpos > -1:
1050 if slashpos > -1:
967 s = text[slashpos:]
1051 s = text[slashpos:]
968 if s in latex_symbols:
1052 if s in latex_symbols:
969 # Try to complete a full latex symbol to unicode
1053 # Try to complete a full latex symbol to unicode
970 # \\alpha -> α
1054 # \\alpha -> α
971 return s, [latex_symbols[s]]
1055 return s, [latex_symbols[s]]
972 else:
1056 else:
973 # If a user has partially typed a latex symbol, give them
1057 # If a user has partially typed a latex symbol, give them
974 # a full list of options \al -> [\aleph, \alpha]
1058 # a full list of options \al -> [\aleph, \alpha]
975 matches = [k for k in latex_symbols if k.startswith(s)]
1059 matches = [k for k in latex_symbols if k.startswith(s)]
976 return s, matches
1060 return s, matches
977 return u'', []
1061 return u'', []
978
1062
979 def dispatch_custom_completer(self, text):
1063 def dispatch_custom_completer(self, text):
980 #io.rprint("Custom! '%s' %s" % (text, self.custom_completers)) # dbg
1064 #io.rprint("Custom! '%s' %s" % (text, self.custom_completers)) # dbg
981 line = self.line_buffer
1065 line = self.line_buffer
982 if not line.strip():
1066 if not line.strip():
983 return None
1067 return None
984
1068
985 # Create a little structure to pass all the relevant information about
1069 # Create a little structure to pass all the relevant information about
986 # the current completion to any custom completer.
1070 # the current completion to any custom completer.
987 event = Bunch()
1071 event = Bunch()
988 event.line = line
1072 event.line = line
989 event.symbol = text
1073 event.symbol = text
990 cmd = line.split(None,1)[0]
1074 cmd = line.split(None,1)[0]
991 event.command = cmd
1075 event.command = cmd
992 event.text_until_cursor = self.text_until_cursor
1076 event.text_until_cursor = self.text_until_cursor
993
1077
994 #print "\ncustom:{%s]\n" % event # dbg
1078 #print "\ncustom:{%s]\n" % event # dbg
995
1079
996 # for foo etc, try also to find completer for %foo
1080 # for foo etc, try also to find completer for %foo
997 if not cmd.startswith(self.magic_escape):
1081 if not cmd.startswith(self.magic_escape):
998 try_magic = self.custom_completers.s_matches(
1082 try_magic = self.custom_completers.s_matches(
999 self.magic_escape + cmd)
1083 self.magic_escape + cmd)
1000 else:
1084 else:
1001 try_magic = []
1085 try_magic = []
1002
1086
1003 for c in itertools.chain(self.custom_completers.s_matches(cmd),
1087 for c in itertools.chain(self.custom_completers.s_matches(cmd),
1004 try_magic,
1088 try_magic,
1005 self.custom_completers.flat_matches(self.text_until_cursor)):
1089 self.custom_completers.flat_matches(self.text_until_cursor)):
1006 #print "try",c # dbg
1090 #print "try",c # dbg
1007 try:
1091 try:
1008 res = c(event)
1092 res = c(event)
1009 if res:
1093 if res:
1010 # first, try case sensitive match
1094 # first, try case sensitive match
1011 withcase = [r for r in res if r.startswith(text)]
1095 withcase = [r for r in res if r.startswith(text)]
1012 if withcase:
1096 if withcase:
1013 return withcase
1097 return withcase
1014 # if none, then case insensitive ones are ok too
1098 # if none, then case insensitive ones are ok too
1015 text_low = text.lower()
1099 text_low = text.lower()
1016 return [r for r in res if r.lower().startswith(text_low)]
1100 return [r for r in res if r.lower().startswith(text_low)]
1017 except TryNext:
1101 except TryNext:
1018 pass
1102 pass
1019
1103
1020 return None
1104 return None
1021
1105
1022 def complete(self, text=None, line_buffer=None, cursor_pos=None):
1106 def complete(self, text=None, line_buffer=None, cursor_pos=None):
1023 """Find completions for the given text and line context.
1107 """Find completions for the given text and line context.
1024
1108
1025 Note that both the text and the line_buffer are optional, but at least
1109 Note that both the text and the line_buffer are optional, but at least
1026 one of them must be given.
1110 one of them must be given.
1027
1111
1028 Parameters
1112 Parameters
1029 ----------
1113 ----------
1030 text : string, optional
1114 text : string, optional
1031 Text to perform the completion on. If not given, the line buffer
1115 Text to perform the completion on. If not given, the line buffer
1032 is split using the instance's CompletionSplitter object.
1116 is split using the instance's CompletionSplitter object.
1033
1117
1034 line_buffer : string, optional
1118 line_buffer : string, optional
1035 If not given, the completer attempts to obtain the current line
1119 If not given, the completer attempts to obtain the current line
1036 buffer via readline. This keyword allows clients which are
1120 buffer via readline. This keyword allows clients which are
1037 requesting for text completions in non-readline contexts to inform
1121 requesting for text completions in non-readline contexts to inform
1038 the completer of the entire text.
1122 the completer of the entire text.
1039
1123
1040 cursor_pos : int, optional
1124 cursor_pos : int, optional
1041 Index of the cursor in the full line buffer. Should be provided by
1125 Index of the cursor in the full line buffer. Should be provided by
1042 remote frontends where kernel has no access to frontend state.
1126 remote frontends where kernel has no access to frontend state.
1043
1127
1044 Returns
1128 Returns
1045 -------
1129 -------
1046 text : str
1130 text : str
1047 Text that was actually used in the completion.
1131 Text that was actually used in the completion.
1048
1132
1049 matches : list
1133 matches : list
1050 A list of completion matches.
1134 A list of completion matches.
1051 """
1135 """
1052 # io.rprint('\nCOMP1 %r %r %r' % (text, line_buffer, cursor_pos)) # dbg
1136 # io.rprint('\nCOMP1 %r %r %r' % (text, line_buffer, cursor_pos)) # dbg
1053
1137
1054 # if the cursor position isn't given, the only sane assumption we can
1138 # if the cursor position isn't given, the only sane assumption we can
1055 # make is that it's at the end of the line (the common case)
1139 # make is that it's at the end of the line (the common case)
1056 if cursor_pos is None:
1140 if cursor_pos is None:
1057 cursor_pos = len(line_buffer) if text is None else len(text)
1141 cursor_pos = len(line_buffer) if text is None else len(text)
1058
1142
1059 if PY3:
1143 if PY3:
1060 latex_text = text if not line_buffer else line_buffer[:cursor_pos]
1061 latex_text, latex_matches = self.latex_matches(latex_text)
1062 if latex_matches:
1063 return latex_text, latex_matches
1064
1144
1145 base_text = text if not line_buffer else line_buffer[:cursor_pos]
1146 latex_text, latex_matches = self.latex_matches(base_text)
1147 if latex_matches:
1148 return latex_text, latex_matches
1149 name_text = ''
1150 name_matches = []
1151 for meth in (self.unicode_name_matches, self.back_unicode_name_matches, self.back_latex_name_matches):
1152 _name_text, _name_matches = meth(base_text)
1153 if _name_text:
1154 name_text = _name_text
1155 name_matches.extend(_name_matches)
1156 if name_text:
1157 return name_text, name_matches
1158
1065 # if text is either None or an empty string, rely on the line buffer
1159 # if text is either None or an empty string, rely on the line buffer
1066 if not text:
1160 if not text:
1067 text = self.splitter.split_line(line_buffer, cursor_pos)
1161 text = self.splitter.split_line(line_buffer, cursor_pos)
1068
1162
1069 # If no line buffer is given, assume the input text is all there was
1163 # If no line buffer is given, assume the input text is all there was
1070 if line_buffer is None:
1164 if line_buffer is None:
1071 line_buffer = text
1165 line_buffer = text
1072
1166
1073 self.line_buffer = line_buffer
1167 self.line_buffer = line_buffer
1074 self.text_until_cursor = self.line_buffer[:cursor_pos]
1168 self.text_until_cursor = self.line_buffer[:cursor_pos]
1075 # io.rprint('COMP2 %r %r %r' % (text, line_buffer, cursor_pos)) # dbg
1169 # io.rprint('COMP2 %r %r %r' % (text, line_buffer, cursor_pos)) # dbg
1076
1170
1077 # Start with a clean slate of completions
1171 # Start with a clean slate of completions
1078 self.matches[:] = []
1172 self.matches[:] = []
1079 custom_res = self.dispatch_custom_completer(text)
1173 custom_res = self.dispatch_custom_completer(text)
1080 if custom_res is not None:
1174 if custom_res is not None:
1081 # did custom completers produce something?
1175 # did custom completers produce something?
1082 self.matches = custom_res
1176 self.matches = custom_res
1083 else:
1177 else:
1084 # Extend the list of completions with the results of each
1178 # Extend the list of completions with the results of each
1085 # matcher, so we return results to the user from all
1179 # matcher, so we return results to the user from all
1086 # namespaces.
1180 # namespaces.
1087 if self.merge_completions:
1181 if self.merge_completions:
1088 self.matches = []
1182 self.matches = []
1089 for matcher in self.matchers:
1183 for matcher in self.matchers:
1090 try:
1184 try:
1091 self.matches.extend(matcher(text))
1185 self.matches.extend(matcher(text))
1092 except:
1186 except:
1093 # Show the ugly traceback if the matcher causes an
1187 # Show the ugly traceback if the matcher causes an
1094 # exception, but do NOT crash the kernel!
1188 # exception, but do NOT crash the kernel!
1095 sys.excepthook(*sys.exc_info())
1189 sys.excepthook(*sys.exc_info())
1096 else:
1190 else:
1097 for matcher in self.matchers:
1191 for matcher in self.matchers:
1098 self.matches = matcher(text)
1192 self.matches = matcher(text)
1099 if self.matches:
1193 if self.matches:
1100 break
1194 break
1101 # FIXME: we should extend our api to return a dict with completions for
1195 # FIXME: we should extend our api to return a dict with completions for
1102 # different types of objects. The rlcomplete() method could then
1196 # different types of objects. The rlcomplete() method could then
1103 # simply collapse the dict into a list for readline, but we'd have
1197 # simply collapse the dict into a list for readline, but we'd have
1104 # richer completion semantics in other evironments.
1198 # richer completion semantics in other evironments.
1105
1199
1106 # use penalize_magics_key to put magics after variables with same name
1200 # use penalize_magics_key to put magics after variables with same name
1107 self.matches = sorted(set(self.matches), key=penalize_magics_key)
1201 self.matches = sorted(set(self.matches), key=penalize_magics_key)
1108
1202
1109 #io.rprint('COMP TEXT, MATCHES: %r, %r' % (text, self.matches)) # dbg
1203 #io.rprint('COMP TEXT, MATCHES: %r, %r' % (text, self.matches)) # dbg
1110 return text, self.matches
1204 return text, self.matches
1111
1205
1112 def rlcomplete(self, text, state):
1206 def rlcomplete(self, text, state):
1113 """Return the state-th possible completion for 'text'.
1207 """Return the state-th possible completion for 'text'.
1114
1208
1115 This is called successively with state == 0, 1, 2, ... until it
1209 This is called successively with state == 0, 1, 2, ... until it
1116 returns None. The completion should begin with 'text'.
1210 returns None. The completion should begin with 'text'.
1117
1211
1118 Parameters
1212 Parameters
1119 ----------
1213 ----------
1120 text : string
1214 text : string
1121 Text to perform the completion on.
1215 Text to perform the completion on.
1122
1216
1123 state : int
1217 state : int
1124 Counter used by readline.
1218 Counter used by readline.
1125 """
1219 """
1126 if state==0:
1220 if state==0:
1127
1221
1128 self.line_buffer = line_buffer = self.readline.get_line_buffer()
1222 self.line_buffer = line_buffer = self.readline.get_line_buffer()
1129 cursor_pos = self.readline.get_endidx()
1223 cursor_pos = self.readline.get_endidx()
1130
1224
1131 #io.rprint("\nRLCOMPLETE: %r %r %r" %
1225 #io.rprint("\nRLCOMPLETE: %r %r %r" %
1132 # (text, line_buffer, cursor_pos) ) # dbg
1226 # (text, line_buffer, cursor_pos) ) # dbg
1133
1227
1134 # if there is only a tab on a line with only whitespace, instead of
1228 # if there is only a tab on a line with only whitespace, instead of
1135 # the mostly useless 'do you want to see all million completions'
1229 # the mostly useless 'do you want to see all million completions'
1136 # message, just do the right thing and give the user his tab!
1230 # message, just do the right thing and give the user his tab!
1137 # Incidentally, this enables pasting of tabbed text from an editor
1231 # Incidentally, this enables pasting of tabbed text from an editor
1138 # (as long as autoindent is off).
1232 # (as long as autoindent is off).
1139
1233
1140 # It should be noted that at least pyreadline still shows file
1234 # It should be noted that at least pyreadline still shows file
1141 # completions - is there a way around it?
1235 # completions - is there a way around it?
1142
1236
1143 # don't apply this on 'dumb' terminals, such as emacs buffers, so
1237 # don't apply this on 'dumb' terminals, such as emacs buffers, so
1144 # we don't interfere with their own tab-completion mechanism.
1238 # we don't interfere with their own tab-completion mechanism.
1145 if not (self.dumb_terminal or line_buffer.strip()):
1239 if not (self.dumb_terminal or line_buffer.strip()):
1146 self.readline.insert_text('\t')
1240 self.readline.insert_text('\t')
1147 sys.stdout.flush()
1241 sys.stdout.flush()
1148 return None
1242 return None
1149
1243
1150 # Note: debugging exceptions that may occur in completion is very
1244 # Note: debugging exceptions that may occur in completion is very
1151 # tricky, because readline unconditionally silences them. So if
1245 # tricky, because readline unconditionally silences them. So if
1152 # during development you suspect a bug in the completion code, turn
1246 # during development you suspect a bug in the completion code, turn
1153 # this flag on temporarily by uncommenting the second form (don't
1247 # this flag on temporarily by uncommenting the second form (don't
1154 # flip the value in the first line, as the '# dbg' marker can be
1248 # flip the value in the first line, as the '# dbg' marker can be
1155 # automatically detected and is used elsewhere).
1249 # automatically detected and is used elsewhere).
1156 DEBUG = False
1250 DEBUG = False
1157 #DEBUG = True # dbg
1251 #DEBUG = True # dbg
1158 if DEBUG:
1252 if DEBUG:
1159 try:
1253 try:
1160 self.complete(text, line_buffer, cursor_pos)
1254 self.complete(text, line_buffer, cursor_pos)
1161 except:
1255 except:
1162 import traceback; traceback.print_exc()
1256 import traceback; traceback.print_exc()
1163 else:
1257 else:
1164 # The normal production version is here
1258 # The normal production version is here
1165
1259
1166 # This method computes the self.matches array
1260 # This method computes the self.matches array
1167 self.complete(text, line_buffer, cursor_pos)
1261 self.complete(text, line_buffer, cursor_pos)
1168
1262
1169 try:
1263 try:
1170 return self.matches[state]
1264 return self.matches[state]
1171 except IndexError:
1265 except IndexError:
1172 return None
1266 return None
1267
@@ -1,1297 +1,1300 b''
1 # encoding: utf-8
1 # encoding: utf-8
2
2
3 # DO NOT EDIT THIS FILE BY HAND.
3 # DO NOT EDIT THIS FILE BY HAND.
4
4
5 # To update this file, run the script /tools/gen_latex_symbols.py using Python 3
5 # To update this file, run the script /tools/gen_latex_symbols.py using Python 3
6
6
7 # This file is autogenerated from the file:
7 # This file is autogenerated from the file:
8 # https://raw.githubusercontent.com/JuliaLang/julia/master/base/latex_symbols.jl
8 # https://raw.githubusercontent.com/JuliaLang/julia/master/base/latex_symbols.jl
9 # This original list is filtered to remove any unicode characters that are not valid
9 # This original list is filtered to remove any unicode characters that are not valid
10 # Python identifiers.
10 # Python identifiers.
11
11
12 latex_symbols = {
12 latex_symbols = {
13
13
14 "\\^a" : "ᵃ",
14 "\\^a" : "ᵃ",
15 "\\^b" : "ᵇ",
15 "\\^b" : "ᵇ",
16 "\\^c" : "ᶜ",
16 "\\^c" : "ᶜ",
17 "\\^d" : "ᵈ",
17 "\\^d" : "ᵈ",
18 "\\^e" : "ᵉ",
18 "\\^e" : "ᵉ",
19 "\\^f" : "ᶠ",
19 "\\^f" : "ᶠ",
20 "\\^g" : "ᵍ",
20 "\\^g" : "ᵍ",
21 "\\^h" : "ʰ",
21 "\\^h" : "ʰ",
22 "\\^i" : "ⁱ",
22 "\\^i" : "ⁱ",
23 "\\^j" : "ʲ",
23 "\\^j" : "ʲ",
24 "\\^k" : "ᵏ",
24 "\\^k" : "ᵏ",
25 "\\^l" : "ˡ",
25 "\\^l" : "ˡ",
26 "\\^m" : "ᵐ",
26 "\\^m" : "ᵐ",
27 "\\^n" : "ⁿ",
27 "\\^n" : "ⁿ",
28 "\\^o" : "ᵒ",
28 "\\^o" : "ᵒ",
29 "\\^p" : "ᵖ",
29 "\\^p" : "ᵖ",
30 "\\^r" : "ʳ",
30 "\\^r" : "ʳ",
31 "\\^s" : "ˢ",
31 "\\^s" : "ˢ",
32 "\\^t" : "ᵗ",
32 "\\^t" : "ᵗ",
33 "\\^u" : "ᵘ",
33 "\\^u" : "ᵘ",
34 "\\^v" : "ᵛ",
34 "\\^v" : "ᵛ",
35 "\\^w" : "ʷ",
35 "\\^w" : "ʷ",
36 "\\^x" : "ˣ",
36 "\\^x" : "ˣ",
37 "\\^y" : "ʸ",
37 "\\^y" : "ʸ",
38 "\\^z" : "ᶻ",
38 "\\^z" : "ᶻ",
39 "\\^A" : "ᴬ",
39 "\\^A" : "ᴬ",
40 "\\^B" : "ᴮ",
40 "\\^B" : "ᴮ",
41 "\\^D" : "ᴰ",
41 "\\^D" : "ᴰ",
42 "\\^E" : "ᴱ",
42 "\\^E" : "ᴱ",
43 "\\^G" : "ᴳ",
43 "\\^G" : "ᴳ",
44 "\\^H" : "ᴴ",
44 "\\^H" : "ᴴ",
45 "\\^I" : "ᴵ",
45 "\\^I" : "ᴵ",
46 "\\^J" : "ᴶ",
46 "\\^J" : "ᴶ",
47 "\\^K" : "ᴷ",
47 "\\^K" : "ᴷ",
48 "\\^L" : "ᴸ",
48 "\\^L" : "ᴸ",
49 "\\^M" : "ᴹ",
49 "\\^M" : "ᴹ",
50 "\\^N" : "ᴺ",
50 "\\^N" : "ᴺ",
51 "\\^O" : "ᴼ",
51 "\\^O" : "ᴼ",
52 "\\^P" : "ᴾ",
52 "\\^P" : "ᴾ",
53 "\\^R" : "ᴿ",
53 "\\^R" : "ᴿ",
54 "\\^T" : "ᵀ",
54 "\\^T" : "ᵀ",
55 "\\^U" : "ᵁ",
55 "\\^U" : "ᵁ",
56 "\\^V" : "ⱽ",
56 "\\^V" : "ⱽ",
57 "\\^W" : "ᵂ",
57 "\\^W" : "ᵂ",
58 "\\^alpha" : "ᵅ",
58 "\\^alpha" : "ᵅ",
59 "\\^beta" : "ᵝ",
59 "\\^beta" : "ᵝ",
60 "\\^gamma" : "ᵞ",
60 "\\^gamma" : "ᵞ",
61 "\\^delta" : "ᵟ",
61 "\\^delta" : "ᵟ",
62 "\\^epsilon" : "ᵋ",
62 "\\^epsilon" : "ᵋ",
63 "\\^theta" : "ᶿ",
63 "\\^theta" : "ᶿ",
64 "\\^iota" : "ᶥ",
64 "\\^iota" : "ᶥ",
65 "\\^phi" : "ᵠ",
65 "\\^phi" : "ᵠ",
66 "\\^chi" : "ᵡ",
66 "\\^chi" : "ᵡ",
67 "\\^Phi" : "ᶲ",
67 "\\^Phi" : "ᶲ",
68 "\\_a" : "ₐ",
68 "\\_a" : "ₐ",
69 "\\_e" : "ₑ",
69 "\\_e" : "ₑ",
70 "\\_h" : "ₕ",
70 "\\_h" : "ₕ",
71 "\\_i" : "ᵢ",
71 "\\_i" : "ᵢ",
72 "\\_j" : "ⱼ",
72 "\\_j" : "ⱼ",
73 "\\_k" : "ₖ",
73 "\\_k" : "ₖ",
74 "\\_l" : "ₗ",
74 "\\_l" : "ₗ",
75 "\\_m" : "ₘ",
75 "\\_m" : "ₘ",
76 "\\_n" : "ₙ",
76 "\\_n" : "ₙ",
77 "\\_o" : "ₒ",
77 "\\_o" : "ₒ",
78 "\\_p" : "ₚ",
78 "\\_p" : "ₚ",
79 "\\_r" : "ᵣ",
79 "\\_r" : "ᵣ",
80 "\\_s" : "ₛ",
80 "\\_s" : "ₛ",
81 "\\_t" : "ₜ",
81 "\\_t" : "ₜ",
82 "\\_u" : "ᵤ",
82 "\\_u" : "ᵤ",
83 "\\_v" : "ᵥ",
83 "\\_v" : "ᵥ",
84 "\\_x" : "ₓ",
84 "\\_x" : "ₓ",
85 "\\_schwa" : "ₔ",
85 "\\_schwa" : "ₔ",
86 "\\_beta" : "ᵦ",
86 "\\_beta" : "ᵦ",
87 "\\_gamma" : "ᵧ",
87 "\\_gamma" : "ᵧ",
88 "\\_rho" : "ᵨ",
88 "\\_rho" : "ᵨ",
89 "\\_phi" : "ᵩ",
89 "\\_phi" : "ᵩ",
90 "\\_chi" : "ᵪ",
90 "\\_chi" : "ᵪ",
91 "\\hbar" : "ħ",
91 "\\hbar" : "ħ",
92 "\\sout" : "̶",
92 "\\sout" : "̶",
93 "\\textordfeminine" : "ª",
93 "\\textordfeminine" : "ª",
94 "\\cdotp" : "·",
94 "\\cdotp" : "·",
95 "\\textordmasculine" : "º",
95 "\\textordmasculine" : "º",
96 "\\AA" : "Å",
96 "\\AA" : "Å",
97 "\\AE" : "Æ",
97 "\\AE" : "Æ",
98 "\\DH" : "Ð",
98 "\\DH" : "Ð",
99 "\\O" : "Ø",
99 "\\O" : "Ø",
100 "\\TH" : "Þ",
100 "\\TH" : "Þ",
101 "\\ss" : "ß",
101 "\\ss" : "ß",
102 "\\aa" : "å",
102 "\\aa" : "å",
103 "\\ae" : "æ",
103 "\\ae" : "æ",
104 "\\eth" : "ð",
104 "\\eth" : "ð",
105 "\\o" : "ø",
105 "\\o" : "ø",
106 "\\th" : "þ",
106 "\\th" : "þ",
107 "\\DJ" : "Đ",
107 "\\DJ" : "Đ",
108 "\\dj" : "đ",
108 "\\dj" : "đ",
109 "\\Elzxh" : "ħ",
109 "\\Elzxh" : "ħ",
110 "\\imath" : "ı",
110 "\\imath" : "ı",
111 "\\L" : "Ł",
111 "\\L" : "Ł",
112 "\\l" : "ł",
112 "\\l" : "ł",
113 "\\NG" : "Ŋ",
113 "\\NG" : "Ŋ",
114 "\\ng" : "ŋ",
114 "\\ng" : "ŋ",
115 "\\OE" : "Œ",
115 "\\OE" : "Œ",
116 "\\oe" : "œ",
116 "\\oe" : "œ",
117 "\\texthvlig" : "ƕ",
117 "\\texthvlig" : "ƕ",
118 "\\textnrleg" : "ƞ",
118 "\\textnrleg" : "ƞ",
119 "\\textdoublepipe" : "ǂ",
119 "\\textdoublepipe" : "ǂ",
120 "\\Elztrna" : "ɐ",
120 "\\Elztrna" : "ɐ",
121 "\\Elztrnsa" : "ɒ",
121 "\\Elztrnsa" : "ɒ",
122 "\\Elzopeno" : "ɔ",
122 "\\Elzopeno" : "ɔ",
123 "\\Elzrtld" : "ɖ",
123 "\\Elzrtld" : "ɖ",
124 "\\Elzschwa" : "ə",
124 "\\Elzschwa" : "ə",
125 "\\varepsilon" : "ɛ",
125 "\\varepsilon" : "ɛ",
126 "\\Elzpgamma" : "ɣ",
126 "\\Elzpgamma" : "ɣ",
127 "\\Elzpbgam" : "ɤ",
127 "\\Elzpbgam" : "ɤ",
128 "\\Elztrnh" : "ɥ",
128 "\\Elztrnh" : "ɥ",
129 "\\Elzbtdl" : "ɬ",
129 "\\Elzbtdl" : "ɬ",
130 "\\Elzrtll" : "ɭ",
130 "\\Elzrtll" : "ɭ",
131 "\\Elztrnm" : "ɯ",
131 "\\Elztrnm" : "ɯ",
132 "\\Elztrnmlr" : "ɰ",
132 "\\Elztrnmlr" : "ɰ",
133 "\\Elzltlmr" : "ɱ",
133 "\\Elzltlmr" : "ɱ",
134 "\\Elzltln" : "ɲ",
134 "\\Elzltln" : "ɲ",
135 "\\Elzrtln" : "ɳ",
135 "\\Elzrtln" : "ɳ",
136 "\\Elzclomeg" : "ɷ",
136 "\\Elzclomeg" : "ɷ",
137 "\\textphi" : "ɸ",
137 "\\textphi" : "ɸ",
138 "\\Elztrnr" : "ɹ",
138 "\\Elztrnr" : "ɹ",
139 "\\Elztrnrl" : "ɺ",
139 "\\Elztrnrl" : "ɺ",
140 "\\Elzrttrnr" : "ɻ",
140 "\\Elzrttrnr" : "ɻ",
141 "\\Elzrl" : "ɼ",
141 "\\Elzrl" : "ɼ",
142 "\\Elzrtlr" : "ɽ",
142 "\\Elzrtlr" : "ɽ",
143 "\\Elzfhr" : "ɾ",
143 "\\Elzfhr" : "ɾ",
144 "\\Elzrtls" : "ʂ",
144 "\\Elzrtls" : "ʂ",
145 "\\Elzesh" : "ʃ",
145 "\\Elzesh" : "ʃ",
146 "\\Elztrnt" : "ʇ",
146 "\\Elztrnt" : "ʇ",
147 "\\Elzrtlt" : "ʈ",
147 "\\Elzrtlt" : "ʈ",
148 "\\Elzpupsil" : "ʊ",
148 "\\Elzpupsil" : "ʊ",
149 "\\Elzpscrv" : "ʋ",
149 "\\Elzpscrv" : "ʋ",
150 "\\Elzinvv" : "ʌ",
150 "\\Elzinvv" : "ʌ",
151 "\\Elzinvw" : "ʍ",
151 "\\Elzinvw" : "ʍ",
152 "\\Elztrny" : "ʎ",
152 "\\Elztrny" : "ʎ",
153 "\\Elzrtlz" : "ʐ",
153 "\\Elzrtlz" : "ʐ",
154 "\\Elzyogh" : "ʒ",
154 "\\Elzyogh" : "ʒ",
155 "\\Elzglst" : "ʔ",
155 "\\Elzglst" : "ʔ",
156 "\\Elzreglst" : "ʕ",
156 "\\Elzreglst" : "ʕ",
157 "\\Elzinglst" : "ʖ",
157 "\\Elzinglst" : "ʖ",
158 "\\textturnk" : "ʞ",
158 "\\textturnk" : "ʞ",
159 "\\Elzdyogh" : "ʤ",
159 "\\Elzdyogh" : "ʤ",
160 "\\Elztesh" : "ʧ",
160 "\\Elztesh" : "ʧ",
161 "\\rasp" : "ʼ",
161 "\\rasp" : "ʼ",
162 "\\textasciicaron" : "ˇ",
162 "\\textasciicaron" : "ˇ",
163 "\\Elzverts" : "ˈ",
163 "\\Elzverts" : "ˈ",
164 "\\Elzverti" : "ˌ",
164 "\\Elzverti" : "ˌ",
165 "\\Elzlmrk" : "ː",
165 "\\Elzlmrk" : "ː",
166 "\\Elzhlmrk" : "ˑ",
166 "\\Elzhlmrk" : "ˑ",
167 "\\grave" : "̀",
167 "\\grave" : "̀",
168 "\\acute" : "́",
168 "\\acute" : "́",
169 "\\hat" : "̂",
169 "\\hat" : "̂",
170 "\\tilde" : "̃",
170 "\\tilde" : "̃",
171 "\\bar" : "̄",
171 "\\bar" : "̄",
172 "\\breve" : "̆",
172 "\\breve" : "̆",
173 "\\dot" : "̇",
173 "\\dot" : "̇",
174 "\\ddot" : "̈",
174 "\\ddot" : "̈",
175 "\\ocirc" : "̊",
175 "\\ocirc" : "̊",
176 "\\H" : "̋",
176 "\\H" : "̋",
177 "\\check" : "̌",
177 "\\check" : "̌",
178 "\\Elzpalh" : "̡",
178 "\\Elzpalh" : "̡",
179 "\\Elzrh" : "̢",
179 "\\Elzrh" : "̢",
180 "\\c" : "̧",
180 "\\c" : "̧",
181 "\\k" : "̨",
181 "\\k" : "̨",
182 "\\Elzsbbrg" : "̪",
182 "\\Elzsbbrg" : "̪",
183 "\\Elzxl" : "̵",
183 "\\Elzxl" : "̵",
184 "\\Elzbar" : "̶",
184 "\\Elzbar" : "̶",
185 "\\Alpha" : "Α",
185 "\\Alpha" : "Α",
186 "\\Beta" : "Β",
186 "\\Beta" : "Β",
187 "\\Gamma" : "Γ",
187 "\\Gamma" : "Γ",
188 "\\Delta" : "Δ",
188 "\\Delta" : "Δ",
189 "\\Epsilon" : "Ε",
189 "\\Epsilon" : "Ε",
190 "\\Zeta" : "Ζ",
190 "\\Zeta" : "Ζ",
191 "\\Eta" : "Η",
191 "\\Eta" : "Η",
192 "\\Theta" : "Θ",
192 "\\Theta" : "Θ",
193 "\\Iota" : "Ι",
193 "\\Iota" : "Ι",
194 "\\Kappa" : "Κ",
194 "\\Kappa" : "Κ",
195 "\\Lambda" : "Λ",
195 "\\Lambda" : "Λ",
196 "\\Xi" : "Ξ",
196 "\\Xi" : "Ξ",
197 "\\Pi" : "Π",
197 "\\Pi" : "Π",
198 "\\Rho" : "Ρ",
198 "\\Rho" : "Ρ",
199 "\\Sigma" : "Σ",
199 "\\Sigma" : "Σ",
200 "\\Tau" : "Τ",
200 "\\Tau" : "Τ",
201 "\\Upsilon" : "Υ",
201 "\\Upsilon" : "Υ",
202 "\\Phi" : "Φ",
202 "\\Phi" : "Φ",
203 "\\Chi" : "Χ",
203 "\\Chi" : "Χ",
204 "\\Psi" : "Ψ",
204 "\\Psi" : "Ψ",
205 "\\Omega" : "Ω",
205 "\\Omega" : "Ω",
206 "\\alpha" : "α",
206 "\\alpha" : "α",
207 "\\beta" : "β",
207 "\\beta" : "β",
208 "\\gamma" : "γ",
208 "\\gamma" : "γ",
209 "\\delta" : "δ",
209 "\\delta" : "δ",
210 "\\zeta" : "ζ",
210 "\\zeta" : "ζ",
211 "\\eta" : "η",
211 "\\eta" : "η",
212 "\\theta" : "θ",
212 "\\theta" : "θ",
213 "\\iota" : "ι",
213 "\\iota" : "ι",
214 "\\kappa" : "κ",
214 "\\kappa" : "κ",
215 "\\lambda" : "λ",
215 "\\lambda" : "λ",
216 "\\mu" : "μ",
216 "\\mu" : "μ",
217 "\\nu" : "ν",
217 "\\nu" : "ν",
218 "\\xi" : "ξ",
218 "\\xi" : "ξ",
219 "\\pi" : "π",
219 "\\pi" : "π",
220 "\\rho" : "ρ",
220 "\\rho" : "ρ",
221 "\\varsigma" : "ς",
221 "\\varsigma" : "ς",
222 "\\sigma" : "σ",
222 "\\sigma" : "σ",
223 "\\tau" : "τ",
223 "\\tau" : "τ",
224 "\\upsilon" : "υ",
224 "\\upsilon" : "υ",
225 "\\varphi" : "φ",
225 "\\varphi" : "φ",
226 "\\chi" : "χ",
226 "\\chi" : "χ",
227 "\\psi" : "ψ",
227 "\\psi" : "ψ",
228 "\\omega" : "ω",
228 "\\omega" : "ω",
229 "\\vartheta" : "ϑ",
229 "\\vartheta" : "ϑ",
230 "\\phi" : "ϕ",
230 "\\phi" : "ϕ",
231 "\\varpi" : "ϖ",
231 "\\varpi" : "ϖ",
232 "\\Stigma" : "Ϛ",
232 "\\Stigma" : "Ϛ",
233 "\\Digamma" : "Ϝ",
233 "\\Digamma" : "Ϝ",
234 "\\digamma" : "ϝ",
234 "\\digamma" : "ϝ",
235 "\\Koppa" : "Ϟ",
235 "\\Koppa" : "Ϟ",
236 "\\Sampi" : "Ϡ",
236 "\\Sampi" : "Ϡ",
237 "\\varkappa" : "ϰ",
237 "\\varkappa" : "ϰ",
238 "\\varrho" : "ϱ",
238 "\\varrho" : "ϱ",
239 "\\textTheta" : "ϴ",
239 "\\textTheta" : "ϴ",
240 "\\epsilon" : "ϵ",
240 "\\epsilon" : "ϵ",
241 "\\dddot" : "⃛",
241 "\\dddot" : "⃛",
242 "\\ddddot" : "⃜",
242 "\\ddddot" : "⃜",
243 "\\hslash" : "ℏ",
243 "\\hslash" : "ℏ",
244 "\\Im" : "ℑ",
244 "\\Im" : "ℑ",
245 "\\ell" : "ℓ",
245 "\\ell" : "ℓ",
246 "\\wp" : "℘",
246 "\\wp" : "℘",
247 "\\Re" : "ℜ",
247 "\\Re" : "ℜ",
248 "\\aleph" : "ℵ",
248 "\\aleph" : "ℵ",
249 "\\beth" : "ℶ",
249 "\\beth" : "ℶ",
250 "\\gimel" : "ℷ",
250 "\\gimel" : "ℷ",
251 "\\daleth" : "ℸ",
251 "\\daleth" : "ℸ",
252 "\\BbbPi" : "ℿ",
252 "\\BbbPi" : "ℿ",
253 "\\Zbar" : "Ƶ",
253 "\\Zbar" : "Ƶ",
254 "\\overbar" : "̅",
254 "\\overbar" : "̅",
255 "\\ovhook" : "̉",
255 "\\ovhook" : "̉",
256 "\\candra" : "̐",
256 "\\candra" : "̐",
257 "\\oturnedcomma" : "̒",
257 "\\oturnedcomma" : "̒",
258 "\\ocommatopright" : "̕",
258 "\\ocommatopright" : "̕",
259 "\\droang" : "̚",
259 "\\droang" : "̚",
260 "\\wideutilde" : "̰",
260 "\\wideutilde" : "̰",
261 "\\underbar" : "̱",
261 "\\underbar" : "̱",
262 "\\not" : "̸",
262 "\\not" : "̸",
263 "\\upMu" : "Μ",
263 "\\upMu" : "Μ",
264 "\\upNu" : "Ν",
264 "\\upNu" : "Ν",
265 "\\upOmicron" : "Ο",
265 "\\upOmicron" : "Ο",
266 "\\upepsilon" : "ε",
266 "\\upepsilon" : "ε",
267 "\\upomicron" : "ο",
267 "\\upomicron" : "ο",
268 "\\upvarbeta" : "ϐ",
268 "\\upvarbeta" : "ϐ",
269 "\\upoldKoppa" : "Ϙ",
269 "\\upoldKoppa" : "Ϙ",
270 "\\upoldkoppa" : "ϙ",
270 "\\upoldkoppa" : "ϙ",
271 "\\upstigma" : "ϛ",
271 "\\upstigma" : "ϛ",
272 "\\upkoppa" : "ϟ",
272 "\\upkoppa" : "ϟ",
273 "\\upsampi" : "ϡ",
273 "\\upsampi" : "ϡ",
274 "\\tieconcat" : "⁀",
274 "\\tieconcat" : "⁀",
275 "\\leftharpoonaccent" : "⃐",
275 "\\leftharpoonaccent" : "⃐",
276 "\\rightharpoonaccent" : "⃑",
276 "\\rightharpoonaccent" : "⃑",
277 "\\vertoverlay" : "⃒",
277 "\\vertoverlay" : "⃒",
278 "\\overleftarrow" : "⃖",
278 "\\overleftarrow" : "⃖",
279 "\\vec" : "⃗",
279 "\\vec" : "⃗",
280 "\\overleftrightarrow" : "⃡",
280 "\\overleftrightarrow" : "⃡",
281 "\\annuity" : "⃧",
281 "\\annuity" : "⃧",
282 "\\threeunderdot" : "⃨",
282 "\\threeunderdot" : "⃨",
283 "\\widebridgeabove" : "⃩",
283 "\\widebridgeabove" : "⃩",
284 "\\BbbC" : "ℂ",
284 "\\BbbC" : "ℂ",
285 "\\Eulerconst" : "ℇ",
285 "\\Eulerconst" : "ℇ",
286 "\\mscrg" : "ℊ",
286 "\\mscrg" : "ℊ",
287 "\\mscrH" : "ℋ",
287 "\\mscrH" : "ℋ",
288 "\\mfrakH" : "ℌ",
288 "\\mfrakH" : "ℌ",
289 "\\BbbH" : "ℍ",
289 "\\BbbH" : "ℍ",
290 "\\Planckconst" : "ℎ",
290 "\\Planckconst" : "ℎ",
291 "\\mscrI" : "ℐ",
291 "\\mscrI" : "ℐ",
292 "\\mscrL" : "ℒ",
292 "\\mscrL" : "ℒ",
293 "\\BbbN" : "ℕ",
293 "\\BbbN" : "ℕ",
294 "\\BbbP" : "ℙ",
294 "\\BbbP" : "ℙ",
295 "\\BbbQ" : "ℚ",
295 "\\BbbQ" : "ℚ",
296 "\\mscrR" : "ℛ",
296 "\\mscrR" : "ℛ",
297 "\\BbbR" : "ℝ",
297 "\\BbbR" : "ℝ",
298 "\\BbbZ" : "ℤ",
298 "\\BbbZ" : "ℤ",
299 "\\mfrakZ" : "ℨ",
299 "\\mfrakZ" : "ℨ",
300 "\\Angstrom" : "Å",
300 "\\Angstrom" : "Å",
301 "\\mscrB" : "ℬ",
301 "\\mscrB" : "ℬ",
302 "\\mfrakC" : "ℭ",
302 "\\mfrakC" : "ℭ",
303 "\\mscre" : "ℯ",
303 "\\mscre" : "ℯ",
304 "\\mscrE" : "ℰ",
304 "\\mscrE" : "ℰ",
305 "\\mscrF" : "ℱ",
305 "\\mscrF" : "ℱ",
306 "\\Finv" : "Ⅎ",
306 "\\Finv" : "Ⅎ",
307 "\\mscrM" : "ℳ",
307 "\\mscrM" : "ℳ",
308 "\\mscro" : "ℴ",
308 "\\mscro" : "ℴ",
309 "\\Bbbgamma" : "ℽ",
309 "\\Bbbgamma" : "ℽ",
310 "\\BbbGamma" : "ℾ",
310 "\\BbbGamma" : "ℾ",
311 "\\mitBbbD" : "ⅅ",
311 "\\mitBbbD" : "ⅅ",
312 "\\mitBbbd" : "ⅆ",
312 "\\mitBbbd" : "ⅆ",
313 "\\mitBbbe" : "ⅇ",
313 "\\mitBbbe" : "ⅇ",
314 "\\mitBbbi" : "ⅈ",
314 "\\mitBbbi" : "ⅈ",
315 "\\mitBbbj" : "ⅉ",
315 "\\mitBbbj" : "ⅉ",
316 "\\mbfA" : "𝐀",
316 "\\mbfA" : "𝐀",
317 "\\mbfB" : "𝐁",
317 "\\mbfB" : "𝐁",
318 "\\mbfC" : "𝐂",
318 "\\mbfC" : "𝐂",
319 "\\mbfD" : "𝐃",
319 "\\mbfD" : "𝐃",
320 "\\mbfE" : "𝐄",
320 "\\mbfE" : "𝐄",
321 "\\mbfF" : "𝐅",
321 "\\mbfF" : "𝐅",
322 "\\mbfG" : "𝐆",
322 "\\mbfG" : "𝐆",
323 "\\mbfH" : "𝐇",
323 "\\mbfH" : "𝐇",
324 "\\mbfI" : "𝐈",
324 "\\mbfI" : "𝐈",
325 "\\mbfJ" : "𝐉",
325 "\\mbfJ" : "𝐉",
326 "\\mbfK" : "𝐊",
326 "\\mbfK" : "𝐊",
327 "\\mbfL" : "𝐋",
327 "\\mbfL" : "𝐋",
328 "\\mbfM" : "𝐌",
328 "\\mbfM" : "𝐌",
329 "\\mbfN" : "𝐍",
329 "\\mbfN" : "𝐍",
330 "\\mbfO" : "𝐎",
330 "\\mbfO" : "𝐎",
331 "\\mbfP" : "𝐏",
331 "\\mbfP" : "𝐏",
332 "\\mbfQ" : "𝐐",
332 "\\mbfQ" : "𝐐",
333 "\\mbfR" : "𝐑",
333 "\\mbfR" : "𝐑",
334 "\\mbfS" : "𝐒",
334 "\\mbfS" : "𝐒",
335 "\\mbfT" : "𝐓",
335 "\\mbfT" : "𝐓",
336 "\\mbfU" : "𝐔",
336 "\\mbfU" : "𝐔",
337 "\\mbfV" : "𝐕",
337 "\\mbfV" : "𝐕",
338 "\\mbfW" : "𝐖",
338 "\\mbfW" : "𝐖",
339 "\\mbfX" : "𝐗",
339 "\\mbfX" : "𝐗",
340 "\\mbfY" : "𝐘",
340 "\\mbfY" : "𝐘",
341 "\\mbfZ" : "𝐙",
341 "\\mbfZ" : "𝐙",
342 "\\mbfa" : "𝐚",
342 "\\mbfa" : "𝐚",
343 "\\mbfb" : "𝐛",
343 "\\mbfb" : "𝐛",
344 "\\mbfc" : "𝐜",
344 "\\mbfc" : "𝐜",
345 "\\mbfd" : "𝐝",
345 "\\mbfd" : "𝐝",
346 "\\mbfe" : "𝐞",
346 "\\mbfe" : "𝐞",
347 "\\mbff" : "𝐟",
347 "\\mbff" : "𝐟",
348 "\\mbfg" : "𝐠",
348 "\\mbfg" : "𝐠",
349 "\\mbfh" : "𝐡",
349 "\\mbfh" : "𝐡",
350 "\\mbfi" : "𝐢",
350 "\\mbfi" : "𝐢",
351 "\\mbfj" : "𝐣",
351 "\\mbfj" : "𝐣",
352 "\\mbfk" : "𝐤",
352 "\\mbfk" : "𝐤",
353 "\\mbfl" : "𝐥",
353 "\\mbfl" : "𝐥",
354 "\\mbfm" : "𝐦",
354 "\\mbfm" : "𝐦",
355 "\\mbfn" : "𝐧",
355 "\\mbfn" : "𝐧",
356 "\\mbfo" : "𝐨",
356 "\\mbfo" : "𝐨",
357 "\\mbfp" : "𝐩",
357 "\\mbfp" : "𝐩",
358 "\\mbfq" : "𝐪",
358 "\\mbfq" : "𝐪",
359 "\\mbfr" : "𝐫",
359 "\\mbfr" : "𝐫",
360 "\\mbfs" : "𝐬",
360 "\\mbfs" : "𝐬",
361 "\\mbft" : "𝐭",
361 "\\mbft" : "𝐭",
362 "\\mbfu" : "𝐮",
362 "\\mbfu" : "𝐮",
363 "\\mbfv" : "𝐯",
363 "\\mbfv" : "𝐯",
364 "\\mbfw" : "𝐰",
364 "\\mbfw" : "𝐰",
365 "\\mbfx" : "𝐱",
365 "\\mbfx" : "𝐱",
366 "\\mbfy" : "𝐲",
366 "\\mbfy" : "𝐲",
367 "\\mbfz" : "𝐳",
367 "\\mbfz" : "𝐳",
368 "\\mitA" : "𝐴",
368 "\\mitA" : "𝐴",
369 "\\mitB" : "𝐵",
369 "\\mitB" : "𝐵",
370 "\\mitC" : "𝐶",
370 "\\mitC" : "𝐶",
371 "\\mitD" : "𝐷",
371 "\\mitD" : "𝐷",
372 "\\mitE" : "𝐸",
372 "\\mitE" : "𝐸",
373 "\\mitF" : "𝐹",
373 "\\mitF" : "𝐹",
374 "\\mitG" : "𝐺",
374 "\\mitG" : "𝐺",
375 "\\mitH" : "𝐻",
375 "\\mitH" : "𝐻",
376 "\\mitI" : "𝐼",
376 "\\mitI" : "𝐼",
377 "\\mitJ" : "𝐽",
377 "\\mitJ" : "𝐽",
378 "\\mitK" : "𝐾",
378 "\\mitK" : "𝐾",
379 "\\mitL" : "𝐿",
379 "\\mitL" : "𝐿",
380 "\\mitM" : "𝑀",
380 "\\mitM" : "𝑀",
381 "\\mitN" : "𝑁",
381 "\\mitN" : "𝑁",
382 "\\mitO" : "𝑂",
382 "\\mitO" : "𝑂",
383 "\\mitP" : "𝑃",
383 "\\mitP" : "𝑃",
384 "\\mitQ" : "𝑄",
384 "\\mitQ" : "𝑄",
385 "\\mitR" : "𝑅",
385 "\\mitR" : "𝑅",
386 "\\mitS" : "𝑆",
386 "\\mitS" : "𝑆",
387 "\\mitT" : "𝑇",
387 "\\mitT" : "𝑇",
388 "\\mitU" : "𝑈",
388 "\\mitU" : "𝑈",
389 "\\mitV" : "𝑉",
389 "\\mitV" : "𝑉",
390 "\\mitW" : "𝑊",
390 "\\mitW" : "𝑊",
391 "\\mitX" : "𝑋",
391 "\\mitX" : "𝑋",
392 "\\mitY" : "𝑌",
392 "\\mitY" : "𝑌",
393 "\\mitZ" : "𝑍",
393 "\\mitZ" : "𝑍",
394 "\\mita" : "𝑎",
394 "\\mita" : "𝑎",
395 "\\mitb" : "𝑏",
395 "\\mitb" : "𝑏",
396 "\\mitc" : "𝑐",
396 "\\mitc" : "𝑐",
397 "\\mitd" : "𝑑",
397 "\\mitd" : "𝑑",
398 "\\mite" : "𝑒",
398 "\\mite" : "𝑒",
399 "\\mitf" : "𝑓",
399 "\\mitf" : "𝑓",
400 "\\mitg" : "𝑔",
400 "\\mitg" : "𝑔",
401 "\\miti" : "𝑖",
401 "\\miti" : "𝑖",
402 "\\mitj" : "𝑗",
402 "\\mitj" : "𝑗",
403 "\\mitk" : "𝑘",
403 "\\mitk" : "𝑘",
404 "\\mitl" : "𝑙",
404 "\\mitl" : "𝑙",
405 "\\mitm" : "𝑚",
405 "\\mitm" : "𝑚",
406 "\\mitn" : "𝑛",
406 "\\mitn" : "𝑛",
407 "\\mito" : "𝑜",
407 "\\mito" : "𝑜",
408 "\\mitp" : "𝑝",
408 "\\mitp" : "𝑝",
409 "\\mitq" : "𝑞",
409 "\\mitq" : "𝑞",
410 "\\mitr" : "𝑟",
410 "\\mitr" : "𝑟",
411 "\\mits" : "𝑠",
411 "\\mits" : "𝑠",
412 "\\mitt" : "𝑡",
412 "\\mitt" : "𝑡",
413 "\\mitu" : "𝑢",
413 "\\mitu" : "𝑢",
414 "\\mitv" : "𝑣",
414 "\\mitv" : "𝑣",
415 "\\mitw" : "𝑤",
415 "\\mitw" : "𝑤",
416 "\\mitx" : "𝑥",
416 "\\mitx" : "𝑥",
417 "\\mity" : "𝑦",
417 "\\mity" : "𝑦",
418 "\\mitz" : "𝑧",
418 "\\mitz" : "𝑧",
419 "\\mbfitA" : "𝑨",
419 "\\mbfitA" : "𝑨",
420 "\\mbfitB" : "𝑩",
420 "\\mbfitB" : "𝑩",
421 "\\mbfitC" : "𝑪",
421 "\\mbfitC" : "𝑪",
422 "\\mbfitD" : "𝑫",
422 "\\mbfitD" : "𝑫",
423 "\\mbfitE" : "𝑬",
423 "\\mbfitE" : "𝑬",
424 "\\mbfitF" : "𝑭",
424 "\\mbfitF" : "𝑭",
425 "\\mbfitG" : "𝑮",
425 "\\mbfitG" : "𝑮",
426 "\\mbfitH" : "𝑯",
426 "\\mbfitH" : "𝑯",
427 "\\mbfitI" : "𝑰",
427 "\\mbfitI" : "𝑰",
428 "\\mbfitJ" : "𝑱",
428 "\\mbfitJ" : "𝑱",
429 "\\mbfitK" : "𝑲",
429 "\\mbfitK" : "𝑲",
430 "\\mbfitL" : "𝑳",
430 "\\mbfitL" : "𝑳",
431 "\\mbfitM" : "𝑴",
431 "\\mbfitM" : "𝑴",
432 "\\mbfitN" : "𝑵",
432 "\\mbfitN" : "𝑵",
433 "\\mbfitO" : "𝑶",
433 "\\mbfitO" : "𝑶",
434 "\\mbfitP" : "𝑷",
434 "\\mbfitP" : "𝑷",
435 "\\mbfitQ" : "𝑸",
435 "\\mbfitQ" : "𝑸",
436 "\\mbfitR" : "𝑹",
436 "\\mbfitR" : "𝑹",
437 "\\mbfitS" : "𝑺",
437 "\\mbfitS" : "𝑺",
438 "\\mbfitT" : "𝑻",
438 "\\mbfitT" : "𝑻",
439 "\\mbfitU" : "𝑼",
439 "\\mbfitU" : "𝑼",
440 "\\mbfitV" : "𝑽",
440 "\\mbfitV" : "𝑽",
441 "\\mbfitW" : "𝑾",
441 "\\mbfitW" : "𝑾",
442 "\\mbfitX" : "𝑿",
442 "\\mbfitX" : "𝑿",
443 "\\mbfitY" : "𝒀",
443 "\\mbfitY" : "𝒀",
444 "\\mbfitZ" : "𝒁",
444 "\\mbfitZ" : "𝒁",
445 "\\mbfita" : "𝒂",
445 "\\mbfita" : "𝒂",
446 "\\mbfitb" : "𝒃",
446 "\\mbfitb" : "𝒃",
447 "\\mbfitc" : "𝒄",
447 "\\mbfitc" : "𝒄",
448 "\\mbfitd" : "𝒅",
448 "\\mbfitd" : "𝒅",
449 "\\mbfite" : "𝒆",
449 "\\mbfite" : "𝒆",
450 "\\mbfitf" : "𝒇",
450 "\\mbfitf" : "𝒇",
451 "\\mbfitg" : "𝒈",
451 "\\mbfitg" : "𝒈",
452 "\\mbfith" : "𝒉",
452 "\\mbfith" : "𝒉",
453 "\\mbfiti" : "𝒊",
453 "\\mbfiti" : "𝒊",
454 "\\mbfitj" : "𝒋",
454 "\\mbfitj" : "𝒋",
455 "\\mbfitk" : "𝒌",
455 "\\mbfitk" : "𝒌",
456 "\\mbfitl" : "𝒍",
456 "\\mbfitl" : "𝒍",
457 "\\mbfitm" : "𝒎",
457 "\\mbfitm" : "𝒎",
458 "\\mbfitn" : "𝒏",
458 "\\mbfitn" : "𝒏",
459 "\\mbfito" : "𝒐",
459 "\\mbfito" : "𝒐",
460 "\\mbfitp" : "𝒑",
460 "\\mbfitp" : "𝒑",
461 "\\mbfitq" : "𝒒",
461 "\\mbfitq" : "𝒒",
462 "\\mbfitr" : "𝒓",
462 "\\mbfitr" : "𝒓",
463 "\\mbfits" : "𝒔",
463 "\\mbfits" : "𝒔",
464 "\\mbfitt" : "𝒕",
464 "\\mbfitt" : "𝒕",
465 "\\mbfitu" : "𝒖",
465 "\\mbfitu" : "𝒖",
466 "\\mbfitv" : "𝒗",
466 "\\mbfitv" : "𝒗",
467 "\\mbfitw" : "𝒘",
467 "\\mbfitw" : "𝒘",
468 "\\mbfitx" : "𝒙",
468 "\\mbfitx" : "𝒙",
469 "\\mbfity" : "𝒚",
469 "\\mbfity" : "𝒚",
470 "\\mbfitz" : "𝒛",
470 "\\mbfitz" : "𝒛",
471 "\\mscrA" : "𝒜",
471 "\\mscrA" : "𝒜",
472 "\\mscrC" : "𝒞",
472 "\\mscrC" : "𝒞",
473 "\\mscrD" : "𝒟",
473 "\\mscrD" : "𝒟",
474 "\\mscrG" : "𝒢",
474 "\\mscrG" : "𝒢",
475 "\\mscrJ" : "𝒥",
475 "\\mscrJ" : "𝒥",
476 "\\mscrK" : "𝒦",
476 "\\mscrK" : "𝒦",
477 "\\mscrN" : "𝒩",
477 "\\mscrN" : "𝒩",
478 "\\mscrO" : "𝒪",
478 "\\mscrO" : "𝒪",
479 "\\mscrP" : "𝒫",
479 "\\mscrP" : "𝒫",
480 "\\mscrQ" : "𝒬",
480 "\\mscrQ" : "𝒬",
481 "\\mscrS" : "𝒮",
481 "\\mscrS" : "𝒮",
482 "\\mscrT" : "𝒯",
482 "\\mscrT" : "𝒯",
483 "\\mscrU" : "𝒰",
483 "\\mscrU" : "𝒰",
484 "\\mscrV" : "𝒱",
484 "\\mscrV" : "𝒱",
485 "\\mscrW" : "𝒲",
485 "\\mscrW" : "𝒲",
486 "\\mscrX" : "𝒳",
486 "\\mscrX" : "𝒳",
487 "\\mscrY" : "𝒴",
487 "\\mscrY" : "𝒴",
488 "\\mscrZ" : "𝒵",
488 "\\mscrZ" : "𝒵",
489 "\\mscra" : "𝒶",
489 "\\mscra" : "𝒶",
490 "\\mscrb" : "𝒷",
490 "\\mscrb" : "𝒷",
491 "\\mscrc" : "𝒸",
491 "\\mscrc" : "𝒸",
492 "\\mscrd" : "𝒹",
492 "\\mscrd" : "𝒹",
493 "\\mscrf" : "𝒻",
493 "\\mscrf" : "𝒻",
494 "\\mscrh" : "𝒽",
494 "\\mscrh" : "𝒽",
495 "\\mscri" : "𝒾",
495 "\\mscri" : "𝒾",
496 "\\mscrj" : "𝒿",
496 "\\mscrj" : "𝒿",
497 "\\mscrk" : "𝓀",
497 "\\mscrk" : "𝓀",
498 "\\mscrm" : "𝓂",
498 "\\mscrm" : "𝓂",
499 "\\mscrn" : "𝓃",
499 "\\mscrn" : "𝓃",
500 "\\mscrp" : "𝓅",
500 "\\mscrp" : "𝓅",
501 "\\mscrq" : "𝓆",
501 "\\mscrq" : "𝓆",
502 "\\mscrr" : "𝓇",
502 "\\mscrr" : "𝓇",
503 "\\mscrs" : "𝓈",
503 "\\mscrs" : "𝓈",
504 "\\mscrt" : "𝓉",
504 "\\mscrt" : "𝓉",
505 "\\mscru" : "𝓊",
505 "\\mscru" : "𝓊",
506 "\\mscrv" : "𝓋",
506 "\\mscrv" : "𝓋",
507 "\\mscrw" : "𝓌",
507 "\\mscrw" : "𝓌",
508 "\\mscrx" : "𝓍",
508 "\\mscrx" : "𝓍",
509 "\\mscry" : "𝓎",
509 "\\mscry" : "𝓎",
510 "\\mscrz" : "𝓏",
510 "\\mscrz" : "𝓏",
511 "\\mbfscrA" : "𝓐",
511 "\\mbfscrA" : "𝓐",
512 "\\mbfscrB" : "𝓑",
512 "\\mbfscrB" : "𝓑",
513 "\\mbfscrC" : "𝓒",
513 "\\mbfscrC" : "𝓒",
514 "\\mbfscrD" : "𝓓",
514 "\\mbfscrD" : "𝓓",
515 "\\mbfscrE" : "𝓔",
515 "\\mbfscrE" : "𝓔",
516 "\\mbfscrF" : "𝓕",
516 "\\mbfscrF" : "𝓕",
517 "\\mbfscrG" : "𝓖",
517 "\\mbfscrG" : "𝓖",
518 "\\mbfscrH" : "𝓗",
518 "\\mbfscrH" : "𝓗",
519 "\\mbfscrI" : "𝓘",
519 "\\mbfscrI" : "𝓘",
520 "\\mbfscrJ" : "𝓙",
520 "\\mbfscrJ" : "𝓙",
521 "\\mbfscrK" : "𝓚",
521 "\\mbfscrK" : "𝓚",
522 "\\mbfscrL" : "𝓛",
522 "\\mbfscrL" : "𝓛",
523 "\\mbfscrM" : "𝓜",
523 "\\mbfscrM" : "𝓜",
524 "\\mbfscrN" : "𝓝",
524 "\\mbfscrN" : "𝓝",
525 "\\mbfscrO" : "𝓞",
525 "\\mbfscrO" : "𝓞",
526 "\\mbfscrP" : "𝓟",
526 "\\mbfscrP" : "𝓟",
527 "\\mbfscrQ" : "𝓠",
527 "\\mbfscrQ" : "𝓠",
528 "\\mbfscrR" : "𝓡",
528 "\\mbfscrR" : "𝓡",
529 "\\mbfscrS" : "𝓢",
529 "\\mbfscrS" : "𝓢",
530 "\\mbfscrT" : "𝓣",
530 "\\mbfscrT" : "𝓣",
531 "\\mbfscrU" : "𝓤",
531 "\\mbfscrU" : "𝓤",
532 "\\mbfscrV" : "𝓥",
532 "\\mbfscrV" : "𝓥",
533 "\\mbfscrW" : "𝓦",
533 "\\mbfscrW" : "𝓦",
534 "\\mbfscrX" : "𝓧",
534 "\\mbfscrX" : "𝓧",
535 "\\mbfscrY" : "𝓨",
535 "\\mbfscrY" : "𝓨",
536 "\\mbfscrZ" : "𝓩",
536 "\\mbfscrZ" : "𝓩",
537 "\\mbfscra" : "𝓪",
537 "\\mbfscra" : "𝓪",
538 "\\mbfscrb" : "𝓫",
538 "\\mbfscrb" : "𝓫",
539 "\\mbfscrc" : "𝓬",
539 "\\mbfscrc" : "𝓬",
540 "\\mbfscrd" : "𝓭",
540 "\\mbfscrd" : "𝓭",
541 "\\mbfscre" : "𝓮",
541 "\\mbfscre" : "𝓮",
542 "\\mbfscrf" : "𝓯",
542 "\\mbfscrf" : "𝓯",
543 "\\mbfscrg" : "𝓰",
543 "\\mbfscrg" : "𝓰",
544 "\\mbfscrh" : "𝓱",
544 "\\mbfscrh" : "𝓱",
545 "\\mbfscri" : "𝓲",
545 "\\mbfscri" : "𝓲",
546 "\\mbfscrj" : "𝓳",
546 "\\mbfscrj" : "𝓳",
547 "\\mbfscrk" : "𝓴",
547 "\\mbfscrk" : "𝓴",
548 "\\mbfscrl" : "𝓵",
548 "\\mbfscrl" : "𝓵",
549 "\\mbfscrm" : "𝓶",
549 "\\mbfscrm" : "𝓶",
550 "\\mbfscrn" : "𝓷",
550 "\\mbfscrn" : "𝓷",
551 "\\mbfscro" : "𝓸",
551 "\\mbfscro" : "𝓸",
552 "\\mbfscrp" : "𝓹",
552 "\\mbfscrp" : "𝓹",
553 "\\mbfscrq" : "𝓺",
553 "\\mbfscrq" : "𝓺",
554 "\\mbfscrr" : "𝓻",
554 "\\mbfscrr" : "𝓻",
555 "\\mbfscrs" : "𝓼",
555 "\\mbfscrs" : "𝓼",
556 "\\mbfscrt" : "𝓽",
556 "\\mbfscrt" : "𝓽",
557 "\\mbfscru" : "𝓾",
557 "\\mbfscru" : "𝓾",
558 "\\mbfscrv" : "𝓿",
558 "\\mbfscrv" : "𝓿",
559 "\\mbfscrw" : "𝔀",
559 "\\mbfscrw" : "𝔀",
560 "\\mbfscrx" : "𝔁",
560 "\\mbfscrx" : "𝔁",
561 "\\mbfscry" : "𝔂",
561 "\\mbfscry" : "𝔂",
562 "\\mbfscrz" : "𝔃",
562 "\\mbfscrz" : "𝔃",
563 "\\mfrakA" : "𝔄",
563 "\\mfrakA" : "𝔄",
564 "\\mfrakB" : "𝔅",
564 "\\mfrakB" : "𝔅",
565 "\\mfrakD" : "𝔇",
565 "\\mfrakD" : "𝔇",
566 "\\mfrakE" : "𝔈",
566 "\\mfrakE" : "𝔈",
567 "\\mfrakF" : "𝔉",
567 "\\mfrakF" : "𝔉",
568 "\\mfrakG" : "𝔊",
568 "\\mfrakG" : "𝔊",
569 "\\mfrakJ" : "𝔍",
569 "\\mfrakJ" : "𝔍",
570 "\\mfrakK" : "𝔎",
570 "\\mfrakK" : "𝔎",
571 "\\mfrakL" : "𝔏",
571 "\\mfrakL" : "𝔏",
572 "\\mfrakM" : "𝔐",
572 "\\mfrakM" : "𝔐",
573 "\\mfrakN" : "𝔑",
573 "\\mfrakN" : "𝔑",
574 "\\mfrakO" : "𝔒",
574 "\\mfrakO" : "𝔒",
575 "\\mfrakP" : "𝔓",
575 "\\mfrakP" : "𝔓",
576 "\\mfrakQ" : "𝔔",
576 "\\mfrakQ" : "𝔔",
577 "\\mfrakS" : "𝔖",
577 "\\mfrakS" : "𝔖",
578 "\\mfrakT" : "𝔗",
578 "\\mfrakT" : "𝔗",
579 "\\mfrakU" : "𝔘",
579 "\\mfrakU" : "𝔘",
580 "\\mfrakV" : "𝔙",
580 "\\mfrakV" : "𝔙",
581 "\\mfrakW" : "𝔚",
581 "\\mfrakW" : "𝔚",
582 "\\mfrakX" : "𝔛",
582 "\\mfrakX" : "𝔛",
583 "\\mfrakY" : "𝔜",
583 "\\mfrakY" : "𝔜",
584 "\\mfraka" : "𝔞",
584 "\\mfraka" : "𝔞",
585 "\\mfrakb" : "𝔟",
585 "\\mfrakb" : "𝔟",
586 "\\mfrakc" : "𝔠",
586 "\\mfrakc" : "𝔠",
587 "\\mfrakd" : "𝔡",
587 "\\mfrakd" : "𝔡",
588 "\\mfrake" : "𝔢",
588 "\\mfrake" : "𝔢",
589 "\\mfrakf" : "𝔣",
589 "\\mfrakf" : "𝔣",
590 "\\mfrakg" : "𝔤",
590 "\\mfrakg" : "𝔤",
591 "\\mfrakh" : "𝔥",
591 "\\mfrakh" : "𝔥",
592 "\\mfraki" : "𝔦",
592 "\\mfraki" : "𝔦",
593 "\\mfrakj" : "𝔧",
593 "\\mfrakj" : "𝔧",
594 "\\mfrakk" : "𝔨",
594 "\\mfrakk" : "𝔨",
595 "\\mfrakl" : "𝔩",
595 "\\mfrakl" : "𝔩",
596 "\\mfrakm" : "𝔪",
596 "\\mfrakm" : "𝔪",
597 "\\mfrakn" : "𝔫",
597 "\\mfrakn" : "𝔫",
598 "\\mfrako" : "𝔬",
598 "\\mfrako" : "𝔬",
599 "\\mfrakp" : "𝔭",
599 "\\mfrakp" : "𝔭",
600 "\\mfrakq" : "𝔮",
600 "\\mfrakq" : "𝔮",
601 "\\mfrakr" : "𝔯",
601 "\\mfrakr" : "𝔯",
602 "\\mfraks" : "𝔰",
602 "\\mfraks" : "𝔰",
603 "\\mfrakt" : "𝔱",
603 "\\mfrakt" : "𝔱",
604 "\\mfraku" : "𝔲",
604 "\\mfraku" : "𝔲",
605 "\\mfrakv" : "𝔳",
605 "\\mfrakv" : "𝔳",
606 "\\mfrakw" : "𝔴",
606 "\\mfrakw" : "𝔴",
607 "\\mfrakx" : "𝔵",
607 "\\mfrakx" : "𝔵",
608 "\\mfraky" : "𝔶",
608 "\\mfraky" : "𝔶",
609 "\\mfrakz" : "𝔷",
609 "\\mfrakz" : "𝔷",
610 "\\BbbA" : "𝔸",
610 "\\BbbA" : "𝔸",
611 "\\BbbB" : "𝔹",
611 "\\BbbB" : "𝔹",
612 "\\BbbD" : "𝔻",
612 "\\BbbD" : "𝔻",
613 "\\BbbE" : "𝔼",
613 "\\BbbE" : "𝔼",
614 "\\BbbF" : "𝔽",
614 "\\BbbF" : "𝔽",
615 "\\BbbG" : "𝔾",
615 "\\BbbG" : "𝔾",
616 "\\BbbI" : "𝕀",
616 "\\BbbI" : "𝕀",
617 "\\BbbJ" : "𝕁",
617 "\\BbbJ" : "𝕁",
618 "\\BbbK" : "𝕂",
618 "\\BbbK" : "𝕂",
619 "\\BbbL" : "𝕃",
619 "\\BbbL" : "𝕃",
620 "\\BbbM" : "𝕄",
620 "\\BbbM" : "𝕄",
621 "\\BbbO" : "𝕆",
621 "\\BbbO" : "𝕆",
622 "\\BbbS" : "𝕊",
622 "\\BbbS" : "𝕊",
623 "\\BbbT" : "𝕋",
623 "\\BbbT" : "𝕋",
624 "\\BbbU" : "𝕌",
624 "\\BbbU" : "𝕌",
625 "\\BbbV" : "𝕍",
625 "\\BbbV" : "𝕍",
626 "\\BbbW" : "𝕎",
626 "\\BbbW" : "𝕎",
627 "\\BbbX" : "𝕏",
627 "\\BbbX" : "𝕏",
628 "\\BbbY" : "𝕐",
628 "\\BbbY" : "𝕐",
629 "\\Bbba" : "𝕒",
629 "\\Bbba" : "𝕒",
630 "\\Bbbb" : "𝕓",
630 "\\Bbbb" : "𝕓",
631 "\\Bbbc" : "𝕔",
631 "\\Bbbc" : "𝕔",
632 "\\Bbbd" : "𝕕",
632 "\\Bbbd" : "𝕕",
633 "\\Bbbe" : "𝕖",
633 "\\Bbbe" : "𝕖",
634 "\\Bbbf" : "𝕗",
634 "\\Bbbf" : "𝕗",
635 "\\Bbbg" : "𝕘",
635 "\\Bbbg" : "𝕘",
636 "\\Bbbh" : "𝕙",
636 "\\Bbbh" : "𝕙",
637 "\\Bbbi" : "𝕚",
637 "\\Bbbi" : "𝕚",
638 "\\Bbbj" : "𝕛",
638 "\\Bbbj" : "𝕛",
639 "\\Bbbk" : "𝕜",
639 "\\Bbbk" : "𝕜",
640 "\\Bbbl" : "𝕝",
640 "\\Bbbl" : "𝕝",
641 "\\Bbbm" : "𝕞",
641 "\\Bbbm" : "𝕞",
642 "\\Bbbn" : "𝕟",
642 "\\Bbbn" : "𝕟",
643 "\\Bbbo" : "𝕠",
643 "\\Bbbo" : "𝕠",
644 "\\Bbbp" : "𝕡",
644 "\\Bbbp" : "𝕡",
645 "\\Bbbq" : "𝕢",
645 "\\Bbbq" : "𝕢",
646 "\\Bbbr" : "𝕣",
646 "\\Bbbr" : "𝕣",
647 "\\Bbbs" : "𝕤",
647 "\\Bbbs" : "𝕤",
648 "\\Bbbt" : "𝕥",
648 "\\Bbbt" : "𝕥",
649 "\\Bbbu" : "𝕦",
649 "\\Bbbu" : "𝕦",
650 "\\Bbbv" : "𝕧",
650 "\\Bbbv" : "𝕧",
651 "\\Bbbw" : "𝕨",
651 "\\Bbbw" : "𝕨",
652 "\\Bbbx" : "𝕩",
652 "\\Bbbx" : "𝕩",
653 "\\Bbby" : "𝕪",
653 "\\Bbby" : "𝕪",
654 "\\Bbbz" : "𝕫",
654 "\\Bbbz" : "𝕫",
655 "\\mbffrakA" : "𝕬",
655 "\\mbffrakA" : "𝕬",
656 "\\mbffrakB" : "𝕭",
656 "\\mbffrakB" : "𝕭",
657 "\\mbffrakC" : "𝕮",
657 "\\mbffrakC" : "𝕮",
658 "\\mbffrakD" : "𝕯",
658 "\\mbffrakD" : "𝕯",
659 "\\mbffrakE" : "𝕰",
659 "\\mbffrakE" : "𝕰",
660 "\\mbffrakF" : "𝕱",
660 "\\mbffrakF" : "𝕱",
661 "\\mbffrakG" : "𝕲",
661 "\\mbffrakG" : "𝕲",
662 "\\mbffrakH" : "𝕳",
662 "\\mbffrakH" : "𝕳",
663 "\\mbffrakI" : "𝕴",
663 "\\mbffrakI" : "𝕴",
664 "\\mbffrakJ" : "𝕵",
664 "\\mbffrakJ" : "𝕵",
665 "\\mbffrakK" : "𝕶",
665 "\\mbffrakK" : "𝕶",
666 "\\mbffrakL" : "𝕷",
666 "\\mbffrakL" : "𝕷",
667 "\\mbffrakM" : "𝕸",
667 "\\mbffrakM" : "𝕸",
668 "\\mbffrakN" : "𝕹",
668 "\\mbffrakN" : "𝕹",
669 "\\mbffrakO" : "𝕺",
669 "\\mbffrakO" : "𝕺",
670 "\\mbffrakP" : "𝕻",
670 "\\mbffrakP" : "𝕻",
671 "\\mbffrakQ" : "𝕼",
671 "\\mbffrakQ" : "𝕼",
672 "\\mbffrakR" : "𝕽",
672 "\\mbffrakR" : "𝕽",
673 "\\mbffrakS" : "𝕾",
673 "\\mbffrakS" : "𝕾",
674 "\\mbffrakT" : "𝕿",
674 "\\mbffrakT" : "𝕿",
675 "\\mbffrakU" : "𝖀",
675 "\\mbffrakU" : "𝖀",
676 "\\mbffrakV" : "𝖁",
676 "\\mbffrakV" : "𝖁",
677 "\\mbffrakW" : "𝖂",
677 "\\mbffrakW" : "𝖂",
678 "\\mbffrakX" : "𝖃",
678 "\\mbffrakX" : "𝖃",
679 "\\mbffrakY" : "𝖄",
679 "\\mbffrakY" : "𝖄",
680 "\\mbffrakZ" : "𝖅",
680 "\\mbffrakZ" : "𝖅",
681 "\\mbffraka" : "𝖆",
681 "\\mbffraka" : "𝖆",
682 "\\mbffrakb" : "𝖇",
682 "\\mbffrakb" : "𝖇",
683 "\\mbffrakc" : "𝖈",
683 "\\mbffrakc" : "𝖈",
684 "\\mbffrakd" : "𝖉",
684 "\\mbffrakd" : "𝖉",
685 "\\mbffrake" : "𝖊",
685 "\\mbffrake" : "𝖊",
686 "\\mbffrakf" : "𝖋",
686 "\\mbffrakf" : "𝖋",
687 "\\mbffrakg" : "𝖌",
687 "\\mbffrakg" : "𝖌",
688 "\\mbffrakh" : "𝖍",
688 "\\mbffrakh" : "𝖍",
689 "\\mbffraki" : "𝖎",
689 "\\mbffraki" : "𝖎",
690 "\\mbffrakj" : "𝖏",
690 "\\mbffrakj" : "𝖏",
691 "\\mbffrakk" : "𝖐",
691 "\\mbffrakk" : "𝖐",
692 "\\mbffrakl" : "𝖑",
692 "\\mbffrakl" : "𝖑",
693 "\\mbffrakm" : "𝖒",
693 "\\mbffrakm" : "𝖒",
694 "\\mbffrakn" : "𝖓",
694 "\\mbffrakn" : "𝖓",
695 "\\mbffrako" : "𝖔",
695 "\\mbffrako" : "𝖔",
696 "\\mbffrakp" : "𝖕",
696 "\\mbffrakp" : "𝖕",
697 "\\mbffrakq" : "𝖖",
697 "\\mbffrakq" : "𝖖",
698 "\\mbffrakr" : "𝖗",
698 "\\mbffrakr" : "𝖗",
699 "\\mbffraks" : "𝖘",
699 "\\mbffraks" : "𝖘",
700 "\\mbffrakt" : "𝖙",
700 "\\mbffrakt" : "𝖙",
701 "\\mbffraku" : "𝖚",
701 "\\mbffraku" : "𝖚",
702 "\\mbffrakv" : "𝖛",
702 "\\mbffrakv" : "𝖛",
703 "\\mbffrakw" : "𝖜",
703 "\\mbffrakw" : "𝖜",
704 "\\mbffrakx" : "𝖝",
704 "\\mbffrakx" : "𝖝",
705 "\\mbffraky" : "𝖞",
705 "\\mbffraky" : "𝖞",
706 "\\mbffrakz" : "𝖟",
706 "\\mbffrakz" : "𝖟",
707 "\\msansA" : "𝖠",
707 "\\msansA" : "𝖠",
708 "\\msansB" : "𝖡",
708 "\\msansB" : "𝖡",
709 "\\msansC" : "𝖢",
709 "\\msansC" : "𝖢",
710 "\\msansD" : "𝖣",
710 "\\msansD" : "𝖣",
711 "\\msansE" : "𝖤",
711 "\\msansE" : "𝖤",
712 "\\msansF" : "𝖥",
712 "\\msansF" : "𝖥",
713 "\\msansG" : "𝖦",
713 "\\msansG" : "𝖦",
714 "\\msansH" : "𝖧",
714 "\\msansH" : "𝖧",
715 "\\msansI" : "𝖨",
715 "\\msansI" : "𝖨",
716 "\\msansJ" : "𝖩",
716 "\\msansJ" : "𝖩",
717 "\\msansK" : "𝖪",
717 "\\msansK" : "𝖪",
718 "\\msansL" : "𝖫",
718 "\\msansL" : "𝖫",
719 "\\msansM" : "𝖬",
719 "\\msansM" : "𝖬",
720 "\\msansN" : "𝖭",
720 "\\msansN" : "𝖭",
721 "\\msansO" : "𝖮",
721 "\\msansO" : "𝖮",
722 "\\msansP" : "𝖯",
722 "\\msansP" : "𝖯",
723 "\\msansQ" : "𝖰",
723 "\\msansQ" : "𝖰",
724 "\\msansR" : "𝖱",
724 "\\msansR" : "𝖱",
725 "\\msansS" : "𝖲",
725 "\\msansS" : "𝖲",
726 "\\msansT" : "𝖳",
726 "\\msansT" : "𝖳",
727 "\\msansU" : "𝖴",
727 "\\msansU" : "𝖴",
728 "\\msansV" : "𝖵",
728 "\\msansV" : "𝖵",
729 "\\msansW" : "𝖶",
729 "\\msansW" : "𝖶",
730 "\\msansX" : "𝖷",
730 "\\msansX" : "𝖷",
731 "\\msansY" : "𝖸",
731 "\\msansY" : "𝖸",
732 "\\msansZ" : "𝖹",
732 "\\msansZ" : "𝖹",
733 "\\msansa" : "𝖺",
733 "\\msansa" : "𝖺",
734 "\\msansb" : "𝖻",
734 "\\msansb" : "𝖻",
735 "\\msansc" : "𝖼",
735 "\\msansc" : "𝖼",
736 "\\msansd" : "𝖽",
736 "\\msansd" : "𝖽",
737 "\\msanse" : "𝖾",
737 "\\msanse" : "𝖾",
738 "\\msansf" : "𝖿",
738 "\\msansf" : "𝖿",
739 "\\msansg" : "𝗀",
739 "\\msansg" : "𝗀",
740 "\\msansh" : "𝗁",
740 "\\msansh" : "𝗁",
741 "\\msansi" : "𝗂",
741 "\\msansi" : "𝗂",
742 "\\msansj" : "𝗃",
742 "\\msansj" : "𝗃",
743 "\\msansk" : "𝗄",
743 "\\msansk" : "𝗄",
744 "\\msansl" : "𝗅",
744 "\\msansl" : "𝗅",
745 "\\msansm" : "𝗆",
745 "\\msansm" : "𝗆",
746 "\\msansn" : "𝗇",
746 "\\msansn" : "𝗇",
747 "\\msanso" : "𝗈",
747 "\\msanso" : "𝗈",
748 "\\msansp" : "𝗉",
748 "\\msansp" : "𝗉",
749 "\\msansq" : "𝗊",
749 "\\msansq" : "𝗊",
750 "\\msansr" : "𝗋",
750 "\\msansr" : "𝗋",
751 "\\msanss" : "𝗌",
751 "\\msanss" : "𝗌",
752 "\\msanst" : "𝗍",
752 "\\msanst" : "𝗍",
753 "\\msansu" : "𝗎",
753 "\\msansu" : "𝗎",
754 "\\msansv" : "𝗏",
754 "\\msansv" : "𝗏",
755 "\\msansw" : "𝗐",
755 "\\msansw" : "𝗐",
756 "\\msansx" : "𝗑",
756 "\\msansx" : "𝗑",
757 "\\msansy" : "𝗒",
757 "\\msansy" : "𝗒",
758 "\\msansz" : "𝗓",
758 "\\msansz" : "𝗓",
759 "\\mbfsansA" : "𝗔",
759 "\\mbfsansA" : "𝗔",
760 "\\mbfsansB" : "𝗕",
760 "\\mbfsansB" : "𝗕",
761 "\\mbfsansC" : "𝗖",
761 "\\mbfsansC" : "𝗖",
762 "\\mbfsansD" : "𝗗",
762 "\\mbfsansD" : "𝗗",
763 "\\mbfsansE" : "𝗘",
763 "\\mbfsansE" : "𝗘",
764 "\\mbfsansF" : "𝗙",
764 "\\mbfsansF" : "𝗙",
765 "\\mbfsansG" : "𝗚",
765 "\\mbfsansG" : "𝗚",
766 "\\mbfsansH" : "𝗛",
766 "\\mbfsansH" : "𝗛",
767 "\\mbfsansI" : "𝗜",
767 "\\mbfsansI" : "𝗜",
768 "\\mbfsansJ" : "𝗝",
768 "\\mbfsansJ" : "𝗝",
769 "\\mbfsansK" : "𝗞",
769 "\\mbfsansK" : "𝗞",
770 "\\mbfsansL" : "𝗟",
770 "\\mbfsansL" : "𝗟",
771 "\\mbfsansM" : "𝗠",
771 "\\mbfsansM" : "𝗠",
772 "\\mbfsansN" : "𝗡",
772 "\\mbfsansN" : "𝗡",
773 "\\mbfsansO" : "𝗢",
773 "\\mbfsansO" : "𝗢",
774 "\\mbfsansP" : "𝗣",
774 "\\mbfsansP" : "𝗣",
775 "\\mbfsansQ" : "𝗤",
775 "\\mbfsansQ" : "𝗤",
776 "\\mbfsansR" : "𝗥",
776 "\\mbfsansR" : "𝗥",
777 "\\mbfsansS" : "𝗦",
777 "\\mbfsansS" : "𝗦",
778 "\\mbfsansT" : "𝗧",
778 "\\mbfsansT" : "𝗧",
779 "\\mbfsansU" : "𝗨",
779 "\\mbfsansU" : "𝗨",
780 "\\mbfsansV" : "𝗩",
780 "\\mbfsansV" : "𝗩",
781 "\\mbfsansW" : "𝗪",
781 "\\mbfsansW" : "𝗪",
782 "\\mbfsansX" : "𝗫",
782 "\\mbfsansX" : "𝗫",
783 "\\mbfsansY" : "𝗬",
783 "\\mbfsansY" : "𝗬",
784 "\\mbfsansZ" : "𝗭",
784 "\\mbfsansZ" : "𝗭",
785 "\\mbfsansa" : "𝗮",
785 "\\mbfsansa" : "𝗮",
786 "\\mbfsansb" : "𝗯",
786 "\\mbfsansb" : "𝗯",
787 "\\mbfsansc" : "𝗰",
787 "\\mbfsansc" : "𝗰",
788 "\\mbfsansd" : "𝗱",
788 "\\mbfsansd" : "𝗱",
789 "\\mbfsanse" : "𝗲",
789 "\\mbfsanse" : "𝗲",
790 "\\mbfsansf" : "𝗳",
790 "\\mbfsansf" : "𝗳",
791 "\\mbfsansg" : "𝗴",
791 "\\mbfsansg" : "𝗴",
792 "\\mbfsansh" : "𝗵",
792 "\\mbfsansh" : "𝗵",
793 "\\mbfsansi" : "𝗶",
793 "\\mbfsansi" : "𝗶",
794 "\\mbfsansj" : "𝗷",
794 "\\mbfsansj" : "𝗷",
795 "\\mbfsansk" : "𝗸",
795 "\\mbfsansk" : "𝗸",
796 "\\mbfsansl" : "𝗹",
796 "\\mbfsansl" : "𝗹",
797 "\\mbfsansm" : "𝗺",
797 "\\mbfsansm" : "𝗺",
798 "\\mbfsansn" : "𝗻",
798 "\\mbfsansn" : "𝗻",
799 "\\mbfsanso" : "𝗼",
799 "\\mbfsanso" : "𝗼",
800 "\\mbfsansp" : "𝗽",
800 "\\mbfsansp" : "𝗽",
801 "\\mbfsansq" : "𝗾",
801 "\\mbfsansq" : "𝗾",
802 "\\mbfsansr" : "𝗿",
802 "\\mbfsansr" : "𝗿",
803 "\\mbfsanss" : "𝘀",
803 "\\mbfsanss" : "𝘀",
804 "\\mbfsanst" : "𝘁",
804 "\\mbfsanst" : "𝘁",
805 "\\mbfsansu" : "𝘂",
805 "\\mbfsansu" : "𝘂",
806 "\\mbfsansv" : "𝘃",
806 "\\mbfsansv" : "𝘃",
807 "\\mbfsansw" : "𝘄",
807 "\\mbfsansw" : "𝘄",
808 "\\mbfsansx" : "𝘅",
808 "\\mbfsansx" : "𝘅",
809 "\\mbfsansy" : "𝘆",
809 "\\mbfsansy" : "𝘆",
810 "\\mbfsansz" : "𝘇",
810 "\\mbfsansz" : "𝘇",
811 "\\mitsansA" : "𝘈",
811 "\\mitsansA" : "𝘈",
812 "\\mitsansB" : "𝘉",
812 "\\mitsansB" : "𝘉",
813 "\\mitsansC" : "𝘊",
813 "\\mitsansC" : "𝘊",
814 "\\mitsansD" : "𝘋",
814 "\\mitsansD" : "𝘋",
815 "\\mitsansE" : "𝘌",
815 "\\mitsansE" : "𝘌",
816 "\\mitsansF" : "𝘍",
816 "\\mitsansF" : "𝘍",
817 "\\mitsansG" : "𝘎",
817 "\\mitsansG" : "𝘎",
818 "\\mitsansH" : "𝘏",
818 "\\mitsansH" : "𝘏",
819 "\\mitsansI" : "𝘐",
819 "\\mitsansI" : "𝘐",
820 "\\mitsansJ" : "𝘑",
820 "\\mitsansJ" : "𝘑",
821 "\\mitsansK" : "𝘒",
821 "\\mitsansK" : "𝘒",
822 "\\mitsansL" : "𝘓",
822 "\\mitsansL" : "𝘓",
823 "\\mitsansM" : "𝘔",
823 "\\mitsansM" : "𝘔",
824 "\\mitsansN" : "𝘕",
824 "\\mitsansN" : "𝘕",
825 "\\mitsansO" : "𝘖",
825 "\\mitsansO" : "𝘖",
826 "\\mitsansP" : "𝘗",
826 "\\mitsansP" : "𝘗",
827 "\\mitsansQ" : "𝘘",
827 "\\mitsansQ" : "𝘘",
828 "\\mitsansR" : "𝘙",
828 "\\mitsansR" : "𝘙",
829 "\\mitsansS" : "𝘚",
829 "\\mitsansS" : "𝘚",
830 "\\mitsansT" : "𝘛",
830 "\\mitsansT" : "𝘛",
831 "\\mitsansU" : "𝘜",
831 "\\mitsansU" : "𝘜",
832 "\\mitsansV" : "𝘝",
832 "\\mitsansV" : "𝘝",
833 "\\mitsansW" : "𝘞",
833 "\\mitsansW" : "𝘞",
834 "\\mitsansX" : "𝘟",
834 "\\mitsansX" : "𝘟",
835 "\\mitsansY" : "𝘠",
835 "\\mitsansY" : "𝘠",
836 "\\mitsansZ" : "𝘡",
836 "\\mitsansZ" : "𝘡",
837 "\\mitsansa" : "𝘢",
837 "\\mitsansa" : "𝘢",
838 "\\mitsansb" : "𝘣",
838 "\\mitsansb" : "𝘣",
839 "\\mitsansc" : "𝘤",
839 "\\mitsansc" : "𝘤",
840 "\\mitsansd" : "𝘥",
840 "\\mitsansd" : "𝘥",
841 "\\mitsanse" : "𝘦",
841 "\\mitsanse" : "𝘦",
842 "\\mitsansf" : "𝘧",
842 "\\mitsansf" : "𝘧",
843 "\\mitsansg" : "𝘨",
843 "\\mitsansg" : "𝘨",
844 "\\mitsansh" : "𝘩",
844 "\\mitsansh" : "𝘩",
845 "\\mitsansi" : "𝘪",
845 "\\mitsansi" : "𝘪",
846 "\\mitsansj" : "𝘫",
846 "\\mitsansj" : "𝘫",
847 "\\mitsansk" : "𝘬",
847 "\\mitsansk" : "𝘬",
848 "\\mitsansl" : "𝘭",
848 "\\mitsansl" : "𝘭",
849 "\\mitsansm" : "𝘮",
849 "\\mitsansm" : "𝘮",
850 "\\mitsansn" : "𝘯",
850 "\\mitsansn" : "𝘯",
851 "\\mitsanso" : "𝘰",
851 "\\mitsanso" : "𝘰",
852 "\\mitsansp" : "𝘱",
852 "\\mitsansp" : "𝘱",
853 "\\mitsansq" : "𝘲",
853 "\\mitsansq" : "𝘲",
854 "\\mitsansr" : "𝘳",
854 "\\mitsansr" : "𝘳",
855 "\\mitsanss" : "𝘴",
855 "\\mitsanss" : "𝘴",
856 "\\mitsanst" : "𝘵",
856 "\\mitsanst" : "𝘵",
857 "\\mitsansu" : "𝘶",
857 "\\mitsansu" : "𝘶",
858 "\\mitsansv" : "𝘷",
858 "\\mitsansv" : "𝘷",
859 "\\mitsansw" : "𝘸",
859 "\\mitsansw" : "𝘸",
860 "\\mitsansx" : "𝘹",
860 "\\mitsansx" : "𝘹",
861 "\\mitsansy" : "𝘺",
861 "\\mitsansy" : "𝘺",
862 "\\mitsansz" : "𝘻",
862 "\\mitsansz" : "𝘻",
863 "\\mbfitsansA" : "𝘼",
863 "\\mbfitsansA" : "𝘼",
864 "\\mbfitsansB" : "𝘽",
864 "\\mbfitsansB" : "𝘽",
865 "\\mbfitsansC" : "𝘾",
865 "\\mbfitsansC" : "𝘾",
866 "\\mbfitsansD" : "𝘿",
866 "\\mbfitsansD" : "𝘿",
867 "\\mbfitsansE" : "𝙀",
867 "\\mbfitsansE" : "𝙀",
868 "\\mbfitsansF" : "𝙁",
868 "\\mbfitsansF" : "𝙁",
869 "\\mbfitsansG" : "𝙂",
869 "\\mbfitsansG" : "𝙂",
870 "\\mbfitsansH" : "𝙃",
870 "\\mbfitsansH" : "𝙃",
871 "\\mbfitsansI" : "𝙄",
871 "\\mbfitsansI" : "𝙄",
872 "\\mbfitsansJ" : "𝙅",
872 "\\mbfitsansJ" : "𝙅",
873 "\\mbfitsansK" : "𝙆",
873 "\\mbfitsansK" : "𝙆",
874 "\\mbfitsansL" : "𝙇",
874 "\\mbfitsansL" : "𝙇",
875 "\\mbfitsansM" : "𝙈",
875 "\\mbfitsansM" : "𝙈",
876 "\\mbfitsansN" : "𝙉",
876 "\\mbfitsansN" : "𝙉",
877 "\\mbfitsansO" : "𝙊",
877 "\\mbfitsansO" : "𝙊",
878 "\\mbfitsansP" : "𝙋",
878 "\\mbfitsansP" : "𝙋",
879 "\\mbfitsansQ" : "𝙌",
879 "\\mbfitsansQ" : "𝙌",
880 "\\mbfitsansR" : "𝙍",
880 "\\mbfitsansR" : "𝙍",
881 "\\mbfitsansS" : "𝙎",
881 "\\mbfitsansS" : "𝙎",
882 "\\mbfitsansT" : "𝙏",
882 "\\mbfitsansT" : "𝙏",
883 "\\mbfitsansU" : "𝙐",
883 "\\mbfitsansU" : "𝙐",
884 "\\mbfitsansV" : "𝙑",
884 "\\mbfitsansV" : "𝙑",
885 "\\mbfitsansW" : "𝙒",
885 "\\mbfitsansW" : "𝙒",
886 "\\mbfitsansX" : "𝙓",
886 "\\mbfitsansX" : "𝙓",
887 "\\mbfitsansY" : "𝙔",
887 "\\mbfitsansY" : "𝙔",
888 "\\mbfitsansZ" : "𝙕",
888 "\\mbfitsansZ" : "𝙕",
889 "\\mbfitsansa" : "𝙖",
889 "\\mbfitsansa" : "𝙖",
890 "\\mbfitsansb" : "𝙗",
890 "\\mbfitsansb" : "𝙗",
891 "\\mbfitsansc" : "𝙘",
891 "\\mbfitsansc" : "𝙘",
892 "\\mbfitsansd" : "𝙙",
892 "\\mbfitsansd" : "𝙙",
893 "\\mbfitsanse" : "𝙚",
893 "\\mbfitsanse" : "𝙚",
894 "\\mbfitsansf" : "𝙛",
894 "\\mbfitsansf" : "𝙛",
895 "\\mbfitsansg" : "𝙜",
895 "\\mbfitsansg" : "𝙜",
896 "\\mbfitsansh" : "𝙝",
896 "\\mbfitsansh" : "𝙝",
897 "\\mbfitsansi" : "𝙞",
897 "\\mbfitsansi" : "𝙞",
898 "\\mbfitsansj" : "𝙟",
898 "\\mbfitsansj" : "𝙟",
899 "\\mbfitsansk" : "𝙠",
899 "\\mbfitsansk" : "𝙠",
900 "\\mbfitsansl" : "𝙡",
900 "\\mbfitsansl" : "𝙡",
901 "\\mbfitsansm" : "𝙢",
901 "\\mbfitsansm" : "𝙢",
902 "\\mbfitsansn" : "𝙣",
902 "\\mbfitsansn" : "𝙣",
903 "\\mbfitsanso" : "𝙤",
903 "\\mbfitsanso" : "𝙤",
904 "\\mbfitsansp" : "𝙥",
904 "\\mbfitsansp" : "𝙥",
905 "\\mbfitsansq" : "𝙦",
905 "\\mbfitsansq" : "𝙦",
906 "\\mbfitsansr" : "𝙧",
906 "\\mbfitsansr" : "𝙧",
907 "\\mbfitsanss" : "𝙨",
907 "\\mbfitsanss" : "𝙨",
908 "\\mbfitsanst" : "𝙩",
908 "\\mbfitsanst" : "𝙩",
909 "\\mbfitsansu" : "𝙪",
909 "\\mbfitsansu" : "𝙪",
910 "\\mbfitsansv" : "𝙫",
910 "\\mbfitsansv" : "𝙫",
911 "\\mbfitsansw" : "𝙬",
911 "\\mbfitsansw" : "𝙬",
912 "\\mbfitsansx" : "𝙭",
912 "\\mbfitsansx" : "𝙭",
913 "\\mbfitsansy" : "𝙮",
913 "\\mbfitsansy" : "𝙮",
914 "\\mbfitsansz" : "𝙯",
914 "\\mbfitsansz" : "𝙯",
915 "\\mttA" : "𝙰",
915 "\\mttA" : "𝙰",
916 "\\mttB" : "𝙱",
916 "\\mttB" : "𝙱",
917 "\\mttC" : "𝙲",
917 "\\mttC" : "𝙲",
918 "\\mttD" : "𝙳",
918 "\\mttD" : "𝙳",
919 "\\mttE" : "𝙴",
919 "\\mttE" : "𝙴",
920 "\\mttF" : "𝙵",
920 "\\mttF" : "𝙵",
921 "\\mttG" : "𝙶",
921 "\\mttG" : "𝙶",
922 "\\mttH" : "𝙷",
922 "\\mttH" : "𝙷",
923 "\\mttI" : "𝙸",
923 "\\mttI" : "𝙸",
924 "\\mttJ" : "𝙹",
924 "\\mttJ" : "𝙹",
925 "\\mttK" : "𝙺",
925 "\\mttK" : "𝙺",
926 "\\mttL" : "𝙻",
926 "\\mttL" : "𝙻",
927 "\\mttM" : "𝙼",
927 "\\mttM" : "𝙼",
928 "\\mttN" : "𝙽",
928 "\\mttN" : "𝙽",
929 "\\mttO" : "𝙾",
929 "\\mttO" : "𝙾",
930 "\\mttP" : "𝙿",
930 "\\mttP" : "𝙿",
931 "\\mttQ" : "𝚀",
931 "\\mttQ" : "𝚀",
932 "\\mttR" : "𝚁",
932 "\\mttR" : "𝚁",
933 "\\mttS" : "𝚂",
933 "\\mttS" : "𝚂",
934 "\\mttT" : "𝚃",
934 "\\mttT" : "𝚃",
935 "\\mttU" : "𝚄",
935 "\\mttU" : "𝚄",
936 "\\mttV" : "𝚅",
936 "\\mttV" : "𝚅",
937 "\\mttW" : "𝚆",
937 "\\mttW" : "𝚆",
938 "\\mttX" : "𝚇",
938 "\\mttX" : "𝚇",
939 "\\mttY" : "𝚈",
939 "\\mttY" : "𝚈",
940 "\\mttZ" : "𝚉",
940 "\\mttZ" : "𝚉",
941 "\\mtta" : "𝚊",
941 "\\mtta" : "𝚊",
942 "\\mttb" : "𝚋",
942 "\\mttb" : "𝚋",
943 "\\mttc" : "𝚌",
943 "\\mttc" : "𝚌",
944 "\\mttd" : "𝚍",
944 "\\mttd" : "𝚍",
945 "\\mtte" : "𝚎",
945 "\\mtte" : "𝚎",
946 "\\mttf" : "𝚏",
946 "\\mttf" : "𝚏",
947 "\\mttg" : "𝚐",
947 "\\mttg" : "𝚐",
948 "\\mtth" : "𝚑",
948 "\\mtth" : "𝚑",
949 "\\mtti" : "𝚒",
949 "\\mtti" : "𝚒",
950 "\\mttj" : "𝚓",
950 "\\mttj" : "𝚓",
951 "\\mttk" : "𝚔",
951 "\\mttk" : "𝚔",
952 "\\mttl" : "𝚕",
952 "\\mttl" : "𝚕",
953 "\\mttm" : "𝚖",
953 "\\mttm" : "𝚖",
954 "\\mttn" : "𝚗",
954 "\\mttn" : "𝚗",
955 "\\mtto" : "𝚘",
955 "\\mtto" : "𝚘",
956 "\\mttp" : "𝚙",
956 "\\mttp" : "𝚙",
957 "\\mttq" : "𝚚",
957 "\\mttq" : "𝚚",
958 "\\mttr" : "𝚛",
958 "\\mttr" : "𝚛",
959 "\\mtts" : "𝚜",
959 "\\mtts" : "𝚜",
960 "\\mttt" : "𝚝",
960 "\\mttt" : "𝚝",
961 "\\mttu" : "𝚞",
961 "\\mttu" : "𝚞",
962 "\\mttv" : "𝚟",
962 "\\mttv" : "𝚟",
963 "\\mttw" : "𝚠",
963 "\\mttw" : "𝚠",
964 "\\mttx" : "𝚡",
964 "\\mttx" : "𝚡",
965 "\\mtty" : "𝚢",
965 "\\mtty" : "𝚢",
966 "\\mttz" : "𝚣",
966 "\\mttz" : "𝚣",
967 "\\mbfAlpha" : "𝚨",
967 "\\mbfAlpha" : "𝚨",
968 "\\mbfBeta" : "𝚩",
968 "\\mbfBeta" : "𝚩",
969 "\\mbfGamma" : "𝚪",
969 "\\mbfGamma" : "𝚪",
970 "\\mbfDelta" : "𝚫",
970 "\\mbfDelta" : "𝚫",
971 "\\mbfEpsilon" : "𝚬",
971 "\\mbfEpsilon" : "𝚬",
972 "\\mbfZeta" : "𝚭",
972 "\\mbfZeta" : "𝚭",
973 "\\mbfEta" : "𝚮",
973 "\\mbfEta" : "𝚮",
974 "\\mbfTheta" : "𝚯",
974 "\\mbfTheta" : "𝚯",
975 "\\mbfIota" : "𝚰",
975 "\\mbfIota" : "𝚰",
976 "\\mbfKappa" : "𝚱",
976 "\\mbfKappa" : "𝚱",
977 "\\mbfLambda" : "𝚲",
977 "\\mbfLambda" : "𝚲",
978 "\\mbfMu" : "𝚳",
978 "\\mbfMu" : "𝚳",
979 "\\mbfNu" : "𝚴",
979 "\\mbfNu" : "𝚴",
980 "\\mbfXi" : "𝚵",
980 "\\mbfXi" : "𝚵",
981 "\\mbfOmicron" : "𝚶",
981 "\\mbfOmicron" : "𝚶",
982 "\\mbfPi" : "𝚷",
982 "\\mbfPi" : "𝚷",
983 "\\mbfRho" : "𝚸",
983 "\\mbfRho" : "𝚸",
984 "\\mbfvarTheta" : "𝚹",
984 "\\mbfvarTheta" : "𝚹",
985 "\\mbfSigma" : "𝚺",
985 "\\mbfSigma" : "𝚺",
986 "\\mbfTau" : "𝚻",
986 "\\mbfTau" : "𝚻",
987 "\\mbfUpsilon" : "𝚼",
987 "\\mbfUpsilon" : "𝚼",
988 "\\mbfPhi" : "𝚽",
988 "\\mbfPhi" : "𝚽",
989 "\\mbfChi" : "𝚾",
989 "\\mbfChi" : "𝚾",
990 "\\mbfPsi" : "𝚿",
990 "\\mbfPsi" : "𝚿",
991 "\\mbfOmega" : "𝛀",
991 "\\mbfOmega" : "𝛀",
992 "\\mbfalpha" : "𝛂",
992 "\\mbfalpha" : "𝛂",
993 "\\mbfbeta" : "𝛃",
993 "\\mbfbeta" : "𝛃",
994 "\\mbfgamma" : "𝛄",
994 "\\mbfgamma" : "𝛄",
995 "\\mbfdelta" : "𝛅",
995 "\\mbfdelta" : "𝛅",
996 "\\mbfepsilon" : "𝛆",
996 "\\mbfepsilon" : "𝛆",
997 "\\mbfzeta" : "𝛇",
997 "\\mbfzeta" : "𝛇",
998 "\\mbfeta" : "𝛈",
998 "\\mbfeta" : "𝛈",
999 "\\mbftheta" : "𝛉",
999 "\\mbftheta" : "𝛉",
1000 "\\mbfiota" : "𝛊",
1000 "\\mbfiota" : "𝛊",
1001 "\\mbfkappa" : "𝛋",
1001 "\\mbfkappa" : "𝛋",
1002 "\\mbflambda" : "𝛌",
1002 "\\mbflambda" : "𝛌",
1003 "\\mbfmu" : "𝛍",
1003 "\\mbfmu" : "𝛍",
1004 "\\mbfnu" : "𝛎",
1004 "\\mbfnu" : "𝛎",
1005 "\\mbfxi" : "𝛏",
1005 "\\mbfxi" : "𝛏",
1006 "\\mbfomicron" : "𝛐",
1006 "\\mbfomicron" : "𝛐",
1007 "\\mbfpi" : "𝛑",
1007 "\\mbfpi" : "𝛑",
1008 "\\mbfrho" : "𝛒",
1008 "\\mbfrho" : "𝛒",
1009 "\\mbfvarsigma" : "𝛓",
1009 "\\mbfvarsigma" : "𝛓",
1010 "\\mbfsigma" : "𝛔",
1010 "\\mbfsigma" : "𝛔",
1011 "\\mbftau" : "𝛕",
1011 "\\mbftau" : "𝛕",
1012 "\\mbfupsilon" : "𝛖",
1012 "\\mbfupsilon" : "𝛖",
1013 "\\mbfvarphi" : "𝛗",
1013 "\\mbfvarphi" : "𝛗",
1014 "\\mbfchi" : "𝛘",
1014 "\\mbfchi" : "𝛘",
1015 "\\mbfpsi" : "𝛙",
1015 "\\mbfpsi" : "𝛙",
1016 "\\mbfomega" : "𝛚",
1016 "\\mbfomega" : "𝛚",
1017 "\\mbfvarepsilon" : "𝛜",
1017 "\\mbfvarepsilon" : "𝛜",
1018 "\\mbfvartheta" : "𝛝",
1018 "\\mbfvartheta" : "𝛝",
1019 "\\mbfvarkappa" : "𝛞",
1019 "\\mbfvarkappa" : "𝛞",
1020 "\\mbfphi" : "𝛟",
1020 "\\mbfphi" : "𝛟",
1021 "\\mbfvarrho" : "𝛠",
1021 "\\mbfvarrho" : "𝛠",
1022 "\\mbfvarpi" : "𝛡",
1022 "\\mbfvarpi" : "𝛡",
1023 "\\mitAlpha" : "𝛢",
1023 "\\mitAlpha" : "𝛢",
1024 "\\mitBeta" : "𝛣",
1024 "\\mitBeta" : "𝛣",
1025 "\\mitGamma" : "𝛤",
1025 "\\mitGamma" : "𝛤",
1026 "\\mitDelta" : "𝛥",
1026 "\\mitDelta" : "𝛥",
1027 "\\mitEpsilon" : "𝛦",
1027 "\\mitEpsilon" : "𝛦",
1028 "\\mitZeta" : "𝛧",
1028 "\\mitZeta" : "𝛧",
1029 "\\mitEta" : "𝛨",
1029 "\\mitEta" : "𝛨",
1030 "\\mitTheta" : "𝛩",
1030 "\\mitTheta" : "𝛩",
1031 "\\mitIota" : "𝛪",
1031 "\\mitIota" : "𝛪",
1032 "\\mitKappa" : "𝛫",
1032 "\\mitKappa" : "𝛫",
1033 "\\mitLambda" : "𝛬",
1033 "\\mitLambda" : "𝛬",
1034 "\\mitMu" : "𝛭",
1034 "\\mitMu" : "𝛭",
1035 "\\mitNu" : "𝛮",
1035 "\\mitNu" : "𝛮",
1036 "\\mitXi" : "𝛯",
1036 "\\mitXi" : "𝛯",
1037 "\\mitOmicron" : "𝛰",
1037 "\\mitOmicron" : "𝛰",
1038 "\\mitPi" : "𝛱",
1038 "\\mitPi" : "𝛱",
1039 "\\mitRho" : "𝛲",
1039 "\\mitRho" : "𝛲",
1040 "\\mitvarTheta" : "𝛳",
1040 "\\mitvarTheta" : "𝛳",
1041 "\\mitSigma" : "𝛴",
1041 "\\mitSigma" : "𝛴",
1042 "\\mitTau" : "𝛵",
1042 "\\mitTau" : "𝛵",
1043 "\\mitUpsilon" : "𝛶",
1043 "\\mitUpsilon" : "𝛶",
1044 "\\mitPhi" : "𝛷",
1044 "\\mitPhi" : "𝛷",
1045 "\\mitChi" : "𝛸",
1045 "\\mitChi" : "𝛸",
1046 "\\mitPsi" : "𝛹",
1046 "\\mitPsi" : "𝛹",
1047 "\\mitOmega" : "𝛺",
1047 "\\mitOmega" : "𝛺",
1048 "\\mitalpha" : "𝛼",
1048 "\\mitalpha" : "𝛼",
1049 "\\mitbeta" : "𝛽",
1049 "\\mitbeta" : "𝛽",
1050 "\\mitgamma" : "𝛾",
1050 "\\mitgamma" : "𝛾",
1051 "\\mitdelta" : "𝛿",
1051 "\\mitdelta" : "𝛿",
1052 "\\mitepsilon" : "𝜀",
1052 "\\mitepsilon" : "𝜀",
1053 "\\mitzeta" : "𝜁",
1053 "\\mitzeta" : "𝜁",
1054 "\\miteta" : "𝜂",
1054 "\\miteta" : "𝜂",
1055 "\\mittheta" : "𝜃",
1055 "\\mittheta" : "𝜃",
1056 "\\mitiota" : "𝜄",
1056 "\\mitiota" : "𝜄",
1057 "\\mitkappa" : "𝜅",
1057 "\\mitkappa" : "𝜅",
1058 "\\mitlambda" : "𝜆",
1058 "\\mitlambda" : "𝜆",
1059 "\\mitmu" : "𝜇",
1059 "\\mitmu" : "𝜇",
1060 "\\mitnu" : "𝜈",
1060 "\\mitnu" : "𝜈",
1061 "\\mitxi" : "𝜉",
1061 "\\mitxi" : "𝜉",
1062 "\\mitomicron" : "𝜊",
1062 "\\mitomicron" : "𝜊",
1063 "\\mitpi" : "𝜋",
1063 "\\mitpi" : "𝜋",
1064 "\\mitrho" : "𝜌",
1064 "\\mitrho" : "𝜌",
1065 "\\mitvarsigma" : "𝜍",
1065 "\\mitvarsigma" : "𝜍",
1066 "\\mitsigma" : "𝜎",
1066 "\\mitsigma" : "𝜎",
1067 "\\mittau" : "𝜏",
1067 "\\mittau" : "𝜏",
1068 "\\mitupsilon" : "𝜐",
1068 "\\mitupsilon" : "𝜐",
1069 "\\mitphi" : "𝜑",
1069 "\\mitphi" : "𝜑",
1070 "\\mitchi" : "𝜒",
1070 "\\mitchi" : "𝜒",
1071 "\\mitpsi" : "𝜓",
1071 "\\mitpsi" : "𝜓",
1072 "\\mitomega" : "𝜔",
1072 "\\mitomega" : "𝜔",
1073 "\\mitvarepsilon" : "𝜖",
1073 "\\mitvarepsilon" : "𝜖",
1074 "\\mitvartheta" : "𝜗",
1074 "\\mitvartheta" : "𝜗",
1075 "\\mitvarkappa" : "𝜘",
1075 "\\mitvarkappa" : "𝜘",
1076 "\\mitvarphi" : "𝜙",
1076 "\\mitvarphi" : "𝜙",
1077 "\\mitvarrho" : "𝜚",
1077 "\\mitvarrho" : "𝜚",
1078 "\\mitvarpi" : "𝜛",
1078 "\\mitvarpi" : "𝜛",
1079 "\\mbfitAlpha" : "𝜜",
1079 "\\mbfitAlpha" : "𝜜",
1080 "\\mbfitBeta" : "𝜝",
1080 "\\mbfitBeta" : "𝜝",
1081 "\\mbfitGamma" : "𝜞",
1081 "\\mbfitGamma" : "𝜞",
1082 "\\mbfitDelta" : "𝜟",
1082 "\\mbfitDelta" : "𝜟",
1083 "\\mbfitEpsilon" : "𝜠",
1083 "\\mbfitEpsilon" : "𝜠",
1084 "\\mbfitZeta" : "𝜡",
1084 "\\mbfitZeta" : "𝜡",
1085 "\\mbfitEta" : "𝜢",
1085 "\\mbfitEta" : "𝜢",
1086 "\\mbfitTheta" : "𝜣",
1086 "\\mbfitTheta" : "𝜣",
1087 "\\mbfitIota" : "𝜤",
1087 "\\mbfitIota" : "𝜤",
1088 "\\mbfitKappa" : "𝜥",
1088 "\\mbfitKappa" : "𝜥",
1089 "\\mbfitLambda" : "𝜦",
1089 "\\mbfitLambda" : "𝜦",
1090 "\\mbfitMu" : "𝜧",
1090 "\\mbfitMu" : "𝜧",
1091 "\\mbfitNu" : "𝜨",
1091 "\\mbfitNu" : "𝜨",
1092 "\\mbfitXi" : "𝜩",
1092 "\\mbfitXi" : "𝜩",
1093 "\\mbfitOmicron" : "𝜪",
1093 "\\mbfitOmicron" : "𝜪",
1094 "\\mbfitPi" : "𝜫",
1094 "\\mbfitPi" : "𝜫",
1095 "\\mbfitRho" : "𝜬",
1095 "\\mbfitRho" : "𝜬",
1096 "\\mbfitvarTheta" : "𝜭",
1096 "\\mbfitvarTheta" : "𝜭",
1097 "\\mbfitSigma" : "𝜮",
1097 "\\mbfitSigma" : "𝜮",
1098 "\\mbfitTau" : "𝜯",
1098 "\\mbfitTau" : "𝜯",
1099 "\\mbfitUpsilon" : "𝜰",
1099 "\\mbfitUpsilon" : "𝜰",
1100 "\\mbfitPhi" : "𝜱",
1100 "\\mbfitPhi" : "𝜱",
1101 "\\mbfitChi" : "𝜲",
1101 "\\mbfitChi" : "𝜲",
1102 "\\mbfitPsi" : "𝜳",
1102 "\\mbfitPsi" : "𝜳",
1103 "\\mbfitOmega" : "𝜴",
1103 "\\mbfitOmega" : "𝜴",
1104 "\\mbfitalpha" : "𝜶",
1104 "\\mbfitalpha" : "𝜶",
1105 "\\mbfitbeta" : "𝜷",
1105 "\\mbfitbeta" : "𝜷",
1106 "\\mbfitgamma" : "𝜸",
1106 "\\mbfitgamma" : "𝜸",
1107 "\\mbfitdelta" : "𝜹",
1107 "\\mbfitdelta" : "𝜹",
1108 "\\mbfitepsilon" : "𝜺",
1108 "\\mbfitepsilon" : "𝜺",
1109 "\\mbfitzeta" : "𝜻",
1109 "\\mbfitzeta" : "𝜻",
1110 "\\mbfiteta" : "𝜼",
1110 "\\mbfiteta" : "𝜼",
1111 "\\mbfittheta" : "𝜽",
1111 "\\mbfittheta" : "𝜽",
1112 "\\mbfitiota" : "𝜾",
1112 "\\mbfitiota" : "𝜾",
1113 "\\mbfitkappa" : "𝜿",
1113 "\\mbfitkappa" : "𝜿",
1114 "\\mbfitlambda" : "𝝀",
1114 "\\mbfitlambda" : "𝝀",
1115 "\\mbfitmu" : "𝝁",
1115 "\\mbfitmu" : "𝝁",
1116 "\\mbfitnu" : "𝝂",
1116 "\\mbfitnu" : "𝝂",
1117 "\\mbfitxi" : "𝝃",
1117 "\\mbfitxi" : "𝝃",
1118 "\\mbfitomicron" : "𝝄",
1118 "\\mbfitomicron" : "𝝄",
1119 "\\mbfitpi" : "𝝅",
1119 "\\mbfitpi" : "𝝅",
1120 "\\mbfitrho" : "𝝆",
1120 "\\mbfitrho" : "𝝆",
1121 "\\mbfitvarsigma" : "𝝇",
1121 "\\mbfitvarsigma" : "𝝇",
1122 "\\mbfitsigma" : "𝝈",
1122 "\\mbfitsigma" : "𝝈",
1123 "\\mbfittau" : "𝝉",
1123 "\\mbfittau" : "𝝉",
1124 "\\mbfitupsilon" : "𝝊",
1124 "\\mbfitupsilon" : "𝝊",
1125 "\\mbfitphi" : "𝝋",
1125 "\\mbfitphi" : "𝝋",
1126 "\\mbfitchi" : "𝝌",
1126 "\\mbfitchi" : "𝝌",
1127 "\\mbfitpsi" : "𝝍",
1127 "\\mbfitpsi" : "𝝍",
1128 "\\mbfitomega" : "𝝎",
1128 "\\mbfitomega" : "𝝎",
1129 "\\mbfitvarepsilon" : "𝝐",
1129 "\\mbfitvarepsilon" : "𝝐",
1130 "\\mbfitvartheta" : "𝝑",
1130 "\\mbfitvartheta" : "𝝑",
1131 "\\mbfitvarkappa" : "𝝒",
1131 "\\mbfitvarkappa" : "𝝒",
1132 "\\mbfitvarphi" : "𝝓",
1132 "\\mbfitvarphi" : "𝝓",
1133 "\\mbfitvarrho" : "𝝔",
1133 "\\mbfitvarrho" : "𝝔",
1134 "\\mbfitvarpi" : "𝝕",
1134 "\\mbfitvarpi" : "𝝕",
1135 "\\mbfsansAlpha" : "𝝖",
1135 "\\mbfsansAlpha" : "𝝖",
1136 "\\mbfsansBeta" : "𝝗",
1136 "\\mbfsansBeta" : "𝝗",
1137 "\\mbfsansGamma" : "𝝘",
1137 "\\mbfsansGamma" : "𝝘",
1138 "\\mbfsansDelta" : "𝝙",
1138 "\\mbfsansDelta" : "𝝙",
1139 "\\mbfsansEpsilon" : "𝝚",
1139 "\\mbfsansEpsilon" : "𝝚",
1140 "\\mbfsansZeta" : "𝝛",
1140 "\\mbfsansZeta" : "𝝛",
1141 "\\mbfsansEta" : "𝝜",
1141 "\\mbfsansEta" : "𝝜",
1142 "\\mbfsansTheta" : "𝝝",
1142 "\\mbfsansTheta" : "𝝝",
1143 "\\mbfsansIota" : "𝝞",
1143 "\\mbfsansIota" : "𝝞",
1144 "\\mbfsansKappa" : "𝝟",
1144 "\\mbfsansKappa" : "𝝟",
1145 "\\mbfsansLambda" : "𝝠",
1145 "\\mbfsansLambda" : "𝝠",
1146 "\\mbfsansMu" : "𝝡",
1146 "\\mbfsansMu" : "𝝡",
1147 "\\mbfsansNu" : "𝝢",
1147 "\\mbfsansNu" : "𝝢",
1148 "\\mbfsansXi" : "𝝣",
1148 "\\mbfsansXi" : "𝝣",
1149 "\\mbfsansOmicron" : "𝝤",
1149 "\\mbfsansOmicron" : "𝝤",
1150 "\\mbfsansPi" : "𝝥",
1150 "\\mbfsansPi" : "𝝥",
1151 "\\mbfsansRho" : "𝝦",
1151 "\\mbfsansRho" : "𝝦",
1152 "\\mbfsansvarTheta" : "𝝧",
1152 "\\mbfsansvarTheta" : "𝝧",
1153 "\\mbfsansSigma" : "𝝨",
1153 "\\mbfsansSigma" : "𝝨",
1154 "\\mbfsansTau" : "𝝩",
1154 "\\mbfsansTau" : "𝝩",
1155 "\\mbfsansUpsilon" : "𝝪",
1155 "\\mbfsansUpsilon" : "𝝪",
1156 "\\mbfsansPhi" : "𝝫",
1156 "\\mbfsansPhi" : "𝝫",
1157 "\\mbfsansChi" : "𝝬",
1157 "\\mbfsansChi" : "𝝬",
1158 "\\mbfsansPsi" : "𝝭",
1158 "\\mbfsansPsi" : "𝝭",
1159 "\\mbfsansOmega" : "𝝮",
1159 "\\mbfsansOmega" : "𝝮",
1160 "\\mbfsansalpha" : "𝝰",
1160 "\\mbfsansalpha" : "𝝰",
1161 "\\mbfsansbeta" : "𝝱",
1161 "\\mbfsansbeta" : "𝝱",
1162 "\\mbfsansgamma" : "𝝲",
1162 "\\mbfsansgamma" : "𝝲",
1163 "\\mbfsansdelta" : "𝝳",
1163 "\\mbfsansdelta" : "𝝳",
1164 "\\mbfsansepsilon" : "𝝴",
1164 "\\mbfsansepsilon" : "𝝴",
1165 "\\mbfsanszeta" : "𝝵",
1165 "\\mbfsanszeta" : "𝝵",
1166 "\\mbfsanseta" : "𝝶",
1166 "\\mbfsanseta" : "𝝶",
1167 "\\mbfsanstheta" : "𝝷",
1167 "\\mbfsanstheta" : "𝝷",
1168 "\\mbfsansiota" : "𝝸",
1168 "\\mbfsansiota" : "𝝸",
1169 "\\mbfsanskappa" : "𝝹",
1169 "\\mbfsanskappa" : "𝝹",
1170 "\\mbfsanslambda" : "𝝺",
1170 "\\mbfsanslambda" : "𝝺",
1171 "\\mbfsansmu" : "𝝻",
1171 "\\mbfsansmu" : "𝝻",
1172 "\\mbfsansnu" : "𝝼",
1172 "\\mbfsansnu" : "𝝼",
1173 "\\mbfsansxi" : "𝝽",
1173 "\\mbfsansxi" : "𝝽",
1174 "\\mbfsansomicron" : "𝝾",
1174 "\\mbfsansomicron" : "𝝾",
1175 "\\mbfsanspi" : "𝝿",
1175 "\\mbfsanspi" : "𝝿",
1176 "\\mbfsansrho" : "𝞀",
1176 "\\mbfsansrho" : "𝞀",
1177 "\\mbfsansvarsigma" : "𝞁",
1177 "\\mbfsansvarsigma" : "𝞁",
1178 "\\mbfsanssigma" : "𝞂",
1178 "\\mbfsanssigma" : "𝞂",
1179 "\\mbfsanstau" : "𝞃",
1179 "\\mbfsanstau" : "𝞃",
1180 "\\mbfsansupsilon" : "𝞄",
1180 "\\mbfsansupsilon" : "𝞄",
1181 "\\mbfsansphi" : "𝞅",
1181 "\\mbfsansphi" : "𝞅",
1182 "\\mbfsanschi" : "𝞆",
1182 "\\mbfsanschi" : "𝞆",
1183 "\\mbfsanspsi" : "𝞇",
1183 "\\mbfsanspsi" : "𝞇",
1184 "\\mbfsansomega" : "𝞈",
1184 "\\mbfsansomega" : "𝞈",
1185 "\\mbfsansvarepsilon" : "𝞊",
1185 "\\mbfsansvarepsilon" : "𝞊",
1186 "\\mbfsansvartheta" : "𝞋",
1186 "\\mbfsansvartheta" : "𝞋",
1187 "\\mbfsansvarkappa" : "𝞌",
1187 "\\mbfsansvarkappa" : "𝞌",
1188 "\\mbfsansvarphi" : "𝞍",
1188 "\\mbfsansvarphi" : "𝞍",
1189 "\\mbfsansvarrho" : "𝞎",
1189 "\\mbfsansvarrho" : "𝞎",
1190 "\\mbfsansvarpi" : "𝞏",
1190 "\\mbfsansvarpi" : "𝞏",
1191 "\\mbfitsansAlpha" : "𝞐",
1191 "\\mbfitsansAlpha" : "𝞐",
1192 "\\mbfitsansBeta" : "𝞑",
1192 "\\mbfitsansBeta" : "𝞑",
1193 "\\mbfitsansGamma" : "𝞒",
1193 "\\mbfitsansGamma" : "𝞒",
1194 "\\mbfitsansDelta" : "𝞓",
1194 "\\mbfitsansDelta" : "𝞓",
1195 "\\mbfitsansEpsilon" : "𝞔",
1195 "\\mbfitsansEpsilon" : "𝞔",
1196 "\\mbfitsansZeta" : "𝞕",
1196 "\\mbfitsansZeta" : "𝞕",
1197 "\\mbfitsansEta" : "𝞖",
1197 "\\mbfitsansEta" : "𝞖",
1198 "\\mbfitsansTheta" : "𝞗",
1198 "\\mbfitsansTheta" : "𝞗",
1199 "\\mbfitsansIota" : "𝞘",
1199 "\\mbfitsansIota" : "𝞘",
1200 "\\mbfitsansKappa" : "𝞙",
1200 "\\mbfitsansKappa" : "𝞙",
1201 "\\mbfitsansLambda" : "𝞚",
1201 "\\mbfitsansLambda" : "𝞚",
1202 "\\mbfitsansMu" : "𝞛",
1202 "\\mbfitsansMu" : "𝞛",
1203 "\\mbfitsansNu" : "𝞜",
1203 "\\mbfitsansNu" : "𝞜",
1204 "\\mbfitsansXi" : "𝞝",
1204 "\\mbfitsansXi" : "𝞝",
1205 "\\mbfitsansOmicron" : "𝞞",
1205 "\\mbfitsansOmicron" : "𝞞",
1206 "\\mbfitsansPi" : "𝞟",
1206 "\\mbfitsansPi" : "𝞟",
1207 "\\mbfitsansRho" : "𝞠",
1207 "\\mbfitsansRho" : "𝞠",
1208 "\\mbfitsansvarTheta" : "𝞡",
1208 "\\mbfitsansvarTheta" : "𝞡",
1209 "\\mbfitsansSigma" : "𝞢",
1209 "\\mbfitsansSigma" : "𝞢",
1210 "\\mbfitsansTau" : "𝞣",
1210 "\\mbfitsansTau" : "𝞣",
1211 "\\mbfitsansUpsilon" : "𝞤",
1211 "\\mbfitsansUpsilon" : "𝞤",
1212 "\\mbfitsansPhi" : "𝞥",
1212 "\\mbfitsansPhi" : "𝞥",
1213 "\\mbfitsansChi" : "𝞦",
1213 "\\mbfitsansChi" : "𝞦",
1214 "\\mbfitsansPsi" : "𝞧",
1214 "\\mbfitsansPsi" : "𝞧",
1215 "\\mbfitsansOmega" : "𝞨",
1215 "\\mbfitsansOmega" : "𝞨",
1216 "\\mbfitsansalpha" : "𝞪",
1216 "\\mbfitsansalpha" : "𝞪",
1217 "\\mbfitsansbeta" : "𝞫",
1217 "\\mbfitsansbeta" : "𝞫",
1218 "\\mbfitsansgamma" : "𝞬",
1218 "\\mbfitsansgamma" : "𝞬",
1219 "\\mbfitsansdelta" : "𝞭",
1219 "\\mbfitsansdelta" : "𝞭",
1220 "\\mbfitsansepsilon" : "𝞮",
1220 "\\mbfitsansepsilon" : "𝞮",
1221 "\\mbfitsanszeta" : "𝞯",
1221 "\\mbfitsanszeta" : "𝞯",
1222 "\\mbfitsanseta" : "𝞰",
1222 "\\mbfitsanseta" : "𝞰",
1223 "\\mbfitsanstheta" : "𝞱",
1223 "\\mbfitsanstheta" : "𝞱",
1224 "\\mbfitsansiota" : "𝞲",
1224 "\\mbfitsansiota" : "𝞲",
1225 "\\mbfitsanskappa" : "𝞳",
1225 "\\mbfitsanskappa" : "𝞳",
1226 "\\mbfitsanslambda" : "𝞴",
1226 "\\mbfitsanslambda" : "𝞴",
1227 "\\mbfitsansmu" : "𝞵",
1227 "\\mbfitsansmu" : "𝞵",
1228 "\\mbfitsansnu" : "𝞶",
1228 "\\mbfitsansnu" : "𝞶",
1229 "\\mbfitsansxi" : "𝞷",
1229 "\\mbfitsansxi" : "𝞷",
1230 "\\mbfitsansomicron" : "𝞸",
1230 "\\mbfitsansomicron" : "𝞸",
1231 "\\mbfitsanspi" : "𝞹",
1231 "\\mbfitsanspi" : "𝞹",
1232 "\\mbfitsansrho" : "𝞺",
1232 "\\mbfitsansrho" : "𝞺",
1233 "\\mbfitsansvarsigma" : "𝞻",
1233 "\\mbfitsansvarsigma" : "𝞻",
1234 "\\mbfitsanssigma" : "𝞼",
1234 "\\mbfitsanssigma" : "𝞼",
1235 "\\mbfitsanstau" : "𝞽",
1235 "\\mbfitsanstau" : "𝞽",
1236 "\\mbfitsansupsilon" : "𝞾",
1236 "\\mbfitsansupsilon" : "𝞾",
1237 "\\mbfitsansphi" : "𝞿",
1237 "\\mbfitsansphi" : "𝞿",
1238 "\\mbfitsanschi" : "𝟀",
1238 "\\mbfitsanschi" : "𝟀",
1239 "\\mbfitsanspsi" : "𝟁",
1239 "\\mbfitsanspsi" : "𝟁",
1240 "\\mbfitsansomega" : "𝟂",
1240 "\\mbfitsansomega" : "𝟂",
1241 "\\mbfitsansvarepsilon" : "𝟄",
1241 "\\mbfitsansvarepsilon" : "𝟄",
1242 "\\mbfitsansvartheta" : "𝟅",
1242 "\\mbfitsansvartheta" : "𝟅",
1243 "\\mbfitsansvarkappa" : "𝟆",
1243 "\\mbfitsansvarkappa" : "𝟆",
1244 "\\mbfitsansvarphi" : "𝟇",
1244 "\\mbfitsansvarphi" : "𝟇",
1245 "\\mbfitsansvarrho" : "𝟈",
1245 "\\mbfitsansvarrho" : "𝟈",
1246 "\\mbfitsansvarpi" : "𝟉",
1246 "\\mbfitsansvarpi" : "𝟉",
1247 "\\mbfzero" : "𝟎",
1247 "\\mbfzero" : "𝟎",
1248 "\\mbfone" : "𝟏",
1248 "\\mbfone" : "𝟏",
1249 "\\mbftwo" : "𝟐",
1249 "\\mbftwo" : "𝟐",
1250 "\\mbfthree" : "𝟑",
1250 "\\mbfthree" : "𝟑",
1251 "\\mbffour" : "𝟒",
1251 "\\mbffour" : "𝟒",
1252 "\\mbffive" : "𝟓",
1252 "\\mbffive" : "𝟓",
1253 "\\mbfsix" : "𝟔",
1253 "\\mbfsix" : "𝟔",
1254 "\\mbfseven" : "𝟕",
1254 "\\mbfseven" : "𝟕",
1255 "\\mbfeight" : "𝟖",
1255 "\\mbfeight" : "𝟖",
1256 "\\mbfnine" : "𝟗",
1256 "\\mbfnine" : "𝟗",
1257 "\\Bbbzero" : "𝟘",
1257 "\\Bbbzero" : "𝟘",
1258 "\\Bbbone" : "𝟙",
1258 "\\Bbbone" : "𝟙",
1259 "\\Bbbtwo" : "𝟚",
1259 "\\Bbbtwo" : "𝟚",
1260 "\\Bbbthree" : "𝟛",
1260 "\\Bbbthree" : "𝟛",
1261 "\\Bbbfour" : "𝟜",
1261 "\\Bbbfour" : "𝟜",
1262 "\\Bbbfive" : "𝟝",
1262 "\\Bbbfive" : "𝟝",
1263 "\\Bbbsix" : "𝟞",
1263 "\\Bbbsix" : "𝟞",
1264 "\\Bbbseven" : "𝟟",
1264 "\\Bbbseven" : "𝟟",
1265 "\\Bbbeight" : "𝟠",
1265 "\\Bbbeight" : "𝟠",
1266 "\\Bbbnine" : "𝟡",
1266 "\\Bbbnine" : "𝟡",
1267 "\\msanszero" : "𝟢",
1267 "\\msanszero" : "𝟢",
1268 "\\msansone" : "𝟣",
1268 "\\msansone" : "𝟣",
1269 "\\msanstwo" : "𝟤",
1269 "\\msanstwo" : "𝟤",
1270 "\\msansthree" : "𝟥",
1270 "\\msansthree" : "𝟥",
1271 "\\msansfour" : "𝟦",
1271 "\\msansfour" : "𝟦",
1272 "\\msansfive" : "𝟧",
1272 "\\msansfive" : "𝟧",
1273 "\\msanssix" : "𝟨",
1273 "\\msanssix" : "𝟨",
1274 "\\msansseven" : "𝟩",
1274 "\\msansseven" : "𝟩",
1275 "\\msanseight" : "𝟪",
1275 "\\msanseight" : "𝟪",
1276 "\\msansnine" : "𝟫",
1276 "\\msansnine" : "𝟫",
1277 "\\mbfsanszero" : "𝟬",
1277 "\\mbfsanszero" : "𝟬",
1278 "\\mbfsansone" : "𝟭",
1278 "\\mbfsansone" : "𝟭",
1279 "\\mbfsanstwo" : "𝟮",
1279 "\\mbfsanstwo" : "𝟮",
1280 "\\mbfsansthree" : "𝟯",
1280 "\\mbfsansthree" : "𝟯",
1281 "\\mbfsansfour" : "𝟰",
1281 "\\mbfsansfour" : "𝟰",
1282 "\\mbfsansfive" : "𝟱",
1282 "\\mbfsansfive" : "𝟱",
1283 "\\mbfsanssix" : "𝟲",
1283 "\\mbfsanssix" : "𝟲",
1284 "\\mbfsansseven" : "𝟳",
1284 "\\mbfsansseven" : "𝟳",
1285 "\\mbfsanseight" : "𝟴",
1285 "\\mbfsanseight" : "𝟴",
1286 "\\mbfsansnine" : "𝟵",
1286 "\\mbfsansnine" : "𝟵",
1287 "\\mttzero" : "𝟶",
1287 "\\mttzero" : "𝟶",
1288 "\\mttone" : "𝟷",
1288 "\\mttone" : "𝟷",
1289 "\\mtttwo" : "𝟸",
1289 "\\mtttwo" : "𝟸",
1290 "\\mttthree" : "𝟹",
1290 "\\mttthree" : "𝟹",
1291 "\\mttfour" : "𝟺",
1291 "\\mttfour" : "𝟺",
1292 "\\mttfive" : "𝟻",
1292 "\\mttfive" : "𝟻",
1293 "\\mttsix" : "𝟼",
1293 "\\mttsix" : "𝟼",
1294 "\\mttseven" : "𝟽",
1294 "\\mttseven" : "𝟽",
1295 "\\mtteight" : "𝟾",
1295 "\\mtteight" : "𝟾",
1296 "\\mttnine" : "𝟿",
1296 "\\mttnine" : "𝟿",
1297 }
1297 }
1298
1299
1300 reverse_latex_symbol = { v:k for k,v in latex_symbols.items()}
@@ -1,84 +1,89 b''
1 # coding: utf-8
1 # coding: utf-8
2
2
3 # This script autogenerates `IPython.core.latex_symbols.py`, which contains a
3 # This script autogenerates `IPython.core.latex_symbols.py`, which contains a
4 # single dict , named `latex_symbols`. The keys in this dict are latex symbols,
4 # single dict , named `latex_symbols`. The keys in this dict are latex symbols,
5 # such as `\\alpha` and the values in the dict are the unicode equivalents for
5 # such as `\\alpha` and the values in the dict are the unicode equivalents for
6 # those. Most importantly, only unicode symbols that are valid identifers in
6 # those. Most importantly, only unicode symbols that are valid identifers in
7 # Python 3 are included.
7 # Python 3 are included.
8
8
9 #
9 #
10 # The original mapping of latex symbols to unicode comes from the `latex_symbols.jl` files from Julia.
10 # The original mapping of latex symbols to unicode comes from the `latex_symbols.jl` files from Julia.
11
11
12 from __future__ import print_function
12 from __future__ import print_function
13 import os, sys
13 import os, sys
14
14
15 if not sys.version_info[0] == 3:
15 if not sys.version_info[0] == 3:
16 print("This script must be run with Python 3, exiting...")
16 print("This script must be run with Python 3, exiting...")
17 sys.exit(1)
17 sys.exit(1)
18
18
19 # Import the Julia LaTeX symbols
19 # Import the Julia LaTeX symbols
20 print('Importing latex_symbols.js from Julia...')
20 print('Importing latex_symbols.js from Julia...')
21 import requests
21 import requests
22 url = 'https://raw.githubusercontent.com/JuliaLang/julia/master/base/latex_symbols.jl'
22 url = 'https://raw.githubusercontent.com/JuliaLang/julia/master/base/latex_symbols.jl'
23 r = requests.get(url)
23 r = requests.get(url)
24
24
25
25
26 # Build a list of key, value pairs
26 # Build a list of key, value pairs
27 print('Building a list of (latex, unicode) key-vaule pairs...')
27 print('Building a list of (latex, unicode) key-vaule pairs...')
28 lines = r.text.splitlines()[60:]
28 lines = r.text.splitlines()[60:]
29 lines = [line for line in lines if '=>' in line]
29 lines = [line for line in lines if '=>' in line]
30 lines = [line.replace('=>',':') for line in lines]
30 lines = [line.replace('=>',':') for line in lines]
31
31
32 def line_to_tuple(line):
32 def line_to_tuple(line):
33 """Convert a single line of the .jl file to a 2-tuple of strings like ("\\alpha", "α")"""
33 """Convert a single line of the .jl file to a 2-tuple of strings like ("\\alpha", "α")"""
34 kv = line.split(',')[0].split(':')
34 kv = line.split(',')[0].split(':')
35 # kv = tuple(line.strip(', ').split(':'))
35 # kv = tuple(line.strip(', ').split(':'))
36 k, v = kv[0].strip(' "'), kv[1].strip(' "')
36 k, v = kv[0].strip(' "'), kv[1].strip(' "')
37 # if not test_ident(v):
37 # if not test_ident(v):
38 # print(line)
38 # print(line)
39 return k, v
39 return k, v
40
40
41 assert line_to_tuple(' "\\sqrt" : "\u221A",') == ('\\sqrt', '\u221A')
41 assert line_to_tuple(' "\\sqrt" : "\u221A",') == ('\\sqrt', '\u221A')
42 lines = [line_to_tuple(line) for line in lines]
42 lines = [line_to_tuple(line) for line in lines]
43
43
44
44
45 # Filter out non-valid identifiers
45 # Filter out non-valid identifiers
46 print('Filtering out characters that are not valid Python 3 identifiers')
46 print('Filtering out characters that are not valid Python 3 identifiers')
47
47
48 def test_ident(i):
48 def test_ident(i):
49 """Is the unicode string valid in a Python 3 identifer."""
49 """Is the unicode string valid in a Python 3 identifer."""
50 # Some characters are not valid at the start of a name, but we still want to
50 # Some characters are not valid at the start of a name, but we still want to
51 # include them. So prefix with 'a', which is valid at the start.
51 # include them. So prefix with 'a', which is valid at the start.
52 return ('a' + i).isidentifier()
52 return ('a' + i).isidentifier()
53
53
54 assert test_ident("α")
54 assert test_ident("α")
55 assert not test_ident('‴')
55 assert not test_ident('‴')
56
56
57 valid_idents = [line for line in lines if test_ident(line[1])]
57 valid_idents = [line for line in lines if test_ident(line[1])]
58
58
59
59
60 # Write the `latex_symbols.py` module in the cwd
60 # Write the `latex_symbols.py` module in the cwd
61
61
62 s = """# encoding: utf-8
62 s = """# encoding: utf-8
63
63
64 # DO NOT EDIT THIS FILE BY HAND.
64 # DO NOT EDIT THIS FILE BY HAND.
65
65
66 # To update this file, run the script /tools/gen_latex_symbols.py using Python 3
66 # To update this file, run the script /tools/gen_latex_symbols.py using Python 3
67
67
68 # This file is autogenerated from the file:
68 # This file is autogenerated from the file:
69 # https://raw.githubusercontent.com/JuliaLang/julia/master/base/latex_symbols.jl
69 # https://raw.githubusercontent.com/JuliaLang/julia/master/base/latex_symbols.jl
70 # This original list is filtered to remove any unicode characters that are not valid
70 # This original list is filtered to remove any unicode characters that are not valid
71 # Python identifiers.
71 # Python identifiers.
72
72
73 latex_symbols = {\n
73 latex_symbols = {\n
74 """
74 """
75 for line in valid_idents:
75 for line in valid_idents:
76 s += ' "%s" : "%s",\n' % (line[0], line[1])
76 s += ' "%s" : "%s",\n' % (line[0], line[1])
77 s += "}\n"
77 s += "}\n"
78
78
79 s += """
80
81 reverse_latex_symbol = { v:k for k,v in latex_symbols.items()}
82 """
83
79 fn = os.path.join('..','IPython','core','latex_symbols.py')
84 fn = os.path.join('..','IPython','core','latex_symbols.py')
80 print("Writing the file: %s" % fn)
85 print("Writing the file: %s" % fn)
81 with open(fn, 'w', encoding='utf-8') as f:
86 with open(fn, 'w', encoding='utf-8') as f:
82 f.write(s)
87 f.write(s)
83
88
84
89
General Comments 0
You need to be logged in to leave comments. Login now