Tiago Cogumbreiro

O Irrepupável

Back to top

Sunday, February 04, 2007

How to install LaTeX Style Files (.sty) on Ubuntu, using TeTeX or Tex Live

One thing that makes LaTeX so powerful is the enourmous amount of extensions available. Some extensions, usually with the .sty filename extension, do not come with an installation tutorial. I consider that they do not come with a tutorial because it is assumed it is an easy task. Another reason for having no installation instructions might be because it is platform dependent (i.e., different installation directories).

The directory for installing LaTeX files, on Ubuntu, depends on the distribution you are using. If you are using TeTeX, it is:

/usr/share/texmf-tetex/tex/latex

If you are using TeX Live, it is:

/usr/share/texmf-texlive/tex/latex

To install a style file you have to create a directory for it and copy the contents there. Next you have to run the program mktexlsr as root.

This is an example on how to install the prooftree extension, using the TeTeX distribution:

  1. create a directory named prooftree on /usr/share/texmf-tetex/tex/latex
  2. copy the file prooftree.sty and the file prooftree.tex to the directory /usr/share/texmf-tetex/tex/latex/prooftree
  3. run sudo mktexlsr

26 comments:

Enrique said...

I had to install the srcltx package and these instructions are correct, concise and useful. Thank you.

Anonymous said...

Thanks, it worked well :)

Apocalypse said...

Hey thanks for the great instructions and thanks for the link you placed on ubuntu guide forums, which lead me to your blog. Was exactly what I was after.

Anonymous said...

Thank you!

Anonymous said...

I googled my a** off to find an instruction guide for *.sty files. Thank you so much!

Picknicker said...

Thanks, mate - googled my a** off also.

Anonymous said...

Good man!
very useful.

Mario Morales Rivera said...

I did the procedure described above with fancyvrb package and does not work. Kile send the following message

/usr/share/texmf-texlive/tex/latex/fancyvrb/fancyvrb.sty:0:No file fancyvrb.cfg

Anonymous said...

Muito obrigado amigo!
Regards from Spain.

drorata said...

Thanks - worked excellent for me!

Freiddie said...

This is a very helpful document!

I needed to read this in order to learn to install LaTeX packages in Unix systems. Thanks!

Igor said...

Very helpful. Thanks. It did the trick.

Yazaq said...

Thank you very much. After desperately spending one hour to install miktex tool with no success, found your post and it worked like a charm.

Anonymous said...

Thanks, it was helpfull for me,
and easy to find :)

İsmail Arı said...

Thank you very much! It worked for me :)

Anonymous said...

I needed to install picins in texlive (it is no more included due to license problems) and your instruction where very important.
Thank you.

fabio said...

Thank you!!!!

Remi said...

Thanks a lot ! :)

Anonymous said...

Thanks, finally some clear instructions.

Jordan said...

As stated, good, _working_, simple instructions.

Anonymous said...

Great work! Thanks!

Anonymous said...

thank you from germany

Anonymous said...

Very good!!!

Thanks a lot

Anonymous said...

Thank you, it worked well :)

Dimitar said...

Thanks a lot! I had to install some Springer .sty files, couldn't make 'em work no matter what I tried. Now, everything works like a charm.

Manuel said...

Thanks for the help! Worked great!