Tex Live - Instalasi dan Konfigurasi Manual

Posted in: Software  
Tags: LaTex   TeX Live  
Author: Bambang Purnomosidi D. P. | | 5 minutes reading time

Tex Live adalah distribusi TeX document production system. TeX adalah sofware besar dan paket-paket pendukungnya dikumpulkan dan disimpan di The Comprehensive TeX Archive Network dengan mirror di seluruh dunia.TeX Live biasanya sudah disiapkan di berbagai macam distro Linux dan bisa diinstal dengan menggunakan package manager distro yang bersangkutan. Sebenarnya cukup menyenangkan, hanya saja, biasanya bukan versi update terbaru dan kita tidak bisa mengelola paket maupun mengkustomisasi TeX seperti yang kita inginkan. Contoh sederhana, menggunakan TeX Live dari distro Linux tertentu dan sekaligus menggunakan tlmgr untuk mengelola paket dari CTAN biasanya akan cukup mengacaukan. Hal ini yang membuat saya kemudian melakukan instalasi lengkap tanpa menggunakan package manager distro Linux yang bersangkutan.

Langkah 1: unduh TeX Live.

Tex Live bisa diperoleh di TUG. Untuk keperluan ini, pilih metode download. Gunakan script install-tl. Setelah itu ekstrak file yang telah diunduh:

$ tar -xvf install-tl-unx.tar.gz
$ tree install-tl-20240317 -L 1
install-tl-20240317
├── LICENSE.CTAN
├── LICENSE.TL
├── install-tl
├── release-texlive.txt
├── texmf-disth
└── tlpkg

3 directories, 4 files
$

Langkah 2: konfigurasi env variable.

Saya menggunakan Fish, jika menggunakan shell lain, sila menyesuaikan. Env variable yang harus dikonfigurasi adalah TEXLIVE_INSTALL_PREFIX:

$ set -x TEXLIVE_INSTALL_PREFIX /home/bpdp/software/texlive

Langkah 3: jalankan installer.

$ cd install-tl-20240317
$ ./install-tl

Loading https://mirror.unpad.ac.id/ctan/systems/texlive/tlnet/tlpkg/texlive.tlpdb

======================> TeX Live installation procedure <=====================

======>   Letters/digits in <angle brackets> indicate   <=======
======>   menu items for actions or customizations      <=======
= help>   https://tug.org/texlive/doc/install-tl.html   <=======

 Detected platform: GNU/Linux on x86_64
 
 <B> set binary platforms: 1 out of 15

 <S> set installation scheme: scheme-full

 <C> set installation collections:
     40 collections out of 41, disk space required: 8324 MB (free: 729568 MB)

 <D> set directories:
   TEXDIR (the main TeX directory):
     /home/bpdp/software/texlive/2024
   TEXMFLOCAL (directory for site-wide local files):
     /home/bpdp/software/texlive/texmf-local
   TEXMFSYSVAR (directory for variable and automatically generated data):
     /home/bpdp/software/texlive/2024/texmf-var
   TEXMFSYSCONFIG (directory for local config):
     /home/bpdp/software/texlive/2024/texmf-config
   TEXMFVAR (personal directory for variable and automatically generated data):
     ~/.texlive2024/texmf-var
   TEXMFCONFIG (personal directory for local config):
     ~/.texlive2024/texmf-config
   TEXMFHOME (directory for user-specific files):
     ~/texmf

 <O> options:
   [ ] use letter size instead of A4 by default
   [X] allow execution of restricted list of programs via \write18
   [X] create all format files
   [X] install macro/font doc tree
   [X] install macro/font source tree
   [ ] create symlinks to standard directories

 <V> set up for portable installation

Actions:
 <I> start installation to hard disk
 <P> save installation profile to 'texlive.profile' and exit
 <Q> quit

Enter command: 

Kita bisa mengubaha konfigurasi dengan memilih huruf yang ada pada <>. Misal, kita bisa mengubah skema paket yang diinstall dengan memilih S diikuti Enter:

===============================================================================
Select scheme:

 a [X] full scheme (everything)
 b [ ] medium scheme (small + more packages and languages)
 c [ ] small scheme (basic + xetex, metapost, a few languages)
 d [ ] basic scheme (plain and latex)
 e [ ] minimal scheme (plain only)
 f [ ] infrastructure-only scheme (no TeX at all)
 g [ ] book publishing scheme (core LaTeX and add-ons)
 h [ ] ConTeXt scheme
 i [ ] GUST TeX Live scheme
 j [ ] teTeX scheme (more than medium, but nowhere near full)
 k [ ] custom selection of collections

Actions: (disk space required: 8324 MB)
 <R> return to main menu
 <Q> quit

Enter letter to select scheme: 

Pilihan lainnya bisa dikonfigurasi. Saya pribadi lebih suka menggunakan portable installation dengan memilih V:

   !! Portable option changed;
   !! Directories have been reinitialized!

 <D> set directories:
   TEXDIR (the main TeX directory):
     /home/bpdp/software/texlive/2024
   TEXMFLOCAL (directory for site-wide local files):
     /home/bpdp/software/texlive/texmf-local
   TEXMFSYSVAR (directory for variable and automatically generated data):
     /home/bpdp/software/texlive/2024/texmf-var
   TEXMFSYSCONFIG (directory for local config):
     /home/bpdp/software/texlive/2024/texmf-config
   TEXMFVAR (personal directory for variable and automatically generated data):
     $TEXMFSYSVAR
   TEXMFCONFIG (personal directory for local config):
     $TEXMFSYSCONFIG
   TEXMFHOME (directory for user-specific files):
     $TEXMFLOCAL

Setelah itu, install:

Enter command: I
Installing to: /home/bpdp/software/texlive/2024
Installing [1/4, time/total: ??:??/??:??]: hyphen-base [23k]
Installing [2/4, time/total: 00:00/00:00]: kpathsea [1065k]
Installing [3/4, time/total: 00:02/00:04]: texlive-scripts [536k]
Installing [4/4, time/total: 00:03/00:04]: texlive.infra [557k]
...
...
...
Installing [4669/4671, time/total: 01:32:25/01:32:25]: zxjafont [173k]
Installing [4670/4671, time/total: 01:32:26/01:32:26]: zxjatype [144k]
Installing [4671/4671, time/total: 01:32:27/01:32:27]: zztex [147k]
Time used for installing the packages: 1:32:28
running mktexlsr /home/bpdp/software/texlive/2024/texmf-dist ...
mktexlsr: Updating /home/bpdp/software/texlive/2024/texmf-dist/ls-R... 
mktexlsr: Done.
writing fmtutil.cnf to /home/bpdp/software/texlive/2024/texmf-dist/web2c/fmtutil.cnf
writing updmap.cfg to /home/bpdp/software/texlive/2024/texmf-dist/web2c/updmap.cfg
writing language.dat to /home/bpdp/software/texlive/2024/texmf-var/tex/generic/config/language.dat
writing language.def to /home/bpdp/software/texlive/2024/texmf-var/tex/generic/config/language.def
writing language.dat.lua to /home/bpdp/software/texlive/2024/texmf-var/tex/generic/config/language.dat.lua
running mktexlsr /home/bpdp/software/texlive/2024/texmf-var /home/bpdp/software/texlive/2024/texmf-config /home/bpdp/software/texlive/2024/texmf-dist ...
mktexlsr: Updating /home/bpdp/software/texlive/2024/texmf-config/ls-R... 
mktexlsr: Updating /home/bpdp/software/texlive/2024/texmf-dist/ls-R... 
mktexlsr: Updating /home/bpdp/software/texlive/2024/texmf-var/ls-R... 
mktexlsr: Done.
running updmap-sys --nohash ...done
re-running mktexlsr /home/bpdp/software/texlive/2024/texmf-var /home/bpdp/software/texlive/2024/texmf-config ...
mktexlsr: Updating /home/bpdp/software/texlive/2024/texmf-config/ls-R... 
mktexlsr: Updating /home/bpdp/software/texlive/2024/texmf-var/ls-R... 
mktexlsr: Done.
setting up ConTeXt cache: running mtxrun --generate ...done
running context --luatex --generate ...done
running context --luajittex --generate ...done
pre-generating all format files, be patient...
running fmtutil-sys --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --no-strict --all ...done
running package-specific postactions
finished with package-specific postactions

 ----------------------------------------------------------------------
 The following environment variables contain the string "tex"
 (case-independent).  If you're doing anything but adding personal
 directories to the system paths, they may well cause trouble somewhere
 while running TeX.  If you encounter problems, try unsetting them.
 
 Please ignore spurious matches unrelated to TeX. (To omit this check,
 set the environment variable TEXLIVE_INSTALL_ENV_NOCHECK.)

    TEXDIR=/home/bpdp/software/texlive/
    TEXLIVE_INSTALL_NO_DISKCHECK=1
    TEXLIVE_INSTALL_PREFIX=/home/bpdp/software/texlive
 ----------------------------------------------------------------------
Welcome to TeX Live!
See /home/bpdp/software/texlive/2024/index.html for links to documentation.

The TeX Live web site (https://tug.org/texlive/) provides all updates
and corrections. TeX Live is a joint project of the TeX user groups
around the world; please consider supporting it by joining the group
best for you. The list of groups is available on the web
at https://tug.org/usergroups.html.

Add /home/bpdp/software/texlive/2024/texmf-dist/doc/man to MANPATH.
Add /home/bpdp/software/texlive/2024/texmf-dist/doc/info to INFOPATH.
Most importantly, add /home/bpdp/software/texlive/2024/bin/x86_64-linux
to your PATH for current and future sessions.

Logfile: /home/bpdp/software/texlive/2024/install-tl.log
$

Setelah itu, buat file untuk mengaktifkan environment variable yang bisa di-source saat kita akan menggunakan TeX Live:

$ cat ~/env/fish/texlive
set -x MANPATH /home/bpdp/software/texlive/2024/texmf-dist/doc/man $MANPATH
set -x INFOPATH /home/bpdp/software/texlive/2024/texmf-dist/doc/info $INFOPATH
set -x PATH /home/bpdp/software/texlive/2024/bin/x86_64-linux $PATH
$

Hasilnya adalah sebagai berikut:

$ source env/fish/texlive
$ pdflatex
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=pdflatex)
 restricted \write18 enabled.
**

Selesai, kita bisa menggunakan TeX Live dan tlmgr.