% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/encoded_utf_to_latex.R
\encoding{UTF-8}
\name{encoded_utf_to_latex}
\alias{encoded_utf_to_latex}
\title{Encode UTF-8 text to LaTeX}
\usage{
encoded_utf_to_latex(x)
}
\arguments{
\item{x}{A string, possibly encoded in UTF-8 encoding system.}
}
\value{
A string with the corresponding transformations.
}
\description{
Transform a UTF-8 string into LaTeX special characters.
}
\details{
This is a variation of \code{\link[tools:encoded_text_to_latex]{tools::encoded_text_to_latex()}} with some
additional replacements for better compatibility.
}
\examples{
# 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
}
\seealso{
\code{\link[tools:encoded_text_to_latex]{tools::encoded_text_to_latex()}}

Other functions for working with BibTeX format:
\code{\link[=as_bibentry]{as_bibentry()}},
\code{\link[=cff_read]{cff_read()}},
\code{\link[=cff_read_bib_text]{cff_read_bib_text()}},
\code{\link[=cff_write_bib]{cff_write_bib()}}
}
\concept{bibtex}
\keyword{internal}
