View source: R/encoded_utf_to_latex.R
encoded_utf_to_latex | R Documentation |
Transform a UTF-8 string to LaTeX special characters.
encoded_utf_to_latex(x)
x |
A string, possibly encoded in UTF-8 encoding system. |
This is a variation of tools::encoded_text_to_latex()
performing some
additional replacements to increase compatibility.
A string with the corresponding transformations.
tools::encoded_text_to_latex()
Other functions for working with BibTeX format:
as_bibentry()
,
cff_read()
,
cff_read_bib_text()
,
cff_write_bib()
# Full range of supported characters on R
library(tools)
range <- 1:511
ascii_table <- data.frame(
dec = range,
utf8 = intToUtf8(range, multiple = TRUE)
)
# Add latex using base approach
ascii_table$latex_base <- encoded_text_to_latex(ascii_table$utf8,
encoding = "UTF-8"
)
# With cffr
ascii_table$latex_cffr <- encoded_utf_to_latex(ascii_table$utf8)
ascii_table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.