| define_macro | R Documentation |
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.
define_macro(name, definition)
clear_macros(name = NULL)
list_macros()
name |
Macro name without the leading backslash. For
|
definition |
LaTeX source the macro expands to. |
define_macro: Invisibly returns NULL.
clear_macros: Invisibly returns NULL.
list_macros: A named character vector mapping
macro names to their expansions. Empty if no macros are defined.
latex_grob, latex_options
define_macro("RR", "\\mathbb{R}")
define_macro("eps", "\\varepsilon")
grid::grid.newpage()
grid.latex("\\forall \\eps > 0, \\eps \\in \\RR")
clear_macros()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.