def generate_math_html(equation='e^x', inline=True, classes='math_span'):
    """
For inline math, use \\(...\\).
For standalone math, use $$...$$, \\[...\\] or egin...\\end.
md = markdown.Markdown(extensions=['mdx_math'])
md.convert('$$e^x$$')

:param classes:
:param equation:
:param inline:
:return:
"""
    import markdown
    md = markdown.Markdown(extensions=['mdx_math'], extension_configs={
        'mdx_math': {'add_preview': True}})
    if inline:
        stripped = md.convert(f'\\({equation}\\)').lstrip('<p>').rstrip('</p>')
        return f'<span class="{classes}"><{stripped}></span>'
    return md.convert(f'$${equation}$$')
