anki.latex#
Attributes#
Classes#
Functions#
|
|
|
Convert embedded latex tags in text to image links. |
|
Returns (text, errors). |
|
Module Contents#
- anki.latex.pngCommands = [['latex', '-interaction=nonstopmode', 'tmp.tex'], ['dvipng', '-bg', 'Transparent', '-D', '200',...#
- anki.latex.svgCommands = [['latex', '-interaction=nonstopmode', 'tmp.tex'], ['dvisvgm', '--no-fonts', '--exact', '-Z',...#
- class anki.latex.ExtractedLatexOutput#
- html: str#
- latex: list[ExtractedLatex]#
- static from_proto(proto: anki.card_rendering_pb2.ExtractLatexResponse) ExtractedLatexOutput#
- anki.latex.on_card_did_render(output: anki.template.TemplateRenderOutput, ctx: anki.template.TemplateRenderContext) None#
- anki.latex.render_latex(html: str, model: anki.models.NotetypeDict, col: anki.collection.Collection) str#
Convert embedded latex tags in text to image links.
- anki.latex.render_latex_returning_errors(html: str, model: anki.models.NotetypeDict, col: anki.collection.Collection, expand_clozes: bool = False) tuple[str, list[str]]#
Returns (text, errors).
errors will be non-empty if LaTeX failed to render.
- anki.latex.setup_hook() None#