pub struct Command {
pub name: String,
pub nargs: usize,
pub def: String,
}Expand description
Latex macros. Rudimentary so far, have to embed latex.
- name: Name of the new latex macro
- nargs: Number of Args
- def: definition of the command.
Compiles to \newcommand{<name>}[
Fields§
§name: String§nargs: usize§def: StringImplementations§
Source§impl Command
impl Command
Sourcepub fn new(name: &str, nargs: usize, def: &str) -> Self
pub fn new(name: &str, nargs: usize, def: &str) -> Self
You use this to make a new command (duh), but you need the doc.new_command() call to actually be able to access it within the document.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more