1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/install.R
\name{install_tinytex}
\alias{install_tinytex}
\alias{uninstall_tinytex}
\alias{reinstall_tinytex}
\alias{tinytex_root}
\title{Install/Uninstall TinyTeX}
\usage{
install_tinytex(
force = FALSE,
dir = "auto",
version = "daily",
bundle = "TinyTeX-1",
repository = "auto",
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{
\item{force}{Whether to force to install or uninstall TinyTeX. For
\code{install_tinytex()}, \code{force = FALSE} will stop this function from
installing TinyTeX if another LaTeX distribution is detected, or the
directory specified via the \code{dir} argument exists.}
\item{dir}{The directory to install (should not exist unless \code{force =
TRUE}) or uninstall TinyTeX.}
\item{version}{The version of TinyTeX, e.g., \code{"2020.09"} (see all
available versions at \url{https://github.com/rstudio/tinytex-releases}, or
via \code{xfun::github_releases('rstudio/tinytex-releases')}). By default,
it installs the latest daily build of TinyTeX. If \code{version =
'latest'}, it installs the latest monthly Github release of TinyTeX.}
\item{bundle}{The bundle name of TinyTeX (which determines the collection of
LaTeX packages to install). See
\url{https://github.com/rstudio/tinytex-releases#releases} for all possible
bundles and their meanings.}
\item{repository}{The CTAN repository to set. By default, it is the
repository automatically chosen by \code{https://mirror.ctan.org} (which is
usually the fastest one to your location). You can find available
repositories at \code{https://ctan.org/mirrors}), e.g.,
\code{'http://mirrors.tuna.tsinghua.edu.cn/CTAN/'}, or
\code{'https://mirror.las.iastate.edu/tex-archive/'}. In theory, this
argument should end with the path \file{/systems/texlive/tlnet}, and if it
does not, the path will be automatically appended. You can get a full list
of CTAN mirrors via \code{tinytex:::ctan_mirrors()}.}
\item{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 \code{extra_packages = NULL}.}
\item{add_path}{Whether to run the command \command{tlmgr path add} to add
the bin path of TeX Live to the system environment variable \var{PATH}.}
\item{packages}{Whether to reinstall all currently installed packages.}
\item{...}{Other arguments to be passed to \code{install_tinytex()} (note
that the \code{extra_packages} argument will be set to \code{tl_pkgs()} if
\code{packages = TRUE}).}
\item{error}{Whether to signal an error if TinyTeX is not found.}
}
\description{
The function \code{install_tinytex()} downloads and installs TinyTeX, a
custom LaTeX distribution based on TeX Live. The function
\code{uninstall_tinytex()} removes TinyTeX; \code{reinstall_tinytex()}
reinstalls TinyTeX as well as previously installed LaTeX packages by default;
\code{tinytex_root()} returns the root directory of TinyTeX if found.
}
\note{
If you really want to disable the installation, you may set the
environment variable \var{TINYTEX_PREVENT_INSTALL} to \code{true}. Then
\code{install_tinytex()} will fail immediately. This can be useful to
sysadmins who want to prevent the accidental installation of TinyTeX.
Installing TinyTeX requires perl (on Linux, perl-base is insufficient).
}
\references{
See the TinyTeX documentation (\url{https://yihui.org/tinytex/})
for the default installation directories on different platforms.
}
|