use_latex_packages | R Documentation |
Declares all of the LaTeX packages that
may be used by kableExtra
functions so that they
will be loaded when the document is produced.
use_latex_packages()
When kableExtra
loads, it calls this function if it
detects that knitr
is running and producing
LaTeX output. However, sometimes kableExtra
is loaded before knitr
runs, and then these packages
can end up being missed, leading to LaTeX errors such as
"Undefined control sequence." (See
Github issue #721 for an example.)
Our kbl()
wrapper for knitr::kable()
calls
this function for LaTeX output, so an explicit call
is not necessary.
use_latex_packages()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.