How do I install a package which is supplied by a publisher (like Springer or Elsevier)? In MikTex (windows), I have to copy it into specified folder and than run some file which install the package. What are the corresponding actions in ubuntu with TeXLive?


Put them into


where ~ stands for your home. This for the .cls or .sty files; if there is a .bst file it should go into


(choose a different name than springer, if you want to).

If you need to make the package available to all users on your system, the "local" tree is the correct place. On a terminal window type

kpsewhich --var-value TEXMFLOCAL

and the answer is what you should substitute to ~/texmf in the paths above. Copy the files and do

sudo texmklsr
| improve this answer | |
  • 3
    Note that you need to run texhash ~/texmf if you already have a ~/texmf/ls-R cache file. Newer TeX version do not need this file for the user texmf tree but will search it for requested files. However, if the ls-R file is present it will be used and no search is done. So you need to either update or delete this file after installing new files in this tree, otherwise they won't be found. – Martin Scharrer Jun 23 '11 at 13:50
  • 2
    @Martin: this used to be true, but recent versions of Kpathsea just ignore the ls-R file if the tree is not mentionned in TEXMFDBS, precisely to avoid this issue. Anyway, it is best not to have a ls-Rfile in ~/texmf, which is the default since TeX Live 2007. – mpg Jun 28 '11 at 20:14
  • Excellent answer! And you might want to reference tug.org/tds/tds.pdf for details on the texmf directory structure. – Serrano Jan 6 '15 at 14:40

May I point you to the excellent TeX FAQ, which answers this and other questions?

| improve this answer | |

Another alternative is to put the files in /usr/local/share/texmf instead of ~/texmf or /usr/share/texmf. Personally, think this is preferable because I don't like seeing the texmf directory all the time in my home directory. It also doesn't clutter the main tree. In case you're on a multiuser system then others can also use the packages. Naturally this demands sudo rights for your user.

| improve this answer | |
  • Btw, this does not actually require sudo rights. It only requires write permission to the directory. You can give your user this permission once and for all so you don't need to use sudo every time you want to install a new package locally. – mpg Jun 28 '11 at 20:10

You just copy the package (unziped) into the folder: /usr/share/texmf/tex/latex

After that you open the terminal in this folder and type: texhash

You'll need root privileges to do that. It's important read the documentation of the specific packages to find any important detail.

| improve this answer | |
  • 2
    Using the main TeX tree is not recommended. An update to the distribution may destroy all changes. – egreg Jun 23 '11 at 13:40
  • I always use this tree to do serious work. And never had problems. – Eloy Mello Jun 23 '11 at 13:44
  • 1
    Well, you may have them when Ubuntu will shift to TeX Live 2010 (in 2013 or so). – egreg Jun 23 '11 at 13:50
  • @Jasper: let's wait and see. :-) The problem is not in the version, of course, but in the fact that the installation process might destroy personal changes. This won't happen to the local tree. – egreg Jun 23 '11 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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