commit | 0136eb7fd8c27592765f6d0b4b52d72324e97df3 | [log] [tgz] |
---|---|---|
author | Brent Thorne <15312739+brentthorne@users.noreply.github.com> | Fri Nov 30 12:50:57 2018 -0500 |
committer | Brent Thorne <15312739+brentthorne@users.noreply.github.com> | Fri Nov 30 12:50:57 2018 -0500 |
tree | c27e94f878b02d3841a218f300d8756ef7896a9c |
Initial commit
diff --git a/R/iflatex.R b/R/iflatex.R new file mode 100644 index 0000000..35b1bef --- /dev/null +++ b/R/iflatex.R
@@ -0,0 +1,19 @@ +#' Return latex control text if rendering latex +#' +#' @param txt +#' +#' @return a string +#' @export +#' +#' @examples +#' \dontrun{ +#' iflatex("\\vspace*{\\fill}") +#' } +#' +iflatex <- function(txt){ + if (knitr::opts_knit$get("rmarkdown.pandoc.to") == "latex"){ + return(txt) + } else { + return("") + } +} \ No newline at end of file