Skip to main content

rustex_lib/
lib.rs

1pub mod engine;
2pub mod shipout;
3
4pub mod utils;
5pub use shipout::html::ImageOptions;
6
7pub const RUSTEX_CSS_URL: &str =
8    "https://raw.githack.com/FlexiFormal/RusTeX/main/rustex/src/resources/rustex.css";
9
10#[cfg(test)]
11mod tests {
12    use crate::engine::RusTeXEngineT;
13    use crate::engine::{RusTeXEngine, Settings};
14    use path_dedot::*;
15    use std::path::PathBuf;
16    use tex_engine::utils::PWD;
17
18    #[test]
19    fn initialize() {
20        RusTeXEngine::initialize(true);
21    }
22    #[test]
23    fn test_tex() {
24        let testpath: PathBuf = PWD
25            .join("../test/test.tex")
26            .parse_dot()
27            .unwrap()
28            .to_path_buf();
29        let ret = RusTeXEngine::do_file(testpath.to_str().unwrap(), Settings::default());
30        let out = testpath.with_extension("html");
31        ret.write_out(&out).unwrap();
32    }
33}