Do you have some guidelines to install and configure Latex for using Rmarkdown on RStudio Server Pro ?
There are several ways of doing that I think with some questions raised like :
Should we use yum package manager to install Tex on Centos 7, installing also available Tex package ?
Should we use something like tinytex ? Globally or by user ?
How to do all that in an offline environment ? Does Package manager plans to cover latex package ?
do we need a tex mirror for latex packages ?
The aim is to offer Latex feature on RStudio Server Pro for every user, while having administration as easy as possible. That means not having every user install and configure latex himself but offering a working base for everyone.
Currently, we are thinking about:
• Installation Tex distribution available on centos 7
• Including tex library available
• With offline mode and no latex mirror, only those lib would be available.
If you have some advice and guidelines to follow, sharing experience would be awesome !
No specific reason. I was looking for such advice.
But does texlive-full cover every latex packages ? Could be heavy to have all installed by default...
I did not mention this specific full distro because I am not sure it is in the official centos yum repo. We have a mirror of this one I think : CentOS Mirror
No texlive-full but lot of texlive rpm
That would mean something like yum install texlive texlive*. Is it equivalent ?
I'm definitely not an expert on LaTeX distros, but this thread has some great discussion (albeit for Ubuntu). One person suggests that texlive-full is very heavy (>3 Gb), but that they've never needed to think about downloading more packages.
I'm not sure whether the CentOS repo has all of the texlive packages. If you can install from somewhere else, that second link should permit a full installation.
For offline installation, that third link has the ISO files available, which you could download, put onto physical media, and mount and install locally.
I would welcome any input on LaTeX package management in general. For the RStudio QuickStart, we used the tinytex to keep the download size manageable, and then I went through our broken content one package at a time installing LaTeX packages until it worked...
I need a :shudder: emoji. I definitely do not look forward to going through that again, nor do I recommend it If it's possible to do texlive-full and not be too concerned about disk space, I recommend just going for it. The time saved is probably well worth the storage costs In AWS, looks like ~$0.30/month ... So a long time before an hour is time well spent
But for anyone reading this who is glad the QuickStart is not any bigger, we saved like 1.5GB through these painful antics (I think... if I remember correctly)
This one of the reason I did not try yet... I had the feeling that would be a huge task. Thanks for sharing!
Even if we are not cloud based, space should not be an issue I think for a few Go. I'll will try to use the rpm approach and see how it goes. If something missing in our repo, the ISO thing could be useful.
I let this open to see if someone else has experience to share.
I have had trouble with LaTex on RHEL 7...from what I found tlmgr isn't part of RHEL rpms....so what I ended up doing is downloading/mirroring the TeX Live repo (~4GB), then installing full from local repo (because the network installation took too long and failed multiple times). (https://tug.org/texlive/acquire-mirror.html)
Installation to new shared directory (sub folder /usr/share/texlive/2018)....and updated symlinks, with sudo access.
first one was texlive full install online mode in /opt. It worked but it took 3 hours. Not sure this can be used for installation in our production cluster.
so we are looking at using the ISO to install offline.
I did take a while to install over network.....that is why I went with the repo version....as I needed to install on two servers (TEST and PROD), so I could download it once and install on both servers from one point.
Download (rsync) did take a while but install after that was like 15 minutes for each server.
Good luck:)
I would go for TinyTeX, which gives you a current TeX distribution. That's what I did at one client installation that used RHEL 7. The TeX Live available from the package repositories was just to old:
If the server is not air-gapped, you can install missing packages on the fly. Or you could use tlmgr to install the full TeX Live to be on the save side:
sudo /usr/local/bin/tlmgr install scheme-full
You can also install any subset of packages (or collections) that you might find useful. All this is done on the system level, so that users do not have to worry about installing anything. But if you do not install everything and users are able to reach out, they can use
tinytex::tlmgr('init-usertree') # only do this once
tinytex::tlmgr_install(c('koma-script', 'xcolor'), usermode = TRUE)
You can also install any subset of packages (or collections) that you might find useful.
This is a point I don't want to struggle with. I don't know what is useful or what users need in their own Rmarkdown.
I thought about this solution with tinytex and user side installation, but I need to find a solution on an offline server. Users won't be able to install anything themselves from the internet repo. For R packages, we have an internal mirror. It would require the same thing from Tex packages.
Anyhow, I will keep that in mind, and I am happy to find out that this idea with tinytex has been at least implemented once