use_latex_packages {kableExtra} | R Documentation |
Declare LaTeX packages needed by kableExtra
Description
Declares all of the LaTeX packages that
may be used by kableExtra
functions so that they
will be loaded when the document is produced.
Usage
use_latex_packages()
Details
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.
Examples
use_latex_packages()
[Package kableExtra version 1.4.0 Index]