Version 1.1 release
diff --git a/R/zzz.R b/R/zzz.R
index 2014072..dfd67f8 100644
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -1,26 +1,29 @@
.onLoad <- function(libname = find.package("kableExtra"), pkgname = "kableExtra") {
- load_packages <- getOption("kableExtra.latex.load_packages", default = TRUE)
- if (load_packages) {
- usepackage_latex("booktabs")
- usepackage_latex("longtable")
- usepackage_latex("array")
- usepackage_latex("multirow")
- usepackage_latex("wrapfig")
- usepackage_latex("float")
- usepackage_latex("colortbl")
- usepackage_latex("pdflscape")
- usepackage_latex("tabu")
- usepackage_latex("threeparttable")
- usepackage_latex("threeparttablex")
- usepackage_latex("ulem", "normalem")
- usepackage_latex("makecell")
- usepackage_latex("xcolor")
+ if (knitr::is_latex_output()) {
+ load_packages <- getOption("kableExtra.latex.load_packages", default = TRUE)
+ if (load_packages) {
+ usepackage_latex("booktabs")
+ usepackage_latex("longtable")
+ usepackage_latex("array")
+ usepackage_latex("multirow")
+ usepackage_latex("wrapfig")
+ usepackage_latex("float")
+ usepackage_latex("colortbl")
+ usepackage_latex("pdflscape")
+ usepackage_latex("tabu")
+ usepackage_latex("threeparttable")
+ usepackage_latex("threeparttablex")
+ usepackage_latex("ulem", "normalem")
+ usepackage_latex("makecell")
+ usepackage_latex("xcolor")
+ }
}
auto_format <- getOption("kableExtra.auto_format", default = TRUE)
if (auto_format) auto_set_format()
if (!is.null(rmarkdown::metadata$output) &&
rmarkdown::metadata$output %in% c(
- "ioslides_presentation", "slidy_presentation"
+ "ioslides_presentation", "slidy_presentation",
+ "gitbook", "radix_article"
)) {
options(kableExtra.html.bsTable = TRUE)
}