Expand description
Examples
use std::path::PathBuf;
use texcore::{Chapter, ElementList, Header, Part, Text};
use texcore::TextType::Normal;
fn main() {
use texcore::Elements;
let mut list = ElementList::new(
"Author",
"date",
"title",
11,
"book",
false);
let part = Part::new("part");
let chapter = Chapter::new("chapter");
let header1 = Header::new("header1", 1);
let header2 = Header::new("header2", 2);
let text = Text::new("text", Normal);
list.push_array(Elements![part, chapter, header1, header2, text]);
// Compile requires compile feature
// 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
Macros
returns a vector of Element