1
"""
2
Defines a custom MathJax bokeh model to render text using MathJax.
3
"""
4 7
from bokeh.models import Markup
5

6

7 7
class MathJax(Markup):
8
    """
9
    A bokeh model that renders text using MathJax.
10
    """
11

12 7
    __javascript__ = [
13
        "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML"
14
    ]
15

16 7
    __js_skip__ = {'MathJax': __javascript__}
17

18 7
    __js_require__ = {
19
        'paths': {
20
            'mathjax': "//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_HTML"
21
        },
22
        'shim': {'mathjax': {'exports': "MathJax"}}
23
    }

Read our documentation on viewing source code .

Loading