pub struct DocumentFragment<ChildType: VirtualNode> {
pub children: Vec<ChildType>,
pub classes: ClassList,
pub height: f64,
pub depth: f64,
pub max_font_size: f64,
pub style: CssStyle,
}
Expand description
Document fragment containing elements without DOM representation
Fields§
§children: Vec<ChildType>
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
VirtualNode
: The trait implemented by child nodesDocumentFragment::new
: Constructor for creating fragments with children
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
DocumentFragment::has_class
: Method to check for specific classes
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