This project is under the MIT License
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.2.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()); list.push(part.into()); let chapter = Chapter::new("chapter".tostring()); list.push(chapter.into()); let header1 = Header::new("header1".tostring(), 1); list.push(header1.into()); let header2 = Header::new("header2".tostring(), 2); list.push(header2.into()); let text = Text::new("text".tostring(), Normal); list.push(text.into()); let pkg = Package::new("dramatist".tostring()); 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(); } ```