CLAWRIM Wiki

The Computational Lab for Advanced Water Resources Informatics and Modeling

User Tools

Site Tools


howtos:how_to_install_tex_live_on_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:how_to_install_tex_live_on_linux [2024-09-03 02:58 pm] – ↷ Page name changed from howtos:how_to_install_tex_live_on_slackware to howtos:how_to_install_tex_live_on_linux hchohowtos:how_to_install_tex_live_on_linux [2026-01-24 08:57 am] (current) hcho
Line 1: Line 1:
 ====== How to install TeX Live on Linux ====== ====== How to install TeX Live on Linux ======
  
-Slackware installs [[https://www.tug.org/texlive/|TeX Live]] by default. However, extra packages and documentation require root permissions to install. This HOWTO explains how to install TeX Live as a non-root user.+Slackware installs [[https://www.tug.org/texlive/|TeX Live]] by default. However, extra packages and documentation require root permissions to install (''texlive-extra'' and ''texlive-docs''), and they are not a full installation. This HOWTO explains how to install TeX Live as a non-root user
 + 
 +===== Shared non-root installation ===== 
 + 
 +The initial installation size for this method is larger (~9.6GB), but it can save disk storage on shared machines, since users use the same installation. It also does not require tlmgr for additional packages.
  
 <code bash> <code bash>
Line 15: Line 19:
 cd install-tl-[0-9]* cd install-tl-[0-9]*
 version=$(sed '/version [0-9]/!d; s/.*version //' release-texlive.txt) version=$(sed '/version [0-9]/!d; s/.*version //' release-texlive.txt)
 +# --texmfhome must be ~/usr/local/share/texmf, not hardcoded $HOME/usr/local/share/texmf
 ./install-tl \ ./install-tl \
  --no-interaction \  --no-interaction \
  --texdir=$HOME/usr/local/opt/texlive/$version \  --texdir=$HOME/usr/local/opt/texlive/$version \
  --texmflocal=$HOME/usr/local/opt/texlive/texmf-local \  --texmflocal=$HOME/usr/local/opt/texlive/texmf-local \
- --texmfhome=$HOME/usr/local/share/texmf \+ --texmfhome=~/usr/local/share/texmf \ 
 + --scheme=full \ 
 + --paper=letter 
 + 
 +# create a symlink for paths 
 +cd ~/usr/local/opt/texlive 
 +ln -s $version current 
 +
 + 
 +# delete the installer 
 +rm -rf install-tl-* 
 + 
 +# add paths to TeX Live 
 +cat << 'EOT' >> ~/.bash_profile 
 + 
 +# TeX Live 
 +export PATH="$HOME/usr/local/opt/texlive/current/bin/x86_64-linux:$PATH" 
 +export MANPATH="$HOME/usr/local/opt/texlive/current/texmf-dist/doc/man:$MANPATH" 
 +export INFOPATH="$HOME/usr/local/opt/texlive/current/texmf-dist/doc/info:$INFOPATH" 
 +EOT 
 + 
 +# read them into the current session 
 +. ~/.bash_profile 
 +</code> 
 + 
 +For other users, 
 +<code bash> 
 +# create the same directory structure 
 +mkdir -p ~/usr/local/opt ~/usr/local/share/texmf 
 + 
 +# create a symbolic link to the above installation 
 +ln -sf ~hcho/usr/local/opt/texlive ~/usr/local/opt 
 + 
 +# add paths to TeX Live 
 +cat << 'EOT' >> ~/.bash_profile 
 + 
 +# TeX Live 
 +export PATH="$HOME/usr/local/opt/texlive/current/bin/x86_64-linux:$PATH" 
 +export MANPATH="$HOME/usr/local/opt/texlive/current/texmf-dist/doc/man:$MANPATH" 
 +export INFOPATH="$HOME/usr/local/opt/texlive/current/texmf-dist/doc/info:$INFOPATH" 
 +EOT 
 + 
 +# read them into the current session 
 +. ~/.bash_profile 
 +</code> 
 + 
 +===== Per-user installation ===== 
 + 
 +The initial installation size for this method is smaller (~330M) because it installs only the basic scheme and requires tlmgr to install additional packages. However, this method can take up too much space when used on shared machines, since each user must install it. 
 + 
 +<code bash> 
 +# download the installer 
 +cd /tmp 
 +wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz 
 + 
 +# uncompress it 
 +tar xvf install-tl-unx.tar.gz 
 + 
 +# install it 
 +
 +cd install-tl-[0-9]* 
 +version=$(sed '/version [0-9]/!d; s/.*version //' release-texlive.txt) 
 +# --texmfhome can be hardcoded as $HOME/usr/local/share/texmf 
 +./install-tl \ 
 + --no-interaction \ 
 + --texdir=$HOME/usr/local/opt/texlive/$version \ 
 + --texmflocal=$HOME/usr/local/opt/texlive/texmf-local \ 
 + --texmfhome=~/usr/local/share/texmf \
  --scheme=basic \  --scheme=basic \
  --paper=letter  --paper=letter
Line 32: Line 104:
  
 # add paths to TeX Live # add paths to TeX Live
-cat <<'EOT'>> ~/.bash_profile+cat << 'EOT' >> ~/.bash_profile
  
 # TeX Live # TeX Live
Line 45: Line 117:
  
 Use [[https://www.tug.org/texlive/tlmgr.html|tlmgr]] (already installed with TeX Live) to install new packages. Use [[https://www.tug.org/texlive/tlmgr.html|tlmgr]] (already installed with TeX Live) to install new packages.
 +
 +===== LaTeX editing =====
  
 You can use [[https://kile.sourceforge.io/|Kile]] (already installed by Slackware) to edit and compile LaTeX files. If you like Vim or Neovim, [[https://github.com/lervag/vimtex|VimTeX]] is a great plugin. You can use [[https://kile.sourceforge.io/|Kile]] (already installed by Slackware) to edit and compile LaTeX files. If you like Vim or Neovim, [[https://github.com/lervag/vimtex|VimTeX]] is a great plugin.
  
 For reference management, [[https://www.jabref.org/|JabRef]] is good for [[https://www.bibtex.org/|BibTeX]]. I can install it for you. For reference management, [[https://www.jabref.org/|JabRef]] is good for [[https://www.bibtex.org/|BibTeX]]. I can install it for you.
howtos/how_to_install_tex_live_on_linux.1725397094.txt.gz · Last modified: by hcho

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki