Description Usage Arguments Details Value Examples
Escape special LaTeX special characters in text.
1 2 3 4 5 6 7 8 9 10 | escape_latex(x, ...)
## S3 method for class 'character'
escape_latex(x, url = TRUE, ...)
## Default S3 method:
escape_latex(x, ...)
## S3 method for class 'tex'
escape_latex(x, ...)
|
x |
Character vector |
... |
Other arguments passed to methods |
url |
If |
The following characters are escaped as follows:
Orginal | Escaped |
{ | \{ |
} | \} |
# | \# |
$ | \$ |
& | \& |
_ | \_ |
% | \% |
\ | \textbackslash{} |
~ | \textasciitilde{} |
^ | \textasciicircum{} |
... | \dots |
| | \textbar |
https://cran.r-project.org |
\url{https://cran.r-project.org}
|
A character vector with all LaTeX special characters escaped.
1 2 3 4 | escape_latex(paste(c("These characters will be escaped",
"{ } # $ & _ % \\ ~ ^ ... | "),
collapse = ""))
escape_latex("By default so are URLs like https://cran.r-project.org")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.