R ships a custom texmf tree containing a few LaTeX style and class files,
which are required when compiling R packages manuals (Rd.sty) or
Sweave documents (Sweave.sty). This tree can be found under the
directory file.path(R.home('share'), 'texmf'). This function can be
used to add/remove R's texmf tree to/from TeX Live via
tlmgr_conf('auxtrees').
Usage
r_texmf(action = c("add", "remove"), ...)Arguments
- action
Add/remove R's texmf tree to/from TeX Live.
- ...
Arguments passed to
tlmgr().
References
See the tlmgr manual for detailed information about
tlmgr conf auxtrees. Check out
https://tex.stackexchange.com/q/77720/9128 if you don't know what
texmf means.
Examples
# running the code below will modify your texmf tree; please do not run
# unless you know what it means
# r_texmf('remove')
# r_texmf('add')
# all files under R's texmf tree
list.files(file.path(R.home('share'), 'texmf'), recursive = TRUE, full.names = TRUE)
#> [1] "/opt/R/4.5.1/lib/R/share/texmf/bibtex/bib/RJournal.bib"
#> [2] "/opt/R/4.5.1/lib/R/share/texmf/bibtex/bib/Rnews.bib"
#> [3] "/opt/R/4.5.1/lib/R/share/texmf/bibtex/bst/jss.bst"
#> [4] "/opt/R/4.5.1/lib/R/share/texmf/tex/latex/Rd.sty"
#> [5] "/opt/R/4.5.1/lib/R/share/texmf/tex/latex/Sweave.sty"
#> [6] "/opt/R/4.5.1/lib/R/share/texmf/tex/latex/jss.cls"
#> [7] "/opt/R/4.5.1/lib/R/share/texmf/tex/latex/omscmtt.fd"