Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
How do I install an individual package on a Linux system?

The Debian/Ubuntu archives typically include assemblies of many LaTeX packages for convenience of downloading (e.g., texlive-latex-extra). However, a user may prefer a single package to these conglomerations. Is there a simple way to manually acquire a single LaTeX package on Debian/Ubuntu?

share|improve this question
1  
Debian includes a texlive-full package. If you don’t want to worry about such things, install this one. –  mhp Aug 31 '12 at 10:33
    
Closed as a 'reverse dupe': we've now got a proper answer for the general case. –  Joseph Wright Sep 18 '12 at 14:33
add comment

marked as duplicate by Joseph Wright Sep 18 '12 at 14:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

up vote 22 down vote accepted

The following four steps permit manual installation of packages on Debian/Ubuntu (and presumably other Linux) systems.

  1. Download the package from CTAN (e.g., footmisc.zip).
  2. Extract the files and place them in an appropriate directory (e.g., /usr/local/share/texmf/tex/latex/footmisc/). This location is preferable to the main installation tree (/usr/share/texmf-texlive/tex/latex/) as the files are more likely to be preserved during upgrades.
  3. Generate the .sty file by running latex on the appropriate source files (e.g., latex footmisc.ins and latex footmisc.dtx).
  4. Update the ls-R file in this source tree (e.g., cd /usr/local/share/texmf/ ; sudo mktexlsr). Because /usr/local/share/texmf/tex/ is not searched recursively by kpathsea (cf. kpsepath tex), the ls-R file at the root directory of this search path must be updated to make the system aware of the new package.
share|improve this answer
    
What happens if the manually installed package (in the "preferable" /usr/local/share/texmf/tex/latex/YouNameIt directory) gets, also, available in the repositories and installed automatically during an upgrade to the main installation tree? Any confusions to be expected? –  Nikos Alexandris Jun 21 '12 at 9:28
    
@NikosAlexandris: /usr/local/share/texmf/tex normally takes precedence over /usr/share/texmf-texlive/tex. Check the output of kpsepath tex. –  mhp Aug 31 '12 at 10:43
    
@mph Indeed, it precedes. –  Nikos Alexandris Aug 31 '12 at 15:27
add comment

The TeXLive in the repositories is from 2009. It's more recommended to go with the latest version on the Tug (TeX Users Group) website:

http://www.tug.org/texlive/acquire.html

Once you have installed this, you'll have access to the command tlmgr which stands for 'TeX Live manager'. There have been a few other posts here on tex.se that will give further information:

The advantage of using tlmgr is that it will keep all of the dependencies up to date- trying to do this manually can often be frustrating :)

share|improve this answer
    
Thanks for this suggestion. As of now, I prefer to stick with the Debian stable texlive (2009) because my system tends to have problems with more "bleeding edge" installs. Short of tlmgr, which I will look forward to in the next Debian stable release, is there another way to install a single package besides downloading it, moving files to appropriate locations (probably /usr/local/) and updating the ls-R files? –  user001 Dec 21 '11 at 3:54
    
@user001: that should work, but as I say, there might be dependencies that are hard to predict :) –  cmhughes Dec 21 '11 at 3:58
    
@user001 This is in some ways a Debian question as what you want to do is grab part of something they have packaged up. The 'pure TeX' way is to either use tlmgr as cmhighes says or to get it from CTAN as you suggest in your question. –  Joseph Wright Dec 21 '11 at 8:09
add comment

I always found that the easiest way to manually install a package is to create a folder texmf in my "home" directory, dump all the downloaded .sty or .cls or whatever in there and run texhash texmf. That's all I ever had to do, if I'm not installing a font.

share|improve this answer
    
Thanks Joseph. I will try that as well. Does texhash texmf operate similarly to mktexlsr? –  user001 Dec 28 '11 at 7:33
2  
@user001: In Debian, texhash is simply a link to mktexlsr. –  mhp Aug 31 '12 at 10:35
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.