Aug 11, 2022 by Thibault Debatty | 378 views
LaTeX may be almost 40 years old now (first release dates from 1984), it is still a very active ecosystem. On CTAN, more than 100 packages are created or updated every month. To get the best results for your book or paper, you should keep your LaTeX packages updated. This is precisely the goal of TeX Live...
Monthly uploads on CTAN. Source: ctan.org
TeX Live is a complete TeX/LaTeX environment maintained by the TeX Users Group (TUG). It includes all the major TeX-related programs (like
pdflatex), packages, and fonts.
TeX Live also provides tools to keep your environment updated. For example, the
tlmgr utility allows to download or update LaTeX macro packages.
TUG releases one major version of TeX each year. So in this post we will be installing TeX 2022.
Indeed, most Linux distributions also provide a 'texlive' package that you can install with
apt install texlive or
yum install texlive for example. However, these are 'static' versions of TeX Live, that are only updated by the distribution maintainer.
For example, you cannot use
tlmgr to download or update your macro packages. This means your are usually stuck with an outdated environemnt.
Hence the best way to use TeX Live is using the installation script. Pay attention that this will install TeX/LaTeX and all CTAN packages. So it will take roughly 8 GB of disk space.
cd /tmp wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz zcat install-tl-unx.tar.gz | tar xf - cd install-tl-* perl ./install-tl --no-interaction
TeX binaries will be installed to
/usr/local/texlive/2022/bin/x86_64-linux, so you should add this directory to your
echo 'export PATH="/usr/local/texlive/2022/bin/x86_64-linux:$PATH"' | sudo tee --append /etc/bash.bashrc
After login out and back in, you can test your installation with
tlmgr is a utility tool that can be used to download new TeX macro packages or update existing ones.
tlmgr requires some additional configuration steps:
Otherwize you will get a cryptic error like
cannot setup TLPDB in /home/USER/texmf at /usr/bin/tlmgr line 5308.
xzdec, that will be used by
tlmgrto decompress downloaded content:
sudo apt install xzdec
You can now update your LaTeX environment with:
sudo env "PATH=$PATH" tlmgr update --all