def tex2html(tex: str, options: wrapper.Options = None) -> str: if options: no_inline_svg = options.get("no_inline_svg", False) else: no_inline_svg = False # These are options of the extension, not of the katex-cli program. if options: options.pop('no_inline_svg', None) options.pop('insert_fonts_css', None) result = wrapper.tex2html(tex, options) if no_inline_svg: result = svg2img(result) return result
def md_inline2html(inline_text: str, default_options: wrapper.Options = None) -> str: options = default_options.copy() if default_options else {} inline_text = _clean_inline_text(inline_text) return tex2html(inline_text, options)