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

helper for installing latex packages required when building R from source? #135

Closed
kevinushey opened this issue Jul 23, 2019 · 3 comments

Comments

@kevinushey
Copy link

commented Jul 23, 2019

By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.name/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 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.

I understand that my issue may be closed if I don't fulfill my promises.


Would you be willing to provide a helper function for installing the latex packages required when building R + recommended packages from source? For example, I had to install ae + parskip when building the utils + parallels vignettes.

Alternatively, perhaps:

tinytex/R/install.R

Lines 301 to 305 in 07cea7f

# LaTeX packages that I use
install_yihui_pkgs = function() {
pkgs = readLines('https://yihui.name/gh/tinytex/tools/pkgs-yihui.txt')
tlmgr_install(pkgs)
}

could be exported, since I think your collection of packages covers everything needed by R + the base / recommended packages.

@yihui

This comment has been minimized.

Copy link
Owner

commented Jul 23, 2019

I can certainly export that function (perhaps need to rename it :). The package names in pkgs-yihui.txt were collected from my experience of building vignettes of the huge amount of reverse dependencies of knitr/rmarkdown, etc. These are more than what an average user need, but I guess it is very worthwhile wasting a few megabytes of disk space compared to figuring out the required LaTeX packages from the error logs.

I haven't tried to build R from source since I created tinytex, so I don't know exactly which LaTeX packages are required. The total size of ae and parskip is about 650k when installed. Not too bad. Perhaps I should just add them to the default installation.

@yihui

This comment has been minimized.

Copy link
Owner

commented Jul 25, 2019

I thought a while about this and just documented it on the homepage: https://yihui.name/tinytex/#for-r-users instead of exporting the function since this function is very unlikely to be used by other developers in their packages, which means ::: is probably fine.

@kevinushey

This comment has been minimized.

Copy link
Author

commented Jul 25, 2019

That sounds good to me as well. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.