zyzx 发表于 2014-1-24 09:37

请问缺少的.sty文件如何安装?

本帖最后由 zyzx 于 2014-1-24 09:50 编辑

在texworks里编译一些模版,总是出现“缺少.sty”文件的报错,比如:

! LaTeX Error: File `booktabs.sty' not found.Type X to quit or <RETURN> to proceed,or enter new name. (Default extension: sty)Enter file name: ”

然后我从ctan上下载了booktabs文件夹,里面有这么几个文件:
booktabs.dtx, booktabs.sty, booktabs.pdf, booktabs.ins, copying, readme
其中readme里面有文件列表和安装方法:

FILES IN DISTRIBUTION
=====================
   BASE DISTRIBUTION:
      README        This file.
      booktabs.ins  Package installation file.
      booktabs.dtx  Package source file.
      COPYING       GPL license file.
      booktabs.sty  Package style file. It was produced by executing "latex booktabs.ins".
   DOCUMENTATION:
      booktabs.pdf  User manual for booktabs package. It was produced by executing:
                       pdflatex booktabs.dtx
                       pdflatex booktabs.dtx
                       makeindex -s gglo.ist -o booktabs.gls booktabs.glo
                       makeindex -s gind.ist -o booktabs.ind booktabs.idx
                       pdflatex booktabs.dtx
                       pdflatex booktabs.dtx
BASIC INSTALLATION
====================
   The minimum requirement to use the package is the to have booktabs.sty in a directory where TeX can find it.
   For a basic installation on a TDS compliant system, move the following files to the following directories:
     <texmf>/tex/latex/booktabs/
        booktabs.sty
     <texmf>/source/latex/booktabs/
         booktabs.ins
         booktabs.dtx
         COPY
     <texmf>/doc/latex/booktabs/
         README
         booktabs.pdf


我按上面的要求把各个文件放在了相应的位置(红字部分没有操作,因为不知道怎么操作),但是运行模版后仍然报错说找不到,怎么办呢?请大家帮忙!
页: [1]
查看完整版本: 请问缺少的.sty文件如何安装?