pub struct Document { /* private fields */ }Expand description
The base of the generated LaTeX file.
Containers and Items can be added to the Document object.
Packages and global Commands are located before the \begin{document} line.
Other Items are located between the \begin{document} and \end{document} lines.
Implementations§
Source§impl Document
impl Document
Sourcepub fn new(doc_file: File, doc_class: DocumentClass) -> Self
pub fn new(doc_file: File, doc_class: DocumentClass) -> Self
Initializes a new Document object.
A File and a DocumentClass need to be passed for the creation of the Document.
Sourcepub fn add_packages(&mut self, _packages: Vec<Package>)
pub fn add_packages(&mut self, _packages: Vec<Package>)
Adds a list of Packages to the Document.
Sourcepub fn add_global_commands(&mut self, _commands: Vec<Command>)
pub fn add_global_commands(&mut self, _commands: Vec<Command>)
Adds a list of global Commands to the Document.
These commands are located before the \begin{document} line.
Auto Trait Implementations§
impl Freeze for Document
impl !RefUnwindSafe for Document
impl !Send for Document
impl !Sync for Document
impl Unpin for Document
impl !UnwindSafe for Document
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more