diff --git a/DESCRIPTION b/DESCRIPTION index 3ae9c4352..f94ee11d4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -22,4 +22,4 @@ License: MIT + file LICENSE URL: https://github.com/rstudio/tinytex BugReports: https://github.com/rstudio/tinytex/issues Encoding: UTF-8 -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 diff --git a/R/install.R b/R/install.R index 333c5c63e..854aaabac 100644 --- a/R/install.R +++ b/R/install.R @@ -27,7 +27,8 @@ #' \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. +#' does not, the path will be automatically appended. You can get a full list +#' of CTAN mirrors via \code{tinytex:::ctan_mirrors()}. #' @param 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 @@ -211,6 +212,13 @@ auto_repo = function() { if (length(x) == 1) x else 'ctan' } +# retrieve all CTAN (https) mirrors +ctan_mirrors = function() { + x = readLines('https://ctan.org/mirrors/mirmon') + u = xfun::grep_sub('.*