tlmgr: Run the TeX Live Manager

Description Usage Arguments Details References Examples

View source: R/tlmgr.R

Description

Execute the tlmgr command to search for LaTeX packages, install packages, update packages, and so on.

Usage

 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
tlmgr(args = character(), usermode = FALSE, ..., .quiet = FALSE)

tlmgr_search(what, file = TRUE, all = FALSE, global = TRUE, word = FALSE, ...)

tlmgr_install(
  pkgs = character(),
  usermode = FALSE,
  path = !usermode && os != "windows",
  ...
)

tlmgr_remove(pkgs = character(), usermode = FALSE)

tlmgr_update(
  all = TRUE,
  self = TRUE,
  more_args = character(),
  usermode = FALSE,
  run_fmtutil = TRUE,
  delete_tlpdb = getOption("tinytex.delete_tlpdb", FALSE),
  ...
)

tlmgr_path(action = c("add", "remove"))

tlmgr_conf(more_args = character(), ...)

tlmgr_repo(url = NULL, ...)

Arguments

args

A character vector of arguments to be passed to the command tlmgr.

usermode

(For expert users only) Whether to use TeX Live's user mode. If TRUE, you must have run tlmgr('init-usertree') once before. This option allows you to manage a user-level texmf tree, e.g., install a LaTeX package to your home directory instead of the system directory, to which you do not have write permission. This option should not be needed on personal computers, and has some limitations, so please read the tlmgr manual very carefully before using it.

...

For tlmgr(), additional arguments to be passed to system2() (e.g., stdout = TRUE to capture stdout). For other functions, arguments to be passed to tlmgr().

.quiet

Whether to hide the actual command before executing it.

what

A search keyword as a (Perl) regular expression.

file

Whether to treat what as a filename (pattern).

all

For tlmgr_search(), whether to search in everything, including package names, descriptions, and filenames. For tlmgr_update(), whether to update all installed packages.

global

Whether to search the online TeX Live Database or locally.

word

Whether to restrict the search of package names and descriptions to match only full words.

pkgs

A character vector of LaTeX package names.

path

Whether to run tlmgr_path('add') after installing packages (path = TRUE is a conservative default: it is only necessary to do this after a binary package is installed, such as the metafont package, which contains the executable mf, but it does not hurt even if no binary packages were installed).

self

Whether to update the TeX Live Manager itself.

more_args

A character vector of more arguments to be passed to the command tlmgr update or tlmgr conf.

run_fmtutil

Whether to run fmtutil-sys --all to (re)create format and hyphenation files after updating tlmgr.

delete_tlpdb

Whether to delete the ‘texlive.tlpdb.HASH’ files (where HASH is an MD5 hash) under the ‘tlpkg’ directory of the root directory of TeX Live after updating.

action

On Unix, add/remove symlinks of binaries to/from the system's PATH. On Windows, add/remove the path to the TeXLive binary directory to/from the system environment variable PATH.

url

The URL of the CTAN mirror. If NULL, show the current repository, otherwise set the repository. See the repository argument of install_tinytex() for examples.

Details

The tlmgr() function is a wrapper of system2('tlmgr'). All other tlmgr_*() functions are based on tlmgr for specific tasks. For example, tlmgr_install() runs the command tlmgr install to install LaTeX packages, and tlmgr_update runs the command tlmgr update, etc. Note that tlmgr_repo runs tlmgr options repository to query or set the CTAN repository. Please consult the tlmgr manual for full details.

References

The tlmgr manual: https://www.tug.org/texlive/doc/tlmgr.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# search for a package that contains titling.sty
tlmgr_search('titling.sty')

#' to match titling.sty exactly, add a slash before the keyword, e.g.
#' tlmgr_search('/titling.sty')

#' use a regular expression if you want to be more precise, e.g.
#' tlmgr_search('/titling\.sty$')

# list all installed LaTeX packages
tlmgr(c('info', '--list', '--only-installed', '--data', 'name'))

Example output

sh: 1: cannot create /dev/null: Permission denied
tlmgr search --file --global 'titling.sty'
sh: 1: tlmgr: Permission denied
Warning message:
In tlmgr(c("search", if (file) "--file", if (all) "--all", if (global) "--global",  :
  TeX Live does not seem to be installed. See https://yihui.name/tinytex/.
sh: 1: cannot create /dev/null: Permission denied
tlmgr info --list --only-installed --data name
sh: 1: tlmgr: Permission denied
Warning message:
In tlmgr(c("info", "--list", "--only-installed", "--data", "name")) :
  TeX Live does not seem to be installed. See https://yihui.name/tinytex/.

tinytex documentation built on May 30, 2021, 1:07 a.m.