LaTeX Setup the Hard Way

Warm Up

  1. Deep breath.
  2. Cup of tea.
  3. Remove the old LaTeX junk you've installed. Search for 'texlive' or 'latex' in your package manager's installed files.
  4. Find tlmgr in your package manager.

tlmgr

The LaTeX Package manager is known as tlmgr, and often resides in /opt/texlive/${YEAR}/bin/x86_64-linux/tlmgr. Double-check the location:

1ls -l /opt/texlive/${YEAR}/bin/x86_64-linux/tlmgr
2ls /opt/texlive/${YEAR}/texmf-dist/scripts/texlive/tlmgr.pl 

Double-check the year. It should not match the real year, it should match the texlive.

Problems along the Path

You can't use tlmgr unless it's in the $PATH.

Check if it is in the $PATH then if it should be in the path:

1echo $PATH
2grep texlive -r /etc/profile*

If tlmgr is where it should be, but not in the path, you can add it temporarily:

1export PATH=${PATH}:/opt/texlive/${YEAR}/bin/x86_64-linux

...or just reboot.

Usage

Search packages:

1tlmgr search --global epstopdf

Can't find what you need? Search for a specific file instead:

1tlmgr search --global --file epstopdf-base.sty
2sudo tlmgr install epstopdf-pkg
 1latexmk
 2luatex
 3titletoc
 4titlesec
 5multicol
 6microtype
 7graphicx
 8fontspec
 9makeindex
10imakeidx