Learn R Programming

spork (version 0.1.1)

spork_to_latex: Convert One Spork to Latex

Description

Converts one spork to latex. See description for as_spork. By default, unrecognized tokens are returned literally. However, Greek symbols and latex metacharacters are escaped. See latexToken.

Usage

spork_to_latex(
  x,
  unrecognized = getOption("latex_unrecognized", "latexToken"),
  italics = FALSE,
  math = TRUE,
  ...
)

Arguments

x

character

unrecognized

function to process unrecognized tokens: default latexToken

italics

whether to use italics or not (default: no)

math

whether to wrap in math environment (default: yes)

...

passed arguments

Value

character

See Also

Other latex: as_latex.spork(), as_latex(), latexToken()

Examples

Run this code
# NOT RUN {
library(magrittr)
'V_c./F' %>% spork_to_latex
'AUC_ss' %>% spork_to_latex
'C_max_ss' %>% spork_to_latex
'var^eta_j' %>% spork_to_latex
'& % $ # \\_ { } ~ \\^ \\' %>% spork_to_latex
'one joule (Omega) ~ 1 kg*m^2./s^2' %>% spork_to_latex
# }

Run the code above in your browser using DataLab