Skip to content

Commit

Permalink
moved the repo from yihui to rstudio
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed May 16, 2022
1 parent b98b6c3 commit 9fe4438
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ By filing an issue to this repo, I promise that
- [ ] I have fully read the issue guide at https://yihui.org/issue/.
- [ ] I have provided the necessary information about my issue.
- If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
- If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included `xfun::session_info('tinytex')`. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: `remotes::install_github('yihui/tinytex')`.
- If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included `xfun::session_info('tinytex')`. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: `remotes::install_github('rstudio/tinytex')`.
- If I have posted the same issue elsewhere, I have also mentioned it in this issue.
- [ ] I have learned the Github Markdown syntax, and formatted my issue correctly.

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
GH_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
# required for GH to run on another repo (-R option)
# https://cli.github.com/manual/gh_help_environment
GH_REPO: yihui/tinytex-releases
GH_REPO: rstudio/tinytex-releases

jobs:
new-release:
Expand Down Expand Up @@ -277,7 +277,7 @@ jobs:
- name: Create release note
run: |
echo "This release contains the daily build of TinyTeX ($(date +'%A %B %d %Y %r %Z'))." > notes.md
echo "Please see https://github.com/yihui/tinytex-releases for more info." >> notes.md
echo "Please see https://github.com/rstudio/tinytex-releases for more info." >> notes.md
# TODO: Remove when version 2.8 will be available on GHA
- name: Update GH to get 2.8 needed for gh release edit
Expand Down
6 changes: 3 additions & 3 deletions 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.38.6
Version: 0.38.7
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre", "cph"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),
person(family = "RStudio, PBC", role = "cph"),
Expand All @@ -19,7 +19,7 @@ Description: Helper functions to install and maintain the 'LaTeX' distribution
Imports: xfun (>= 0.29)
Suggests: testit, rstudioapi
License: MIT + file LICENSE
URL: https://github.com/yihui/tinytex
BugReports: https://github.com/yihui/tinytex/issues
URL: https://github.com/rstudio/tinytex
BugReports: https://github.com/rstudio/tinytex/issues
Encoding: UTF-8
RoxygenNote: 7.1.2
20 changes: 10 additions & 10 deletions R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#' @param dir The directory to install (should not exist unless \code{force =
#' TRUE}) or uninstall TinyTeX.
#' @param version The version of TinyTeX, e.g., \code{"2020.09"} (see all
#' available versions at \url{https://github.com/yihui/tinytex-releases}, or
#' via \code{xfun::github_releases('yihui/tinytex-releases')}). By default, it
#' 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 Github release of TinyTeX.
#' @param repository The CTAN repository to set. By default, it is the
Expand Down Expand Up @@ -83,7 +83,7 @@ install_tinytex = function(
if ((texinput <- Sys.getenv('TEXINPUT')) != '') message(
'Your environment variable TEXINPUT is "', texinput,
'". Normally you should not set this variable, because it may lead to issues like ',
'https://github.com/yihui/tinytex/issues/92.'
'https://github.com/rstudio/tinytex/issues/92.'
)

switch(
Expand All @@ -92,7 +92,7 @@ install_tinytex = function(
check_local_bin()
if (os_index != 3 && !any(dir_exists(c('~/bin', '~/.local/bin')))) on.exit(message(
'You may have to restart your system after installing TinyTeX to make sure ',
'~/bin appears in your PATH variable (https://github.com/yihui/tinytex/issues/16).'
'~/bin appears in your PATH variable (https://github.com/rstudio/tinytex/issues/16).'
), add = TRUE)
},
'windows' = {},
Expand Down Expand Up @@ -189,7 +189,7 @@ check_local_bin = function() {
chown_cmd = 'chown -R `whoami`:admin /usr/local/bin'
message(
'The directory /usr/local/bin is not writable. I recommend that you ',
'make it writable. See https://github.com/yihui/tinytex/issues/24 for more info.'
'make it writable. See https://github.com/rstudio/tinytex/issues/24 for more info.'
)
if (system(sprintf(
"/usr/bin/osascript -e 'do shell script \"%s\" with administrator privileges'", chown_cmd
Expand Down Expand Up @@ -281,7 +281,7 @@ reinstall_tinytex = function(packages = TRUE, dir = tinytex_root(), ...) {
paste('"', pkgs, '"', sep = '', collapse = ', '), '))\n'
)
# in theory, users should not touch the texmf-local dir; if they did, I'll try
# to preserve it during reinstall: https://github.com/yihui/tinytex/issues/117
# to preserve it during reinstall: https://github.com/rstudio/tinytex/issues/117
if (length(list.files(texmf <- file.path(dir, 'texmf-local'), recursive = TRUE)) > 0) {
dir.create(texmf_tmp <- tempfile(), recursive = TRUE)
message(
Expand Down Expand Up @@ -399,10 +399,10 @@ install_prebuilt = function(

if (xfun::file_ext(pkg) == '') {
if (version == 'latest') {
version = xfun::github_releases('yihui/tinytex-releases', version)
version = xfun::github_releases('rstudio/tinytex-releases', version)
} else if (version == 'daily-github') {
version = ''
opts = options(tinytex.install.url = 'https://github.com/yihui/tinytex-releases/releases/download/daily/')
opts = options(tinytex.install.url = 'https://github.com/rstudio/tinytex-releases/releases/download/daily/')
on.exit(options(opts), add = TRUE)
}
version = gsub('^v', '', version)
Expand Down Expand Up @@ -444,7 +444,7 @@ post_install_config = function(add_path, extra_packages, repo, hash = FALSE) {
if (!dir_exists(bin_dir <- '~/.local/bin')) dir.create(bin_dir <- '~/bin', FALSE, TRUE)
tlmgr(c('option', 'sys_bin', bin_dir))
}
# fix fonts.conf: https://github.com/yihui/tinytex/issues/313
# fix fonts.conf: https://github.com/rstudio/tinytex/issues/313
tlmgr(c('postaction', 'install', 'script', 'xetex'), .quiet = TRUE)
# do not wrap lines in latex log (#322)
tlmgr_conf(c('texmf', 'max_print_line', '10000'), .quiet = TRUE, stdout = FALSE)
Expand All @@ -462,7 +462,7 @@ post_install_config = function(add_path, extra_packages, repo, hash = FALSE) {

download_installer = function(file, version) {
url = if (version != '') sprintf(
'https://github.com/yihui/tinytex-releases/releases/download/v%s/%s', version, file
'https://github.com/rstudio/tinytex-releases/releases/download/v%s/%s', version, file
) else paste0(getOption('tinytex.install.url', 'https://yihui.org/tinytex/'), file)
download_file(url, file)
}
Expand Down
2 changes: 1 addition & 1 deletion R/latex.R
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ latexmk_emu = function(
}
run_engine()
# some problems only trigger warnings but not errors, e.g.,
# https://github.com/yihui/tinytex/issues/311 fix them and re-run engine
# https://github.com/rstudio/tinytex/issues/311 fix them and re-run engine
if (install_packages && check_extra(logfile)) run_engine()

# generate index
Expand Down
4 changes: 2 additions & 2 deletions R/tlmgr.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tlmgr = function(args = character(), usermode = FALSE, ..., .quiet = FALSE) {
)
if (usermode) args = c('--usermode', args)
if (!.quiet) message(paste(c('tlmgr', args), collapse = ' '))
# use TeX Live's own binaries (e.g., curl): https://github.com/yihui/tinytex/issues/354
# use TeX Live's own binaries (e.g., curl): https://github.com/rstudio/tinytex/issues/354
vars = xfun::set_envvar(c(TEXLIVE_PREFER_OWN = 1))
on.exit(xfun::set_envvar(vars), add = TRUE)
system2('tlmgr', args, ...)
Expand Down Expand Up @@ -289,7 +289,7 @@ r_texmf = function(action = c('add', 'remove'), ...) {
r_texmf_path = function() {
d = file.path(R.home('share'), 'texmf')
if (dir_exists(d)) return(d)
# retry another directory: https://github.com/yihui/tinytex/issues/60
# retry another directory: https://github.com/rstudio/tinytex/issues/60
if ('Rd.sty' %in% basename(list.files(d2 <- '/usr/share/texmf', recursive = TRUE))) {
return(d2)
}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# TinyTeX

<!-- badges: start -->
[![R-CMD-check](https://github.com/yihui/tinytex/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/yihui/tinytex/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/yihui/tinytex/branch/main/graph/badge.svg)](https://app.codecov.io/gh/yihui/tinytex?branch=main)
[![R-CMD-check](https://github.com/rstudio/tinytex/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rstudio/tinytex/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/rstudio/tinytex/branch/main/graph/badge.svg)](https://app.codecov.io/gh/rstudio/tinytex?branch=main)
[![CRAN release](https://www.r-pkg.org/badges/version/tinytex)](https://cran.r-project.org/package=tinytex)
<!-- badges: end -->

Expand All @@ -18,4 +18,4 @@ I believe these problems can be solved by TinyTeX, a custom LaTeX distribution b

This repo contains the installation scripts of TinyTeX (under the `tools` directory) and the R companion package **tinytex**. Please see the full documentation at <https://yihui.org/tinytex/>. Obviously I hope it is not too long.

The R package **tinytex** is licensed under MIT. The LaTeX distribution TinyTeX is [licensed under GPL-2](https://github.com/yihui/tinytex-releases#license).
The R package **tinytex** is licensed under MIT. The LaTeX distribution TinyTeX is [licensed under GPL-2](https://github.com/rstudio/tinytex-releases#license).
8 changes: 4 additions & 4 deletions TUGboat/tinytex.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ The installation is done through
./install-tl -profile=tinytex.profile
```

where `install-tl` is extracted from the Net installer (use `install-tl-windows.bat` on Windows). The full source of the installation scripts can be found on Github at https://github.com/yihui/tinytex/tree/main/tools. To install TinyTeX on *nix, run `install-unx.sh`; to install it on Windows, run `install-windows.bat`.
where `install-tl` is extracted from the Net installer (use `install-tl-windows.bat` on Windows). The full source of the installation scripts can be found on Github at https://github.com/rstudio/tinytex/tree/main/tools. To install TinyTeX on *nix, run `install-unx.sh`; to install it on Windows, run `install-windows.bat`.

I set the `portable` option to `1` above, which means the installation directory will be portable. You can move it anywhere in your system, as long as you know how to handle the `PATH` variable, or call the executables (e.g., `tlmgr` or `pdflatex`) with their full paths. By default, the installation scripts of TinyTeX will try to add TeX Live's bin path to the environment variable `PATH`, or create symlinks to a path that is in `PATH` (e.g., `/usr/local/bin` on macOS and `$HOME/bin` on Linux).

Expand Down Expand Up @@ -171,7 +171,7 @@ In the R package **tinytex**, I try to obtain the names of the missing files or

The thing that TeX Live experts may frown upon is that since I do not know all possible missing packages beforehand, I will just keep trying to compile the document, find the missing packages, and install them. In other words, I do not know if there is a missing package unless I actually compile the document and hit an error. If a document contains $n$ missing packages, it may be recompiled $n$ times.

On the bright side, this only needs to be done at most once for a document, so even if it is slow for the first time, the compilation will be much faster next time because all necessary packages have been installed. The process is also automatic (by default), so all you need to do is wait for a short moment. This feature is turned on for R Markdown @R-rmarkdown users, which means if the user's LaTeX distribution is TinyTeX, they will almost never run into the issue of missing packages when compiling R Markdown to PDF, and the "easy-to-maintain" TinyTeX should not need maintenance at all. As a matter of fact, this article [was written in R Markdown](https://github.com/yihui/tinytex/blob/master/TUGboat/tinytex.Rmd), and the first time I compiled it, the `tugboat` package was automatically installed:
On the bright side, this only needs to be done at most once for a document, so even if it is slow for the first time, the compilation will be much faster next time because all necessary packages have been installed. The process is also automatic (by default), so all you need to do is wait for a short moment. This feature is turned on for R Markdown @R-rmarkdown users, which means if the user's LaTeX distribution is TinyTeX, they will almost never run into the issue of missing packages when compiling R Markdown to PDF, and the "easy-to-maintain" TinyTeX should not need maintenance at all. As a matter of fact, this article [was written in R Markdown](https://github.com/rstudio/tinytex/blob/master/TUGboat/tinytex.Rmd), and the first time I compiled it, the `tugboat` package was automatically installed:

```
tlmgr search --file --global /ltugboat.cls
Expand All @@ -184,7 +184,7 @@ done running mktexlsr.

The other major thing **tinytex** does is to emulate `latexmk`, i.e., try to compile a LaTeX document till all cross-references are resolved. The reason to reinvent `latexmk` in an R package is that `latexmk` cannot install missing packages on-the-fly.

To sum it up, if R users compile a LaTeX document via **tinytex**, usually they will not need to know how many times they need to recompile it, or run into errors due to missing packages. My implementation may be clumsy, but the reaction from users seems to be positive anyway: https://github.com/yihui/tinytex/issues/7. I hope this could give some inspiration to developers in other communities, and I will be even more excited if TeX Live adds the native (and professional) support someday, so I can drop my poor implementation.
To sum it up, if R users compile a LaTeX document via **tinytex**, usually they will not need to know how many times they need to recompile it, or run into errors due to missing packages. My implementation may be clumsy, but the reaction from users seems to be positive anyway: https://github.com/rstudio/tinytex/issues/7. I hope this could give some inspiration to developers in other communities, and I will be even more excited if TeX Live adds the native (and professional) support someday, so I can drop my poor implementation.

# Discussion

Expand All @@ -196,7 +196,7 @@ Thirdly, TinyTeX was created mainly for individual users who install TinyTeX for

Lastly, TinyTeX is essentially a version of TeX Live installed through an installation script. I did not provide prebuilt binaries, even though it would be easy technically. I do not fully understand the TeX Live license and LaTeX package licenses, but I guess I would be very likely to violate these licenses if I provide binaries without also shipping the source files inside at the same time. Anyway, installing TinyTeX over the Internet usually takes only a minute or two, so this may not be a big concern.

I hope you might find TinyTeX (and the R package **tinytex**, if you happen to be an R user, too) useful. If you have any feedback or questions or bug reports, please feel free to post them to the Github repository: https://github.com/yihui/tinytex.
I hope you might find TinyTeX (and the R package **tinytex**, if you happen to be an R user, too) useful. If you have any feedback or questions or bug reports, please feel free to post them to the Github repository: https://github.com/rstudio/tinytex.

```{r, include=FALSE}
knitr::write_bib(c('base', 'tinytex', 'rmarkdown'), 'tinytex.bib')
Expand Down
2 changes: 1 addition & 1 deletion inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
\section{CHANGES IN tinytex VERSION 999.999}{
\itemize{
\item This NEWS file is only a placeholder. The version 999.999 does not really
exist. Please read the NEWS on Github: \url{https://github.com/yihui/tinytex/releases}
exist. Please read the NEWS on Github: \url{https://github.com/rstudio/tinytex/releases}
}
}
4 changes: 2 additions & 2 deletions man/install_tinytex.Rd

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

4 changes: 2 additions & 2 deletions man/tinytex-package.Rd

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

4 changes: 2 additions & 2 deletions tools/install-bin-unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ fi
rm -rf $TEXDIR

if [ -z $TINYTEX_VERSION ]; then
TINYTEX_URL="https://github.com/yihui/tinytex-releases/releases/download/daily/$TINYTEX_INSTALLER"
TINYTEX_URL="https://github.com/rstudio/tinytex-releases/releases/download/daily/$TINYTEX_INSTALLER"
else
TINYTEX_URL="https://github.com/yihui/tinytex-releases/releases/download/v$TINYTEX_VERSION/$TINYTEX_INSTALLER-v$TINYTEX_VERSION"
TINYTEX_URL="https://github.com/rstudio/tinytex-releases/releases/download/v$TINYTEX_VERSION/$TINYTEX_INSTALLER-v$TINYTEX_VERSION"
fi

if [ $OSNAME = 'Darwin' ]; then
Expand Down
4 changes: 2 additions & 2 deletions tools/install-bin-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ for /d %%G in ("TinyTeX*") do rd /s /q "%%~G"
if not defined TINYTEX_INSTALLER set TINYTEX_INSTALLER=TinyTeX-1

if not defined TINYTEX_VERSION (
set TINYTEX_URL=https://github.com/yihui/tinytex-releases/releases/download/daily/%TINYTEX_INSTALLER%.zip
set TINYTEX_URL=https://github.com/rstudio/tinytex-releases/releases/download/daily/%TINYTEX_INSTALLER%.zip
) else (
set TINYTEX_URL=https://github.com/yihui/tinytex-releases/releases/download/v%TINYTEX_VERSION%/%TINYTEX_INSTALLER%-v%TINYTEX_VERSION%.zip
set TINYTEX_URL=https://github.com/rstudio/tinytex-releases/releases/download/v%TINYTEX_VERSION%/%TINYTEX_INSTALLER%-v%TINYTEX_VERSION%.zip
)

rem download the zip package - method 1
Expand Down
8 changes: 4 additions & 4 deletions tools/test-packages.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ system(sprintf('du -sh %s', tinytex::tinytex_root()))
# now see which packages are required to compile the above Rmd files
x1 = sort(unique(c(
setdiff(tinytex::tl_pkgs(), x0),
'latexmk', # https://github.com/yihui/tinytex/issues/51
'float', # https://github.com/yihui/tinytex/issues/122
'psnfss', # https://github.com/yihui/tinytex/issues/303
# https://github.com/yihui/tinytex/issues/73
'latexmk', # https://github.com/rstudio/tinytex/issues/51
'float', # https://github.com/rstudio/tinytex/issues/122
'psnfss', # https://github.com/rstudio/tinytex/issues/303
# https://github.com/rstudio/tinytex/issues/73
'ec', 'inconsolata', 'times', 'tex', 'helvetic', 'dvips', 'metafont', 'mfware', 'xkeyval'
)))
tinytex::tlmgr_install(x1)
Expand Down

0 comments on commit 9fe4438

Please sign in to comment.