Strauman / travis-latexbuild

Building LaTeX packages using Travis-CI
12 stars 4 forks source link

Make a package installation script #21

Open Strauman opened 5 years ago

Strauman commented 5 years ago

Make a script that automates the installation of packages.

Strauman commented 5 years ago

I can think of two main approaches:

PHPirates commented 5 years ago

I was thinking about this last week. Is this really not already done by somebody? I mean, everyone using TeX Live has this same problem, right?

Strauman commented 5 years ago

I know right?! I have made the former script though, in perl. It's quite messy though:

(It's a perl file, but github wouldn't allow me to upload a perl-file, so remove the .txt-extension:) latexinstall.pl

PHPirates commented 5 years ago

I suddenly remembered this morning: most people download the full TeX Live distribution, I think it's like 3GB. But I didn't because I don't have endless space on my dual-boot systems :smiley:

But to do this properly, since often latex packages are contained in a tex live package with a different name, you'd need to check at ctan in which tex live package a latex package is contained? It would still be faster than doing it manually, when automated.

Going to try out that perl script soon!

PHPirates commented 5 years ago

I tested and it seems to work on packages of which the latex and texlive name happen to be equal, but it always (also when it has installed packages) with Couldn't find packages that needed install at /home/thomas/GitRepos/random-tex/src/latexinstall.pl line 40. and Process finished with exit code 29, which makes my editor bail out and not run my tex file afterwards.

texliveonfly I tested the texliveonfly package, https://ctan.org/pkg/texliveonfly and https://latex.org/forum/viewtopic.php?t=15194. I just downloaded the python file, placed it next to my tex file and ran sudo python texliveonfly.py main.tex. I tested the rubikrotation latex package, and indeed it downloaded the correct texlive package in which it is contained (rubik) and all of its dependencies. This could a very useful addition to the build process. Heck, it would even be a useful addition to my local build process if only I could find a way to hide it like in miktex. I mean, if latexmk is a perl script, it should be possible to replace latexmk with texliveonfly? Definitely interesting.

I also found itex: https://github.com/dopefishh/itex but I have no idea how to use it, yet.

Strauman commented 5 years ago

I tested and it seems to work on packages of which the latex and texlive name happen to be equal, but it always (also when it has installed packages) with Couldn't find packages that needed install at /home/thomas/GitRepos/random-tex/src/latexinstall.pl line 40. and Process finished with exit code 29, which makes my editor bail out and not run my tex file afterwards.

Yes, this is a drawbaack

texliveonfly I tested the texliveonfly package, https://ctan.org/pkg/texliveonfly and https://latex.org/forum/viewtopic.php?t=15194. I just downloaded the python file, placed it next to my tex file and ran sudo python texliveonfly.py main.tex. I tested the rubikrotation latex package, and indeed it downloaded the correct texlive package in which it is contained (rubik) and all of its dependencies. This could a very useful addition to the build process. Heck, it would even be a useful addition to my local build process if only I could find a way to hide it like in miktex. I mean, if latexmk is a perl script, it should be possible to replace latexmk with texliveonfly? Definitely interesting.

Definitiely worth looking at. It could also just be a switch in the execute_tests.sh file

I also found itex: https://github.com/dopefishh/itex but I have no idea how to use it, yet.

PHPirates commented 5 years ago

I just tested the texliveonfly package, it worked right away. Just have to install the texliveonfly TeX Live package and run texliveonfly file.tex. Will add it to the docker build sometime, because it's pretty useful. I have updated the instructions for plain tex live already in my repo.

View it in action here: https://travis-ci.org/PHPirates/travis-ci-latex-pdf/jobs/465423647

Strauman commented 5 years ago

I like it!