本帖最后由 zyzx 于 2014-1-24 09:50 编辑 % k! s/ g' I( ?6 e, ?* @. L
$ N" E: N! E& l: A1 ~8 V/ D* v在texworks里编译一些模版,总是出现“缺少.sty”文件的报错,比如:) t+ r8 S9 q& O# K k
“
* n+ ?2 P4 x y5 `6 I0 o W! 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: ”
* w9 I) Z L! i% X$ x* ~2 _% v1 L7 K5 M: v
然后我从ctan上下载了booktabs文件夹,里面有这么几个文件:6 z: x- n& j0 f
booktabs.dtx, booktabs.sty, booktabs.pdf, booktabs.ins, copying, readme* g6 J) S) G% a1 V& d1 y# q( c0 U- M
其中readme里面有文件列表和安装方法:& ~7 w) I/ S: _2 J1 T4 D- u2 T
“
( z7 x2 s' @* a. d3 F4 k, HFILES IN DISTRIBUTION" h- Q/ |( s4 R# H# v9 c# W6 ?
=====================8 m2 i. K$ z# n% G) Y. R. f1 ^: W
BASE DISTRIBUTION:
* F. r. @+ w. }: T README This file.
5 `) ?' \, I- e5 N( c- ^* d: r booktabs.ins Package installation file.
9 R' n. c0 ~, y8 t: `7 ]' ^ booktabs.dtx Package source file.
% w6 I9 N1 {7 G COPYING GPL license file.2 Y$ F* ]; t5 j
booktabs.sty Package style file. It was produced by executing "latex booktabs.ins"./ |/ M( {0 z2 G( E- l" i) {2 h3 V; i
DOCUMENTATION:
% d* A0 t, b* x7 O$ a" a booktabs.pdf User manual for booktabs package. It was produced by executing:, o- \$ l! M1 n. z3 m, d
pdflatex booktabs.dtx
; s+ V3 W# ~/ p4 K. j, y pdflatex booktabs.dtx
2 Z. Z3 r) z% Y- X2 b5 b makeindex -s gglo.ist -o booktabs.gls booktabs.glo/ b( A+ k% k7 ^& v1 s! w2 ~) r& d
makeindex -s gind.ist -o booktabs.ind booktabs.idx8 o8 X+ M+ {! K& G4 k
pdflatex booktabs.dtx
7 q. ?/ L7 K* h, \6 y: [/ i pdflatex booktabs.dtx0 ]" R+ L( K$ u) H, D
BASIC INSTALLATION; v& S, R- J" `7 ]/ y1 K4 K2 c
====================" r& U( ?3 F6 L/ @% Q
The minimum requirement to use the package is the to have booktabs.sty in a directory where TeX can find it.$ h7 x. I* A! g# W. D, i8 w" I
For a basic installation on a TDS compliant system, move the following files to the following directories:+ y5 y" J; r* w' {4 {! k
<texmf>/tex/latex/booktabs/8 [6 G$ v/ N* G2 O+ b0 o2 @6 R/ u! J
booktabs.sty
. w% m( r% K4 e* b9 I <texmf>/source/latex/booktabs/9 u% J/ ]$ V" Q% r: f
booktabs.ins
9 u9 H9 b, K2 h booktabs.dtx0 v `- O/ I, s: K! f. E8 O
COPY. ~- P& \9 z' b
<texmf>/doc/latex/booktabs/9 G B) ?+ t8 b6 o
README
' S' x2 Z+ ?. z0 u) o booktabs.pdf6 F0 i. E* [- ^( ?( l/ G
”9 i) } \& v `/ X+ l- E
$ m4 `' m/ @& l/ X+ U
我按上面的要求把各个文件放在了相应的位置(红字部分没有操作,因为不知道怎么操作),但是运行模版后仍然报错说找不到,怎么办呢?请大家帮忙! |