library(knitr) opts_chunk$set(warning = FALSE, echo = FALSE) mt <- head(mtcars)
Optional goal: table references from knitr chunks should be possible
Table captions should not contain visible ugliness.
f <- flextable::flextable(head(mtcars)) f <- flextable::set_caption(f, "Flextable caption") f
library(huxtable) options('huxtable.bookdown'=TRUE) # Should be automatic, just to be sure h <- huxtable(mt, add_colnames = TRUE) caption(h) <- "Huxtable caption" label(h) <- "tab:mthux" h
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.