#tex #interface #wrapper #file-management #latex

kpathsea

Rust interface to the kpathsea TeX file management library

8 releases

0.2.3 Nov 29, 2021
0.2.2 Apr 19, 2019
0.1.3 Mar 12, 2019

#947 in Filesystem

Download history 11/week @ 2024-09-22 51/week @ 2024-10-06 6/week @ 2024-10-13 1/week @ 2024-10-20

58 downloads per month

MIT/Apache

270KB
6.5K SLoC

Build Status API Documentation License crates.io

Rust interface and wrapper for the kpathsea library

Note: Currently there are no safety guarantees and the wrapper is not thread-safe (see #2)

Example

  let kpse = Kpaths::new()
    .expect("You need a properly setup tex toolchain (texlive/MikTeX/...) and kpathsea headers, to use this wrapper.");
  if let Some(path) = kpse.find_file("article.cls") {
    assert!(path.ends_with("article.cls"), "Successfully found the full path of article.cls");
  } else {
    panic!("A tex toolchain was found, but the search failed to detect a class file.");
  }

lib.rs:

High-level Rust API for working with the kpathsea file-searching library for TeX

Dependencies

~1.6–10MB
~114K SLoC