Deutsch: → TeX Live Repository zur Installation über den TeX Live Paketmanager tlmgr
Since 2013 TeX Live has provided the facility to use several package repositories. Doing so, you can also state which package should be installed from which repository. There are two different methods:
The repository structure has been changed from TeX Live 2015 to TeX Live 2016. Therefore we have two different repositories:
Please note, access to these links is possible with tlmgr
only.
Installing a package from a particular repository once is easy. Just use tlmgr
this way:
tlmgr install --repository <URL> <package name>
You have to replace <URL>
by the URL of the repository and <package name>
by the name of the TeX Live package to be installed. If the package has already been installed, you have to add option --reinstall
. If you want to replace, e.g., koma-script
of TeX Live 2023 by the package of my repository you can use:
tlmgr install --reinstall --repository https://www.komascript.de/repository/texlive/2023 koma-script
Note that with the next update the packages of my repository generally will be replaced by the packages from the main TeX Live repository. This is because the main TeX Live repository internally uses much larger revision numbers. Therefore the above way of installation of a package from my repository is only a temporary one. Nevertheless, you can also remove such packages using the graphical user interface of the TeX Live Package Manager that can be started using »tlmgr gui
«. After removing the package you can reinstall it from the main TeX Live repository.
Please note, if you have a multi-user installation of TeX Live on Windows, you have to start tlmgr
as administrator (can be done from an administrator terminal). Multi-user installations of TeX Live on Linux often provide package installation only for user root. In this case you can use sudo
to execute tlmgr
, e.g.:
sudo tlmgr install --reinstall --repository https://www.komascript.de/repository/texlive/2023 koma-script
Nevertheless, TeX Live provides a user mode for multi-user installations. In user mode every user can install private packages. See the user manual for more information. You get it using either »texdoc tlmgr
« or »tlmgr help
«. By the way: Sometimes, the user mode can also be used to update packages and install packages if you do not use Vanilla TeX Live but the TeX Live packages of a Linux distribution.
You can define a repository to be the one always used for installation and updates of a package. To do so, you first have to add the repository to the known repositories. Then you can pin that repository for a package, e.g., the TeX Live package koma-script
:
tlmgr repository add https://www.komascript.de/repository/texlive/2023 KOMA tlmgr pinning add KOMA koma-script
Users of TeX Live 2013–2015 please replace the 2023
at the URL by 2015
.
After pinning the repository to the package you still have to install it. If the package has already been installed before, you have to force a re-installation:
tlmgr install --reinstall koma-script
While running this installation and all future updates of koma-script
, tlmgr
should show a line like:
[1/1, ??:??/??:??] reinstall: koma-script @KOMA [6373k]
in the output. The @KOMA
shows you that the package is installed from the KOMA
repository.
Please note, if you have a multi-user installation of TeX Live on Windows, you have to start tlmgr
as administrator (can be done from an administrator terminal). Multi-user installations of TeX Live on Linux often provide package installation only for user root. In this case you can use sudo
to execute tlmgr
, e.g.:
sudo tlmgr repository add https://www.komascript.de/repository/texlive/2023 KOMA sudo tlmgr pinning add KOMA koma-script sudo tlmgr install --reinstall koma-script
Nevertheless, TeX Live provides a user mode for multi-user installations. In user mode every user can install private packages. See the user manual for more information. You get it using either »texdoc tlmgr
« or »tlmgr help
«. By the way: Sometimes, the user mode can also be used to update packages and install packages if you do not use Vanilla TeX Live but the TeX Live packages of a Linux distribution.
Since TeX Live 2016 TeX Live provides verified package repositories. This works only if gpg
or gpg2
has been installed.
My repository also has a digital signature. tlmgr
can only verify the signature if you first install the needed public key. The finger print of the key is:
654E 0E2F 3E1F 283C BA58 37A1 4B8E DF5B ACB5 A37E
tlmgr key add KOMA.repo.asc
You can list the keys using:
tlmgr key list
For TeX Live 2023 it should result in:
/usr/local/texlive/2023/tlpkg/gpg/pubring.gpg --------------------------------------------- pub rsa2048 2016-03-19 [SC] C78B82D8C79512F79CC0D7C80D5E5D9106BAB6BC uid [ultimate] TeX Live Distribution <tex-live@tug.org> sub rsa2048 2016-03-19 [E] sub rsa2048 2016-03-19 [S] [expires: 2023-06-23] /usr/local/texlive/2023/tlpkg/gpg/repository-keys.gpg ----------------------------------------------------- pub rsa2048 2014-08-08 [SC] [expires: 2024-07-01] 654E0E2F3E1F283CBA5837A14B8EDF5BACB5A37E uid [ unknown] KOMA.repo (This key is used only to sign my repositories.) <komascript@gmx.info>
The file paths and the expire dates may differ. For TeX Live 2016 and 2017 also only the last eight digits of the fingerprints are shown.
Please note, if you have a multi-user installation of TeX Live on Windows, you have to start tlmgr
as administrator (can be done from an administrator terminal). Multi-user installations of TeX Live on Linux often provide key management only for user root. In this case you can use sudo
to execute tlmgr
, e.g.:
sudo tlmgr key add KOMA.repo.asc
As far as I know, key management in user mode is currently not supported by tlmgr
.
Nevertheless, you can use TeX Live since 2016 without repository verification. See the manual for more information. You get it using either »texdoc tlmgr
« or »tlmgr help
«.