MathDomFragment

Type Alias MathDomFragment 

Source
pub type MathDomFragment = DocumentFragment<MathDomNode>;
Expand description

Document fragment containing MathML DOM nodes

Aliased Type§

pub struct MathDomFragment {
    pub children: Vec<MathDomNode>,
    pub classes: ClassList,
    pub height: f64,
    pub depth: f64,
    pub max_font_size: f64,
    pub style: CssStyle,
}

Fields§

§children: Vec<MathDomNode>

The child nodes contained within this document fragment. These represent the nested elements in the virtual DOM tree structure used for mathematical rendering in KaTeX. Each child is a VirtualNode that can be rendered into HTML or MathML markup.

§See Also

§classes: ClassList

CSS class names applied to this document fragment. These classes control styling and layout in the rendered mathematical output, following KaTeX’s CSS conventions.

§See Also

§height: f64

The height of this document fragment in em units, representing the vertical extent above the baseline in mathematical rendering. Used for proper alignment and spacing in LaTeX expressions.

§Mathematical Context

In KaTeX, height is crucial for aligning superscripts, fractions, and other vertical elements.

§depth: f64

The depth of this document fragment in em units, representing the vertical extent below the baseline in mathematical rendering. Used for proper alignment and spacing in LaTeX expressions.

§Mathematical Context

In KaTeX, depth is crucial for aligning subscripts, fractions, and other vertical elements.

§max_font_size: f64

The maximum font size used within this document fragment, in points. This value determines the scaling factor for the entire fragment in mathematical rendering.

§See Also

  • Font metrics in KaTeX for size calculations
§style: CssStyle

Inline CSS styles applied to this document fragment. These styles override default KaTeX styling and allow for custom rendering adjustments in mathematical expressions.

§See Also

  • CssStyle: The type used for style properties
  • KaTeX CSS documentation for available style properties