latex_macros: Create and Write LaTeX Macro Lists

Description Usage Arguments Value Examples

Description

Create and Write LaTeX Macro Lists

Usage

1

Arguments

...

For latex_macros, named arguments in which the argument name is the name of LaTeX command the expression is converted to a string using as_latex. The dots are evaluated using [explicit splicing][dots_list].

Value

An object of class latex_macros which extends environment.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
macros <- latex_macros(a = "1", b = "foo")
macros
# Assign new macros
macros$c <- 2 + 2
macros$d <- paste(letters, collapse = " ")
macros
# By default, LaTeX special characters are escaped
macros$e <- "$ 2 ^ 3 $"
macros$e
# use tex() to avoid escaping
macros$e <- tex("$ 2 ^ 3 $")
macros$e
# format() returns a string with LaTeX commands
format(macros)

jrnold/textools documentation built on May 20, 2019, 2:06 a.m.