asciimath-unicode

Crates.ioasciimath-unicode
lib.rsasciimath-unicode
version
sourcesrc
created_at2023-03-05 23:44:52.550504
updated_at2024-12-12 01:31:06.86084
descriptionConvert asciimath to unicode
homepage
repositoryhttps://github.com/erikbrinkman/asciimath-unicode-rs
max_upload_size
id801879
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Erik Brinkman (erikbrinkman)

documentation

README

Asciimath Unicode

crates.io docs license tests

Render asciimath to unicode.

To convert asciimath quickly, you can use the write_unicode or convert_unicode methods. If you want more control, see the options exposed through InlineRenderer which can be rendered into RenderedUnicode.

Usage

Binary

This crate provides a simple cli for converting asciimath to unicode:

cargo install asciimath-unicode --features binary
asciimath-unicode -h

Library

cargo add asciimath-parser
let res = asciimath_unicode::convert_unicode("1/2");
assert_eq!(res, "½");
use asciimath_unicode::InlineRenderer;
let renderer = InlineRenderer {
    vulgar_fracs: false,
    ..Default::default()
};
let res: String = renderer.render("1/2").collect();
assert_eq!(res, "¹⁄₂");
Commit count: 13

cargo fmt