2013-09-10

How to install LaTeX packages

Since I tend to forget how easy it is to install LaTeX packages, here is a very short how-to:
  • Go to http://www.ctan.org/tex-archive/install/macros/latex/contrib and find the package you want
  • download the .tds.zip file
  • change to the folder were your downloaded file was saved to
  • unzip it to the directory were your texmf is stored, for me (Ubuntu) i.e.: /home/username/texmf/
  • update tex, in the terminal, type: texhash ~/texmf/
  • Done!
Or, in the terminal with the glossaries package as an example:

cd ~/Downloads/
wget http://www.ctan.org/tex-archive/install/macros/latex/contrib/glossaries.tds.zip

unzip ~/Downloads/glossaries.tds.zip -d ~/texmf/

texhash ~/texmf/

Note: This way, the new package is only installed for you, not for all users!

No comments:

Post a Comment