Registers a zero-argument shorthand that is expanded by text
substitution before the expression reaches the MicroTeX parser.
Useful for domain-specific notation (e.g. \RR for
\mathbb{R}) you reuse across many plots.
Value
define_macro: Invisibly returnsNULL.clear_macros: Invisibly returnsNULL.list_macros: A named character vector mapping macro names to their expansions. Empty if no macros are defined.
Examples
# \donttest{
define_macro("RR", "\\mathbb{R}")
define_macro("eps", "\\varepsilon")
grid::grid.newpage()
grid.latex("\\forall \\eps > 0, \\eps \\in \\RR")
clear_macros()
# }