#' chr2ltx
#'
#' Convertie du CHARACTER pour l'inclure dans du texte LaTeX
#'
#' "_" devient "\\\\_".\cr
#' "\%" devient "\\\\\%".
#'
#' @param x Texte à convertir.
#'
#' @return CHR. Texte converti pouvant être utilisé dans LaTeX.
#'
#' @export
#' @examples
#' chr2ltx("%Ceci_est_%un_TEst_%_")
chr2ltx <- function(x){
x <- gsub("_","\\\\_", x)
x <- gsub("%", "\\\\%", x)
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.