Ubuntu中如何安装*.sty文件(TeTeX或Tex Live)

在Ubuntu中,Latex的安装目录一般在以下目录:

Tex Live:/usr/share/texmf-texlive/tex/latex

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

本人用的是Tex Live,简单四步就可以完成安装。

  1. 下载需要的sty文件。安装源:http://tug.ctan.org/search/或者http://www.tug.org/texmf-dist/tex/latex/
  2. 在上述对应的目录中创建一个存放sty的文件夹(根据个人喜好);
  3. 把所要安装的sty文件拷贝到新建的文件夹中;
  4. 最后运行sudo mktexlsr或者sudo texhash。搞定!

Reference:

  1. http://blog.irrepupavel.com/2007/02/installing-latex-style-files-sty-on.html
  2. http://blog.csdn.net/QIBAOYUAN/archive/2011/01/08/612435
原文地址:https://www.cnblogs.com/JohnShao/p/1999706.html