Expand description
A module for converting asciimath to unicode
To convert asciimath quickly, you can use parse_unicode to get an Asciimath value that
implements fmt::Display. If you want more control, see the options exposed through Conf
which can parse input into Asciimath as well.
§Usage
§Binary
This crate provides a simple cli for converting asciimath to unicode:
cargo install asciimath-unicode --features binaryasciimath-unicode -h§Library
cargo add asciimath-unicodelet res = asciimath_unicode::parse_unicode("1/2").to_string();
assert_eq!(res, "½");use asciimath_unicode::Conf;
let conf = Conf {
vulgar_fracs: false,
..Default::default()
};
let res = conf.parse("1/2").to_string();
assert_eq!(res, "¹⁄₂");Structs§
- Asciimath
- Parsed asciimath expression ready for rendering
- Conf
- Configuration for unicode rendering of asciimath
Enums§
- Skin
Tone - The skin tone of an emoji.
Functions§
- parse_
unicode - Parse asciimath into an
Asciimathvalue that implementsfmt::Display