Skip to content

Commit

Permalink
automatically append the path systems/texlive/tlnet to the repository…
Browse files Browse the repository at this point in the history
… so users don't have to know this low-level technical detail (#149)
  • Loading branch information
yihui committed Oct 18, 2019
1 parent 76afc36 commit 7ca5e39
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tinytex
Type: Package
Title: Helper Functions to Install and Maintain 'TeX Live', and Compile 'LaTeX' Documents
Version: 0.16.2
Version: 0.16.3
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),
person(family = "RStudio, Inc.", role = "cph"),
Expand Down
9 changes: 7 additions & 2 deletions R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
#' @param repository The CTAN repository to be used. By default, a fast mirror
#' is automatically chosen. You can manually set one if the automatic mirror
#' is not really fast enough, e.g., if you are in China, you may consider
#' \code{'http://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet'}.
#' \code{'http://mirrors.tuna.tsinghua.edu.cn/CTAN/'}, or if you are in the
#' midwest in the US, you may use
#' \code{'https://mirror.las.iastate.edu/tex-archive/'}.
#' @param extra_packages A character vector of extra LaTeX packages to be
#' installed.
#' @references See the TinyTeX documentation (\url{https://yihui.name/tinytex/})
Expand Down Expand Up @@ -75,7 +77,10 @@ install_tinytex = function(
system2(bin, c('conf', 'auxtrees', 'add', r_texmf_path()))
}
https = grepl('^https://', repository)
not_ctan = repository != 'ctan'
if (not_ctan <- repository != 'ctan') {
repository = sub('systems/texlive/tlnet/?$', '', repository)
repository = paste0(sub('/+$', '', repository), '/', 'systems/texlive/tlnet')
}

if ((texinput <- Sys.getenv('TEXINPUT')) != '') message(
'Your environment variable TEXINPUT is "', texinput,
Expand Down
4 changes: 3 additions & 1 deletion man/install_tinytex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7ca5e39

Please sign in to comment.