Nicktz
4/19/2016 - 11:10 AM

Add latex packages to knitr's directory

If a new package needs to be included into the knitr defaults, use the following process:

Download the package's .tar file and drop it into: (either download this, or find it in: C:\Program Files (x86)\MiKTeX 2.9\source after installing it using programs/miktex/packagemanager)

C:\Program Files\Microsoft\MRO\R-3.2.3\library\knitr\misc

A large number of Tarfiles are located here: https://www.ctan.org/tex-archive/systems/win32/miktex/tm/packages?lang=en
To find your knitr folder, type in R: path.package()

Now add the \usepackage command to the default tex file and it can now be used inside rmarkdown by calling the function  as follows (for e.g. adjumulticol package):

```{r , echo = FALSE, results = 'asis'}

cat("\\begin{columns} \\begin{column}{0.48\\textwidth}")

cat("\\end{adjmulticols}")