Skip to main content

process_math

Function process_math 

Source
pub fn process_math(
    processor: &dyn MathProcessor,
    doc: &mut PostDocument,
    maths: Vec<Node>,
    keep_xmath: bool,
) -> Result<(), PostError>
Expand description

Process all top-level Math nodes in the document using a math processor.

This is the main orchestration function that handles:

  • Finding top-level Math nodes (not nested inside other Math)
  • Parallel markup coordination
  • Cross-referencing between formats

When keep_xmath is true, the XMath elements are preserved in the output alongside the generated MathML.

Port of MathProcessor::process.