TeXLive11 Aug 2020 • Leave Comments
- Additional Packages and Fonts
You will see name texmf everywhere. It stands for TEX and METAFONT (an old language Knuth used to design fonts).
To setup a TeX system, you need to do finish two tasks:
- Install TeX by a distribution, like TeXLive, MiKTeX etc.
- Manage TeX system by built-in texconﬁg or tlmgr of TeXLive, the later of which is far more powerful.
- Install, update, uninstall, backup individual TeX packages.
- Change installation options like paper size and source location.
You can regard tlmgr as package manager similar to dnf, emerge etc.
- Leave TeX installation in a standalone directory. Do not spread it across the LFS.
OS Package Manager
By default, the XeTeX engin is not installed. Hence, put it on command line too:
~ $ dnf install texlive texlive-xetex
Installation from package manager is a minimal install and may lack some fundamental TeX packages.
Net Installer is recommended by TeXLive, but limited by local bandwidth and is prone to network abrupt.
The advantage by net installer is you get the latest updates.
It's recommended to do a full install from ISO.
- Spare at least 10G disk space.
- Download the ISO (around 5G).
Outline the texmf trees by TeX varaibles
All of the trees shoulf follow TeX Directory Structure (TDS).
TEXDIR, TEXMFROOT (the main TeX directory): /usr/local/texlive/2020 TEXMFDIST, TEXMFMAIN (The principal tree containing the core of TeX): /usr/local/texlive/2020/texmf-dist TEXMFLOCAL (directory for site-wide local files): /usr/local/texlive/texmf-local TEXMFHOME (directory for user-specific files): ~/texmf TEXMFSYSVAR (directory for variable and automatically generated data): /usr/local/texlive/2020/texmf-var TEXMFVAR (personal directory for variable and automatically generated data): ~/.texlive2020/texmf-var TEXMFSYSCONFIG (directory for local config): /usr/local/texlive/2020/texmf-config TEXMFCONFIG (personal directory for local config): ~/.texlive2020/texmf-config
These TeX variables can be overriden by system environment variables like
install-tl --helpfor details.
Installation from ISO
~ # mkdir -p /mnt/iso; cd /mnt/iso ~ # mount /path/to/texlive.iso . # text mode ~ # per ./install-tl # GUI mode ~ # per ./install-tl -gui
Leave the default settings (full installation) if you dunno what you are doing. There is an option:
create symlinks in standard directories
Please leave it it uncheck, which otherwise may ruin your system bin directories.
It may take half an hour to complete the installation.
TeX environment variables for Unix
There may exist multiple TeX distributions installed alongside. So, it's better to create a current version symlink.
~ # cd /usr/local/texlive/ ~ # ln -sv 2020 current
Mainly, adjust the search path.
PATH=/usr/local/texlive/current/bin/x86_64-linux:$PATH; export PATH MANPATH=/usr/local/texlive/current/texmf-dist/doc/man:$MANPATH; export MANPATH INFOPATH=/usr/local/texlive/current/texmf-dist/doc/info:$INFOPATH; export INFOPATH
Check Installation Scheme
tlmgr will reveal everythin about the setup.
~ # tlmgr --help ~ # tlmgr conf ~ # kpsewhich -a texmf.cnf ~ # kpsewhich -var-value=TEXMFHOME ~ # kpsewhich foo.sty ~ # kpsewhich bar.cls
It is highly recommened not to update TeX distribution in place. Instead, you'd better install a new distribution version. Alternatively, please update or install individual packages into TEXMFLOCAL or TEXMFHOME.
Where should we get updates from?
By default, the
after install, set CTAN as source for package updates
option is checked upon installation.
But we can manually set the update repository afterwards:
~ # tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet
This tells tlmgr to use a nearby CTAN mirror for future updates.
# GUI ~ # tlmgr -gui # Text ~ # tlmgr update -all -dry-run ~ # tlmgr update -list ~ # tlmgr update -all ~ # tlmgr -repository /local/mirror/tlnet install collection-xetex ~ # tlmgr show collection-latexextra
Additional Packages and Fonts
Additional new or updated packages and fonts are expected to be in TEXMFLOCAL (system-wide) or TEXMFHOME (per-user, RECOMMENDED), independent of TeX distributions.
For changes under TEXMFLOCAL, we should update the search path for Kpathsea, as TEXMFLOCAL is prefixed with double
~ # mktexlsr [/usr/local/telive/texmf-local/] # -or- ~ # mktexlsr [$(kpsewhich -var-value=TEXMFLOCAL)] ~ # kpsewhich foobar.sty
mktexls acutally just creates a file named ls-R under the specified directory.
Without the directory argument, mktexlsr tries updates all ls-R for the installation.
You can also use texhash as it is just a symlink to mktexlsr.