Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

install_tinytex

Install/Uninstall TinyTeX


Description

The function install_tinytex() downloads and installs TinyTeX, a custom LaTeX distribution based on TeX Live. The function uninstall_tinytex() removes TinyTeX; reinstall_tinytex() reinstalls TinyTeX as well as previously installed LaTeX packages by default; tinytex_root() returns the root directory of TinyTeX if found.

Usage

install_tinytex(
  force = FALSE,
  dir = "auto",
  version = "",
  repository = "ctan",
  extra_packages = if (is_tinytex()) tl_pkgs(),
  add_path = TRUE
)

uninstall_tinytex(force = FALSE, dir = tinytex_root())

reinstall_tinytex(packages = TRUE, dir = tinytex_root(), ...)

tinytex_root(error = TRUE)

Arguments

force

Whether to force to install (override) or uninstall TinyTeX.

dir

The directory to install or uninstall TinyTeX (should not exist unless force = TRUE).

version

The version of TinyTeX, e.g., "2020.09" (see all available versions at https://github.com/yihui/tinytex-releases). By default, it installs the latest daily build of TinyTeX.

repository

The CTAN repository to set. You can find available repositories at https://ctan.org/mirrors), e.g., 'http://mirrors.tuna.tsinghua.edu.cn/CTAN/', or 'https://mirror.las.iastate.edu/tex-archive/'. In theory, this argument should end with the path ‘/systems/texlive/tlnet’, and if it does not, the path will be automatically appended.

extra_packages

A character vector of extra LaTeX packages to be installed. By default, a vector of all currently installed LaTeX packages if an existing installation of TinyTeX is found. If you want a fresh installation, you may use extra_packages = NULL.

add_path

Whether to run the command tlmgr path add to add the bin path of TeX Live to the system environment variable PATH.

packages

Whether to reinstall all currently installed packages.

...

Other arguments to be passed to install_tinytex() (note that the extra_packages argument will be set to tl_pkgs() if packages = TRUE).

error

Whether to signal an error if TinyTeX is not found.

References

See the TinyTeX documentation (https://yihui.org/tinytex/) for the default installation directories on different platforms.


tinytex

Helper Functions to Install and Maintain TeX Live, and Compile LaTeX Documents

v0.31
MIT + file LICENSE
Authors
Yihui Xie [aut, cre, cph] (<https://orcid.org/0000-0003-0645-5666>), RStudio, PBC [cph], Christophe Dervieux [ctb] (<https://orcid.org/0000-0003-4474-2498>), Devon Ryan [ctb] (<https://orcid.org/0000-0002-8549-0971>), Ethan Heinzen [ctb], Fernando Cagua [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.