macro_rules! command {
($doc:ident, $cmd:literal, $( $x:expr ),*) => { ... };
($doc:ident, $cmd:ident, $( $x:expr ),*) => { ... };
}Expand description
This could’ve gotten real ugly if you had to do it yourself. So whenever you’ve got a latex macro you defined earlier, and want to use it, use this macro.
use rust_texas::*;
fn dummy() -> Result<(), Box<dyn std::error::Error>> {
let mut doc = document!("article");
command!(doc, "<your command/macro name>", "<appropriate arguments to the command>");
Ok(())
}doc-tests need all the stuff above to pass