Skip to main content

convert_to_html

Function convert_to_html 

Source
pub fn convert_to_html(tex: &str) -> Result<String, String>
Expand description

Convert a TeX/LaTeX source string all the way to a standalone HTML5 document (LaTeXML XML + the HTML post-processing pipeline, with Presentation MathML).

Figures are left as raw <ltx:graphics> references — image conversion writes files next to a destination, and this string-returning API has none; use crate::post with a destination when you need converted images.

The page links the bundled CSS/JS, and with no destination those files are copied into the working directory; convert_to_html_with and HtmlOptions choose otherwise.

Runs on a pooled engine worker (see the module docs); safe to call from several threads at once.