Expand description
Examples
use std::path::PathBuf;
use texcore::{Chapter, ElementList, Header, Part, Text};
use texcore::TextType::Normal;
fn main() {
let mut list = ElementList::new(
"Author".to_string(),
"date".to_string(),
"title".to_string(),
11,
"book".to_string());
let part = Part::new("part".to_string());
let chapter = Chapter::new("chapter".to_string());
let header1 = Header::new("header1".to_string(), 1);
let header2 = Header::new("header2".to_string(), 2);
let text = Text::new("text".to_string(), Normal);
list.push(part.into());
list.push(chapter.into());
list.push(header1.into());
list.push(header2.into());
list.push(text.into());
list.compile(PathBuf::from("test.pdf")).unwrap();
// Or to write tex file
// list.write(path1, path2 (Optional), split).unwrap();
}
Re-exports
Modules
Element controls everything related to Elements
and ElementList
Level controls where each element goes
Type controls the different kinds of latex elements
Functions
Compiles a tex file to a pdf file