Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xu-cheng/katex-rs
Rust bindings to KaTeX
https://github.com/xu-cheng/katex-rs
katex latex rust
Last synced: 6 days ago
JSON representation
Rust bindings to KaTeX
- Host: GitHub
- URL: https://github.com/xu-cheng/katex-rs
- Owner: xu-cheng
- License: apache-2.0
- Created: 2020-02-01T19:42:46.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T01:29:44.000Z (8 months ago)
- Last Synced: 2024-12-29T13:14:24.862Z (13 days ago)
- Topics: katex, latex, rust
- Language: Rust
- Homepage: https://docs.rs/katex
- Size: 374 KB
- Stars: 115
- Watchers: 4
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# katex-rs
[![Build Status](https://github.com/xu-cheng/katex-rs/workflows/build/badge.svg)](https://github.com/xu-cheng/katex-rs/actions)
[![Latest Version](https://img.shields.io/crates/v/katex.svg)](https://crates.io/crates/katex)
[![Rust Documentation](https://docs.rs/katex/badge.svg)](https://docs.rs/katex)This crate offers Rust bindings to [KaTeX](https://katex.org). This allows you to render LaTeX equations to HTML.
## Documentation
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
katex = "0.4"
```This crate offers the following features:
* `quick-js`: Enable by default. Use [quick-js](https://crates.io/crates/quick-js) as the JS backend.
* `duktape`: Use [duktape](https://crates.io/crates/ducc) as the JS backend. You need to disable the default features to enable this backend.
* `wasm-js`: Use [wasm-bindgen](https://crates.io/crates/wasm-bindgen) and [js-sys](https://crates.io/crates/js-sys) as the JS backend. You need to disable the default features to enable this backend.## Examples
```rust
let html = katex::render("E = mc^2").unwrap();let opts = katex::Opts::builder().display_mode(true).build().unwrap();
let html_in_display_mode = katex::render_with_opts("E = mc^2", &opts).unwrap();
```## See Also
* [pandoc-katex](https://github.com/xu-cheng/pandoc-katex)
## License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.