R/zzz.R

Defines functions .onLoad

# nocov start
.onLoad <- function(libname, pkgname, ...) {

  if ("knitr" %in% loadedNamespaces()) {
    set_fig_showtext()
  }

  setHook(
    packageEvent("knitr", "onLoad"),
    function(...) {
      set_fig_showtext()
    }
  )

  invisible()
}
# nocov end

Try the xaringanthemer package in your browser

Any scripts or data that you put into this service are public.

xaringanthemer documentation built on Sept. 15, 2024, 5:06 p.m.