| Crates.io | asciimath-unicode |
| lib.rs | asciimath-unicode |
| version | 0.1.4 |
| created_at | 2023-03-05 23:44:52.550504+00 |
| updated_at | 2024-12-12 01:31:06.86084+00 |
| description | Convert asciimath to unicode |
| homepage | |
| repository | https://github.com/erikbrinkman/asciimath-unicode-rs |
| max_upload_size | |
| id | 801879 |
| size | 101,397 |
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.
This crate provides a simple cli for converting asciimath to unicode:
cargo install asciimath-unicode --features binary
asciimath-unicode -h
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, "¹⁄₂");