MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _wrap_in_tex

Function _wrap_in_tex

lib/matplotlib/dates.py:549–559  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

547
548
549def _wrap_in_tex(text):
550 p = r'([a-zA-Z]+)'
551 ret_text = re.sub(p, r'}$\1$\\mathdefault{', text)
552
553 # Braces ensure symbols are not spaced like binary operators.
554 ret_text = ret_text.replace('-', '{-}').replace(':', '{:}')
555 # To not concatenate space between numbers.
556 ret_text = ret_text.replace(' ', r'\;')
557 ret_text = '$\\mathdefault{' + ret_text + '}$'
558 ret_text = ret_text.replace('$\\mathdefault{}$', '')
559 return ret_text
560
561
562## date tick locators and formatters ###

Callers 2

__call__Method · 0.85
format_ticksMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…