Crate katex

Crate katex 

Source
Expand description

KaTeX Rust implementation - Fast math typesetting for the web

This is a Rust port of the KaTeX JavaScript library, providing fast LaTeX math rendering capabilities.

Re-exports§

pub use crate::types::ClassList;
pub use crate::context::KatexContext;
pub use crate::core::render_to_string;
pub use crate::core::parse;
pub use crate::core::render_to_dom_tree;
pub use crate::core::render_to_html_tree;
pub use crate::font_metrics::get_character_metrics;
pub use crate::font_metrics_data::CharacterMetrics;
pub use crate::font_metrics_data::FontMetricsData;
pub use crate::types::ParseError;
pub use crate::types::OutputFormat;
pub use crate::types::Settings;
pub use crate::types::StrictFunction;
pub use crate::types::StrictMode;
pub use crate::types::StrictReturn;
pub use crate::types::StrictSetting;
pub use crate::types::TrustContext;
pub use crate::types::TrustFunction;
pub use crate::types::TrustSetting;
pub use crate::build_common::make_line_span;
pub use crate::build_common::make_anchor;
pub use crate::build_common::make_fragment;
pub use crate::build_common::wrap_fragment;

Modules§

build_common
Build common utilities for KaTeX DOM construction
build_html
HTML building utilities for KaTeX Rust implementation
build_mathml
MathML rendering utilities for KaTeX
build_tree
Build tree utilities for KaTeX Rust implementation
context
Global context for various operations
core
Core KaTeX functionality - main entry points and error handling
define_environment
Environment definition system for KaTeX
define_function
Function definition utilities for KaTeX Rust implementation
delimiter
Delimiter handling for KaTeX
dom_tree
DOM tree node definitions for HTML rendering
font_metrics
Font metrics module for KaTeX
font_metrics_data
Font metric data storage This file contains font metric data and measurements for KaTeX Generated from the original JavaScript fontMetricsData.js using phf macros
functions
Function implementations for KaTeX
lexer
The Lexer class handles tokenizing the input in various ways. Since our parser expects us to be able to backtrack, the lexer allows lexing from any given starting point.
macro_expander
MacroExpander – the “gullet” that expands macros to tokens
macros
Macro definition system for KaTeX
mathml_tree
MathML tree node definitions for MathML rendering
namespace
Namespace management with TeX-like grouping semantics
options
Options module for KaTeX
parse_tree
Utilities for working with parse trees and converting them to ParseNode
parser
Core parsing logic for LaTeX mathematical expressions.
spacing_data
Spacing data constants for KaTeX Rust implementation
stretchy
Stretchy wide elements rendered from SVG files and CSS tricks
style
Style definitions and calculations for KaTeX Rust implementation
svg_geometry
SVG geometry calculations for KaTeX
symbols
Mathematical symbol mappings for KaTeX
tree
Tree structure definitions for virtual DOM nodes
types
Core type definitions for KaTeX Rust implementation
unicode
Modules for handling Unicode characters encoding and conversion to LaTeX commands.
units
Units conversion utilities (Rust port of KaTeX src/units.js)
utils
Utility functions for KaTeX Rust implementation Provides common utility functions for string manipulation, type checking, and helper operations.
wide_character
Wide character (Mathematical Alphanumeric Symbols) support

Constants§

VERSION
Current version of the KaTeX Rust implementation