Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarto install #140

Open
Tracked by #139
cderv opened this issue Jan 23, 2024 · 4 comments
Open
Tracked by #139

quarto install #140

cderv opened this issue Jan 23, 2024 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@cderv
Copy link
Collaborator

cderv commented Jan 23, 2024

Do we really need a quarto_install() wrapper ?

This is a one time command - so not sure the benefit of running from R.

Also, usually R users needing TinyTex will have tinytex R package, and if chromium needed then it is easy enough to call quarto install directly in terminal

@cderv cderv added this to the Future milestone Jan 23, 2024
@cderv cderv added the enhancement New feature or request label Jan 23, 2024
@rundel
Copy link

rundel commented Aug 21, 2024

I will just 👍 for this feature.

Context - we are deploying a bunch of containers with quarto and due to how user home directories are created we need to install tinytex when users first login via a custom .First() function. Using tinytex::install_tinytex() works but is a bit less polished experience than quarto install tinytex so we're opting for the later via system2(). This works but still feels a bit clunky.

@cderv
Copy link
Collaborator Author

cderv commented Aug 26, 2024

Thanks for the 👍 that is useful to know the interest.

Using tinytex::install_tinytex() works but is a bit less polished experience than quarto install tinytex

Can you say more about the polished experience ? When installing TinyTeX from R, the tinytex package is the better option to me. Especially because we can get R console logging directly, and it is executing in session.

we're opting for the later via system2(). This works but still feels a bit clunky.

If I were to add quarto::quarto_install() into this package, I believe it would call the same R command you currently do, and this will run in background, with no interaction possible.

So curious about the less polished part so that we improve on both sides.

Thanks !

@rundel
Copy link

rundel commented Aug 27, 2024

It is primarily that the tui for quarto install tinytex is more direct and has less output that is likely to freak out a student who has no idea about quarto or latex internals.

> quarto install tinytex
Installing tinytex
[✓] Downloading TinyTex v2024.07.03
[✓] Unzipping TinyTeX-v2024.07.03.tar.gz
[✓] Moving files
[✓] Verifying tlgpg support
[✓] Configuring font paths
[✓] Default Repository: https://mirrors.rit.edu/CTAN/systems/texlive/tlnet/
Installation successful

is much preferable to

> tinytex::install_tinytex()
trying URL 'https://yihui.org/tinytex/TinyTeX-1.tar.gz'
Content type 'application/octet-stream' length 92770561 bytes (88.5 MB)
==================================================
downloaded 88.5 MB

tlmgr option sys_bin ~/bin
tlmgr: setting option sys_bin to /root/bin.
tlmgr: updating /root/.TinyTeX/tlpkg/texlive.tlpdb
tlmgr option repository 'https://ctan.math.illinois.edu/systems/texlive/tlnet'
tlmgr: setting default package repository to https://ctan.math.illinois.edu/systems/texlive/tlnet
tlmgr: updating /root/.TinyTeX/tlpkg/texlive.tlpdb
tlmgr update --list
tlmgr: package repository https://ctan.math.illinois.edu/systems/texlive/tlnet (not verified: gpg unavailable)
update:   texlive-scripts    [112k]: local:    72102, source:    72107
You may have to restart your system after installing TinyTeX to make sure ~/bin appears in your PATH variable (https://github.com/rstudio/tinytex/issues/16).

also the creation of the ~/bin directory is something that I would like to avoid in these containers.

@cderv
Copy link
Collaborator Author

cderv commented Aug 27, 2024

the tui for quarto install tinytex is more direct and has less output that is likely to freak out a student

That is really good feedback ! Thanks a lot. We may want to simplify the tinytex UI then too. Or at least provide a less verbose mode 🤔

also the creation of the ~/bin directory is something that I would like to avoid in these containers.

I think quarto could do the same too. In tinytex I think we check ~/.local/bin and if it does not exists, then we create ~/bin if it does not exists itself.

In Quarto we do almost the same. We check /usr/local/bin, ~/.local/bin and "~/bin. For whichever is in the PATH environment variable, we use the first found, create the directory if it does not exists, and use the same.

One important difference is that

  • Quarto does not add to tlmgr to PATH by default ( quarto install tinytex --update-path needs to be used)
  • tinytex R package does put in PATH by default. tinytex::install_tinytex(add_path = FALSE) needs to be used to not do that, and in that case, to sys_bin setup is done.

Hope it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants