本帖最后由 zyzx 于 2014-1-24 09:50 编辑
6 m8 K5 X# P3 r; H" v. C
$ A* o$ ^' S6 K0 g- x* m- Q在texworks里编译一些模版,总是出现“缺少.sty”文件的报错,比如:
( s" r4 l1 v: W- q8 w“) ~8 b7 O- Y- K: d4 C( b
! 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: ”5 L/ ~$ \# Q$ |5 z7 z4 ]
; _% x. X4 L7 B& h
然后我从ctan上下载了booktabs文件夹,里面有这么几个文件:
! x" ~! P/ X$ Y8 |booktabs.dtx, booktabs.sty, booktabs.pdf, booktabs.ins, copying, readme# `3 q' D3 u+ _8 l
其中readme里面有文件列表和安装方法:
( ~. b1 J! P: l( N' p8 D7 |“
. X+ \+ f. ] U& U; r! V4 TFILES IN DISTRIBUTION
, Y+ y0 K4 q6 |$ W4 A=====================
& R9 w& t" P4 Z6 e3 v6 u( O4 P3 H8 } BASE DISTRIBUTION:' b( g' R2 r2 ]3 ?0 O
README This file.
# f1 V0 t0 r5 L% x! a2 \4 M booktabs.ins Package installation file." B0 N) _/ D3 d" T+ ?, f+ Z8 P
booktabs.dtx Package source file.2 }- U9 \' G) y; l. }
COPYING GPL license file.
7 Z, f5 d4 `+ { booktabs.sty Package style file. It was produced by executing "latex booktabs.ins".3 {% ]4 m3 e/ y# D: R6 e
DOCUMENTATION:
! O" Z) ^7 |( C0 Z booktabs.pdf User manual for booktabs package. It was produced by executing:
7 E' n7 s5 s Y" M6 L pdflatex booktabs.dtx0 k; K- ]8 o& E) n) l. a
pdflatex booktabs.dtx5 ^) f3 t- Z# q5 k. H+ Y
makeindex -s gglo.ist -o booktabs.gls booktabs.glo
# k' `3 l2 t* G, n) ^& N makeindex -s gind.ist -o booktabs.ind booktabs.idx4 Q; Z. [ X- w3 _9 p g3 q, k) ~
pdflatex booktabs.dtx
0 g4 q! t, n' e, o; T1 U, r pdflatex booktabs.dtx# o" K! V1 R2 y; [1 w0 H
BASIC INSTALLATION6 `" ]) k! ]1 p3 }' R
====================1 |9 V- D3 u2 R9 v/ E$ P
The minimum requirement to use the package is the to have booktabs.sty in a directory where TeX can find it.1 \. a4 a1 z8 _( O% b* Z9 h
For a basic installation on a TDS compliant system, move the following files to the following directories:
. y, G- g9 D d0 [9 x <texmf>/tex/latex/booktabs/
7 [. S# {6 o% O" @0 J4 l7 y booktabs.sty' |) o3 ^ t! p0 o6 v% L7 L
<texmf>/source/latex/booktabs/9 ^$ M( e: ?' B3 s# f% s
booktabs.ins
# z6 {2 L' B% i$ f* u booktabs.dtx) i7 h1 |1 g" a( j3 N
COPY4 x$ }( Z9 ?, \0 v) e. q2 l
<texmf>/doc/latex/booktabs/
& m3 I4 o! G" K6 I" e README8 j8 V3 b1 ~. y2 z. m
booktabs.pdf
* K% ~# M" {& O: N1 E5 ?6 R4 J4 W3 m( @”8 k& o, g' U/ M
6 X, r/ c* M9 Z% K8 h& r
我按上面的要求把各个文件放在了相应的位置(红字部分没有操作,因为不知道怎么操作),但是运行模版后仍然报错说找不到,怎么办呢?请大家帮忙! |