LaTeX - Waigo01/math_utils_lib GitHub Wiki

The library provides the functionality to convert pretty much any result, be it a parsed expression (AST) or the actual results of an evaluation to a latex string. It will use the appropriate latex symbols for all operations.

The library also provides a convenient enum, in which all information of an evaluation or function definition is saved. By iterating over a vector of this enum you can build entire latex documents containing all your mathematical steps with minimal code.

let step = Step::Calc { term: parsed_expr, result: res, variable_save: Some("x".to_string()) };

If you also want to render the latex string into a PNG, SVG or a PDF you can enable the output feature in Cargo.toml. This will add some external libraries and helper functions, which are used to render a latex string.