The latest version of
kableExtra allows users to use some alternative table themes, in addition to the default
bootstrap 3 theme. See the Alternative themes section for details. Here is a simple guide on how to add new themes to this package.
To add a new theme, you only need to do two things:
Why it works?
kable_styling works by adding corresponding bootstrap table classes to the html object. This time, instead of adding a bootstrap table class, we can choose to add a css class we defined. On the other hand, our css file gets loaded to either the rmarkdown environment or R console as a regular
htmlDependency() when the tables get printed.