本帖最后由 zyzx 于 2014-1-24 09:50 编辑 6 [# ?3 j& |9 u K3 _& D) G
2 r# C, c: a! _. L# ^
在texworks里编译一些模版,总是出现“缺少.sty”文件的报错,比如:- m: p$ \: v: l9 k8 }2 D: g' R
“$ J$ p$ _. k1 `( @
! 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: ”9 B @4 q! G/ ?
# N0 _' z9 P. [" l/ B然后我从ctan上下载了booktabs文件夹,里面有这么几个文件:
% J) p6 T: C, u, ]booktabs.dtx, booktabs.sty, booktabs.pdf, booktabs.ins, copying, readme; @' h. D& W/ v5 `7 Q" L
其中readme里面有文件列表和安装方法:# N1 E" s2 O6 V
“
8 T' ]4 [4 T" n! P1 Z7 V' O% kFILES IN DISTRIBUTION. I3 B% V# c7 T
=====================
. D+ v; \ Q7 h0 g4 i% {8 | BASE DISTRIBUTION:
: R0 b* o' Y; _& b! i6 N/ X/ s7 U README This file.
6 l! n, L# c; v( a$ f booktabs.ins Package installation file.+ W# Q9 b/ ], V+ @6 b
booktabs.dtx Package source file.
! {2 Z/ [4 W. A1 ~ COPYING GPL license file.( C% {, E7 l+ `6 |
booktabs.sty Package style file. It was produced by executing "latex booktabs.ins".
. ~2 p. D1 k3 M. ? DOCUMENTATION:# b& T' A% g8 T. A% N1 `- S" e
booktabs.pdf User manual for booktabs package. It was produced by executing:
! `% u& z4 g$ w% Q8 j pdflatex booktabs.dtx3 b* ]% w) F" N$ k6 J1 i) M
pdflatex booktabs.dtx3 Z1 o. U. ]' v; i2 m# U( q
makeindex -s gglo.ist -o booktabs.gls booktabs.glo; Y+ g D8 W: Q( A! ~# C
makeindex -s gind.ist -o booktabs.ind booktabs.idx
2 j4 g9 j% C9 S. { pdflatex booktabs.dtx8 O- F% \! K/ ]7 B3 L3 u
pdflatex booktabs.dtx
5 E: `" j& @8 d# m5 VBASIC INSTALLATION
4 M0 y; y+ ~4 ?0 ^) x====================
& q. l9 s, z$ }0 @: i& ]" F$ K1 g The minimum requirement to use the package is the to have booktabs.sty in a directory where TeX can find it.2 S. ^7 `* `% \) Z: m& j
For a basic installation on a TDS compliant system, move the following files to the following directories:6 g/ t* \+ E+ \* F) ~
<texmf>/tex/latex/booktabs/* l- @) w7 u+ Q8 w
booktabs.sty2 I, [- ] ]- C c
<texmf>/source/latex/booktabs/
1 Y. G ]7 Q; t( X1 g X+ j0 L4 O booktabs.ins
, g* [' R& y. Z4 w+ c: o booktabs.dtx: W1 U, A* J7 C7 k
COPY
K& _) b4 t. U <texmf>/doc/latex/booktabs/
: N g" b# E2 v& {9 e% C README: K* T' v, p. Y5 Q
booktabs.pdf1 I/ ~2 i- B* o3 ^
”
" z8 D5 ~- G+ u* J$ b/ ^
3 R( W% ?( s' ^. R) M% c4 W5 ]/ p我按上面的要求把各个文件放在了相应的位置(红字部分没有操作,因为不知道怎么操作),但是运行模版后仍然报错说找不到,怎么办呢?请大家帮忙! |