本帖最后由 zyzx 于 2014-1-24 09:50 编辑 % o0 P8 n, p7 H8 L
& [4 |5 O( Q% `# v
在texworks里编译一些模版,总是出现“缺少.sty”文件的报错,比如:
" d. k. h8 q) F/ J1 ^4 Q& F“- J% t1 C' Q/ Y; N B0 f5 C
! 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: ”
- N2 f2 n) o# y8 H* \) z: H4 I3 e$ \* a1 [* ]8 {# O
然后我从ctan上下载了booktabs文件夹,里面有这么几个文件:
( Z5 C% m9 v5 @; y5 F% d5 Z$ ubooktabs.dtx, booktabs.sty, booktabs.pdf, booktabs.ins, copying, readme
5 c x2 y# @; G6 d/ {其中readme里面有文件列表和安装方法:6 P% c% a$ G( X) K& L: w
“; m+ z: b5 a; F* G8 ^! l
FILES IN DISTRIBUTION: B* u) u8 U7 P: \& G
=====================
. U7 M- z7 J. K9 q1 p$ h BASE DISTRIBUTION:
: g8 r {. K2 \. J% B README This file.- d5 o( u# V' v- Y& j
booktabs.ins Package installation file.
) T' t Q8 Y8 y booktabs.dtx Package source file.4 W* }- ~: T. ]9 h, Z1 v+ L# T
COPYING GPL license file.9 R: }( q; x% D, T3 ^- r0 b" K) e5 `
booktabs.sty Package style file. It was produced by executing "latex booktabs.ins".5 {8 x9 h W" b) |$ K5 f
DOCUMENTATION:& R t* R% n2 g+ ^: S( y" _! w
booktabs.pdf User manual for booktabs package. It was produced by executing:
; h6 m1 ^4 R- m' _# n4 q5 z. [ pdflatex booktabs.dtx
$ N9 P+ x/ w" E/ p2 u' _/ ?8 r pdflatex booktabs.dtx7 ^9 l8 W0 P1 w( F
makeindex -s gglo.ist -o booktabs.gls booktabs.glo
' c- o* s" g9 q0 ?5 j" c: v makeindex -s gind.ist -o booktabs.ind booktabs.idx
* U# p: g- W7 S. \5 P& K pdflatex booktabs.dtx
2 z* ]4 r5 d) ~; F- O pdflatex booktabs.dtx7 H; T+ D- Y! j
BASIC INSTALLATION! f; `. K: X4 [( z" r6 {8 b- l4 _
====================) N. n6 S* Z) v) F# }& [( ~5 a* Y! d1 {
The minimum requirement to use the package is the to have booktabs.sty in a directory where TeX can find it.+ H! \$ {- s3 p+ v7 f
For a basic installation on a TDS compliant system, move the following files to the following directories:9 B8 Y' K1 M& t9 e3 Q" G
<texmf>/tex/latex/booktabs/4 c& l/ U, l2 |' g/ p8 g# Z
booktabs.sty
/ X! w* F! s& h8 W5 S <texmf>/source/latex/booktabs/8 [ L& K8 C0 z. Y
booktabs.ins
" q5 y9 G& v7 M+ H3 ? booktabs.dtx! H: P: R' Y; U1 f9 U ~
COPY6 i$ ?) r. G9 ~' u, ^
<texmf>/doc/latex/booktabs/
+ H: ^% z# Z/ Z5 G/ z1 A README+ }8 K; L/ Y3 J$ @2 t
booktabs.pdf9 b; O. k4 v$ q4 {- q# v
”
# S: d0 T, \* t; @% ?" L& |1 D& X+ ~, T" Y
我按上面的要求把各个文件放在了相应的位置(红字部分没有操作,因为不知道怎么操作),但是运行模版后仍然报错说找不到,怎么办呢?请大家帮忙! |