reorganize folder
diff --git a/R/util.R b/R/util.R
index 9c29ddb..9023f4b 100644
--- a/R/util.R
+++ b/R/util.R
@@ -8,13 +8,25 @@
rmd_format <- function(){
rmd_output_metadata <- metadata$output
- rmd_fmt <- ifelse(
- is.null(rmd_output_metadata),
- "markdown", ifelse(
- rmd_output_metadata %in% c("html_document", "rmarkdown::html_vignette"),
- "html",ifelse(
- rmd_output_metadata %in% c("pdf_document", "rmarkdown::tufte_handout"),
- "latex", "markdown"
- )))
- return(rmd_fmt)
+ # rmd_fmt <- ifelse(
+ # is.null(rmd_output_metadata),
+ # "markdown", ifelse(
+ # rmd_output_metadata %in% c("html_document", "rmarkdown::html_vignette"),
+ # "html",ifelse(
+ # rmd_output_metadata %in% c("pdf_document", "rmarkdown::tufte_handout"),
+ # "latex", "markdown"
+ # )))
+ return(names(rmd_output_metadata))
+}
+
+#' Load a LaTeX package
+#'
+#' @description Load a LaTeX package using R code. Just like `\\usepackage{}`
+#' in LaTeX
+#'
+#' @param name The LaTeX package name
+#' @param options The LaTeX options for the package
+#' @export
+usepackage_latex <- function(name, options = NULL) {
+ invisible(knit_meta_add(list(latex_dependency(name, options))))
}