% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tablet.R
\name{escape_latex}
\alias{escape_latex}
\title{Escape Special Characters for Latex}
\usage{
escape_latex(x, ...)
}
\arguments{
\item{x}{typically inherits character}

\item{...}{passed arguments}
}
\value{
character
}
\description{
Escapes special characters in Latex context.  
Operates element-wise, using \code{\link{escape_latex.default}}
or \code{\link{escape_latex.latex}} depending
on whether the element appears to be latex-formatted.
}
\details{
An element is considered latex-formatted if it begins
with "\(" or "{}".  Note that even though
latex-like elements likely have already had reserved
characters escaped, \code{\link{escape_latex.latex}}
will attempt to fix certain anticipated escaping issues.
The function \code{\link{escape_latex.default}}
performs conventional escaping; the result is 
prepended with "{}" as a signal to downstream
processes that the text is considered latex-ready
(and needn't be escaped again).
}
\examples{
  escape_latex(
    c(
      '',
      ' ',
      '\t',
      '{}a',
      NA,
      '\\\\()',
      '3\%'
    )
  )
}
\seealso{
Other escape: 
\code{\link{escape_latex.default}()},
\code{\link{escape_latex.latex}()}
}
\concept{escape}
\keyword{internal}
