本帖最后由 zyzx 于 2014-1-24 09:50 编辑
* j, K7 p* H9 ?% r% A8 p. q5 b& }) V+ \6 r) t# t
在texworks里编译一些模版,总是出现“缺少.sty”文件的报错,比如:5 { ?, P3 K/ E# C1 V2 E
“/ v+ k u, Y* n* y7 X1 y5 Y E* \
! 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: ”7 ^) \" _6 U% @0 k* G' Z6 |2 M# A7 z
3 |5 l* C w3 ~' Q! F# X9 u; F然后我从ctan上下载了booktabs文件夹,里面有这么几个文件:
, Z5 {- u; d) ?booktabs.dtx, booktabs.sty, booktabs.pdf, booktabs.ins, copying, readme }. {4 u. C, ^9 V
其中readme里面有文件列表和安装方法:
( w1 c# F P; ]' R& k' t“
8 |0 c$ [5 V5 xFILES IN DISTRIBUTION1 p9 l. H/ N2 r
=====================
& @1 V% l6 M" ?$ A1 M. n/ M, C4 A. Q BASE DISTRIBUTION:
. q ~5 H* n" x. H5 S; P$ U; O( s README This file.6 i( M* r$ i/ o) G" D
booktabs.ins Package installation file.
/ h' w+ T3 j$ {2 i3 u/ b2 I booktabs.dtx Package source file.; `; s0 r: C" f
COPYING GPL license file.1 c4 K9 P, S" o9 H3 Q [5 Y- o
booktabs.sty Package style file. It was produced by executing "latex booktabs.ins".# ]0 y n* e& u& ~
DOCUMENTATION:' `. C- }: N) c& ?. Z/ o' u8 A+ a
booktabs.pdf User manual for booktabs package. It was produced by executing:
6 S! k5 U$ k [# k pdflatex booktabs.dtx
6 E% O* X+ ^( @- X' p pdflatex booktabs.dtx
: l- r* y( k" |& p/ Y. l, F( l+ U makeindex -s gglo.ist -o booktabs.gls booktabs.glo7 B' v7 t, u1 m, r9 A9 y1 p6 u
makeindex -s gind.ist -o booktabs.ind booktabs.idx
! N" f1 G7 M$ x pdflatex booktabs.dtx
! O# n' m6 }! c% ?6 j; q1 ?5 z pdflatex booktabs.dtx Y, J! T: B+ Y
BASIC INSTALLATION
/ o9 S" I- o$ E' `* @8 |8 w; @+ k====================) |5 o# m' F/ q% n% V2 `3 ~9 F8 C
The minimum requirement to use the package is the to have booktabs.sty in a directory where TeX can find it.
8 H, ?7 [ D- M& {( `& Q For a basic installation on a TDS compliant system, move the following files to the following directories:) {& g1 J; o; m( ?
<texmf>/tex/latex/booktabs/- J# g% D% c b. I
booktabs.sty
* b/ E+ X7 E' q* u5 A+ }2 x <texmf>/source/latex/booktabs/4 z V) I- c; F
booktabs.ins
! ~; E* N$ M+ e# _/ M9 ^: c( A booktabs.dtx
) @' v8 H5 y! ]3 [1 N* z8 N COPY
3 E/ H& H# ?/ n <texmf>/doc/latex/booktabs/
- L n" w" t w2 U, B README
9 E) w: b& \: G( n booktabs.pdf" P3 r) P! {7 ]) D
”+ f/ A G, S5 L* X' [
- g0 C( W: I. W; b) o
我按上面的要求把各个文件放在了相应的位置(红字部分没有操作,因为不知道怎么操作),但是运行模版后仍然报错说找不到,怎么办呢?请大家帮忙! |