Module latex

Module latex 

Source
Expand description

LaTeX formula support for genpdfi-rs.

This module provides the Latex element which allows rendering LaTeX formulas into PDF documents using MicroTeX.

Only available if the latex feature is enabled.

Structsยง

Latex
A LaTeX formula element that renders mathematical expressions using MicroTeX.

Constantsยง

EMPIRICAL_ADJUSTMENT_FACTOR ๐Ÿ”’
MICROTEX_DPI ๐Ÿ”’
Helper constants for LaTeX rendering at 720 DPI

Staticsยง

MICROTEX_RENDERER ๐Ÿ”’
Global MicroTeX renderer instance - initialized only once

Functionsยง

apply_svg_scale ๐Ÿ”’
Applies a scale factor to SVG dimensions.
extract_svg_dimensions ๐Ÿ”’
Extracts width and height from SVG attributes in pixels.
get_microtex_renderer ๐Ÿ”’
Get or initialize the MicroTeX renderer (thread-safe singleton). MicroTeX must only be initialized once - multiple initializations crash the engine.