8LWXpg / jupyter2typst

Jupyter to Typst converter with template support
MIT License
11 stars 0 forks source link

Possibility to combine efforts on converting tex to typst? #4

Open Myriad-Dreamin opened 1 month ago

Myriad-Dreamin commented 1 month ago

See title. The available function is fn convert_math() in mitex crate.

Usage:

 /// Converts a LaTeX math equation into a plain text.
#[cfg_attr(feature = "web", wasm_bindgen)]
pub fn convert_math(input: &str) -> Result<String, String> {
    mitex::convert_math(input, None)
}
8LWXpg commented 1 month ago

Cool, will definitely test it out!

By the way, this repo actually predates mitex, and have indirect contribution to it https://github.com/mitex-rs/mitex/pull/63.

8LWXpg commented 1 month ago

If anyone want to implement this, feel free to open a PR.

8LWXpg commented 1 month ago

Ok, I tested it, mitex took different approach than current implementation.

Current: LaTeX (KaTeX) -> Typst (Some will fail)

mitex: LaTeX -> mitex function in Typst -> conversion via Typst functions

I can make it opt-in, but it adds another 60 dependencies (current is 121) and this is a rarely used feature (like I never got bug report of math outputs).