Texcore is the successor to tex-rs
and uses linked lists to help walk and sort elements to either
write to tex code or compile to pdf.
To add to your project:
toml
[dependencies]
texcore = "0.1.0"
```rust use std::path::PathBuf; use texcore::TextType::Normal; use texcore::{Chapter, ElementList, Header, Package, Part, Text};
fn main() { let mut list = ElementList::new( "Author".tostring(), "date".tostring(), "title".tostring(), 11, "book".tostring(), true ); let part = Part::new("part".tostring()); let chapter = Chapter::new("chapter".tostring()); let header1 = Header::new("header1".tostring(), 1); let header2 = Header::new("header2".tostring(), 2); let text = Text::new("text".tostring(), Normal); let pkg = Package::new("dramatist".tostring()); list.push(part.into()); list.push(chapter.into()); list.push(header1.into()); list.push(header2.into()); list.push(text.into()); list.push(pkg.into()); // To compile: // list.compile(PathBuf::from("test.pdf")).unwrap(); // To write tex file: // list.write(PathBuf::from("test.tex"), None, false).unwrap(); // To print: // list.cat(); } ```