Skip to main content

parse_latex_equation_system

Function parse_latex_equation_system 

Source
pub fn parse_latex_equation_system(input: &str) -> ParseResult<Vec<Expression>>
Expand description

Parses a semicolon-delimited string of LaTeX equations into a vector of expressions.

Each segment separated by ; is parsed as an independent LaTeX expression. Empty segments (e.g., from trailing semicolons) are ignored.

§Errors

Returns a ParseError from the first segment that fails to parse.

§Examples

use mathlex::parser::parse_latex_equation_system;
use mathlex::Expression;

let exprs = parse_latex_equation_system(r"x = 1; \frac{y}{2} = 3").unwrap();
assert_eq!(exprs.len(), 2);