Missing LaTeX ‘Glossaries’ Package In Ubuntu

I had cause to use the glossaries package in LaTeX today to take care of all my glossary management needs.  The idea of being able to create an external file to define all of my acronyms and definitions, and then include them as required in a separate section that is automatically included in a table of contents is very appealing.  Unfortunately, the glossaries package isn’t installed as part of the Ubuntu texlive-latex-* packages, nor is it separately installable via Aptitude.  I had expected that something as common as glossary management would be included, bud sadly that’s not the case.

Thankfully, the TexLive installation is quite modular, and it’s relatively straight forward to install new environments and packages. Through trial and error, I’ve discovered the missing packages required to use glossaries are: glossary, glossaries, xfor and etoolbox.

Firstly, we need to find the location to install local tex packages

[max@dolphin ~] $ kpsewhich -expand-var "\$TEXMFLOCAL"
/usr/local/share/texmf

Now that we know where to install the packages, we can download and install them. The following redacted typescript will download and extract the packages to the appropriate local location and rebuild the LaTeX package map.

[max@dolphin ~] $ wget http://mirror.ctan.org/macros/latex/contrib/glossary.zip -P /tmp/
[max@dolphin ~] $ wget http://mirrors.ctan.org/install/macros/latex/contrib/glossaries.tds.zip -P /tmp/
[max@dolphin ~] $ wget http://mirrors.ctan.org/install/macros/latex/contrib/xfor.tds.zip -P /tmp/
[max@dolphin ~] $ wget http://mirrors.ctan.org/install/macros/latex/contrib/etoolbox.tds.zip -P /tmp/
[max@dolphin ~] $ sudo unzip /tmp/glossaries.tds.zip -d /usr/local/share/texmf
[max@dolphin ~] $ sudo unzip /tmp/xfor.tds.zip -d /usr/local/share/texmf
[max@dolphin ~] $ sudo unzip /tmp/etoolbox.tds.zip -d /usr/local/share/texmf
[max@dolphin ~] $ sudo mkdir -p /usr/local/share/texmf/tex/latex/{contrib,html}
[max@dolphin ~] $ cd /tmp/
[max@dolphin ~] $ unzip glossary.zip && cd glossary
[max@dolphin glossary] $ latex glossary.ins
[max@dolphin glossary] $ sudo cp glossary.sty /usr/local/share/texmf/tex/latex/contrib/
[max@dolphin glossary] $ sudo cp glossary.perl /usr/local/share/texmf/tex/latex/html/
[max@dolphin glossary] $ cd /usr/local/share/texmf/
[max@dolphin glossary] $ sudo texhash

  • http://profiles.google.com/philipp.kern Philipp Kern

    It’s in texlive-latex-extra. Since ages.