ankursinha.in/blog

neuroscience/fedora/musings

Sun 25 March 2018

Building TeX Live from source

Posted by ankur in Tech (510 words, approximately a 3 minute read)


  • Share this post:

Between all the LaTeX vs Word discussions that I frequently become a part of, is the beauty of how it all works. They're both marvels, even if they each take turns to exasperate users. There are pros and cons of each, and each has their learning curves.

I use LaTeX for various reasons. To start with, it takes me 5 minutes to write a document in LaTeX and 30 to write the same in Word, but it can be the opposite for another user. May be I've gotten a system set up now where writing in LaTeX isn't inefficient any more. This is me using Vim, with plugins.

Of course, the fact that it is Free software is very important to me. It may not mean much to larger universities that have Microsoft services, but it does make a difference to universities that don't have that kind of funding. When I'd done my undergraduate degree back in India, for example, we didn't have a university wide Microsoft license. I used Fedora throughout, and having TeX Live (and other free software) available to me was quite something. We must remember to think of the way events and actions impact society, or that's my point of view, anyway.

Fedora provides TeX Live in its repos. It takes quite an effort to build it since it's a whole bunch of packages that must be built. There's a bit of scripting required to even build the spec file. So, it's simply:

sudo dnf install texlive

The advantage of the rpm packaging is that subsequent packages can also be installed by specifying the sty files. For the lineno package, for example, one can use:

sudo dnf install 'tex(lineno.sty)'

Not everyone must build TeX Live from source, upstream provides binaries for all platforms, and a convenient installer.

TeX Live installer

As it says, the whole collection is quite large, about 5GB.

Building from source

I followed the documentation that's provided for this already. Luckily, it uses Autotools, and I've quite a bit of experience with them. Fedora provides the 2016 release, so I played with the 2017 release here. I also referred to the Fedora spec files, which made life so much easier:

The build turned out to be quite simple. Fetch the sources, and then run configure && make && sudo make install, and that's quite it for the base packages.

I ran it on my headless Fedora Server system, and it pretty much went off without a hitch. I now have a base TeX Live distribution there in /usr/local/texmf-dist. Note, that this isn't sufficient. It only installs the basic bits of TeX Live, not even the LaTeX macro package. So, while it's easy and somewhat fun to tinker with on a day off, I wouldn't suggest it for any end-users. On my work machines, the two Fedora Workstation installs, I'm going to stick to the Fedora packages, which are more than sufficient! (If you're a Fedora user, please shower the Fedora TeX Live maintainers with cookies! Get on #fedora-devel on Freenode, and go <FAS username/Linked IRC nick>++)


  • Share this post:

Comments