本帖最后由 zyzx 于 2014-1-24 09:50 编辑 $ ?8 J5 Y. \( [1 A! ]0 Q& v
$ O! F8 y( k% ]在texworks里编译一些模版,总是出现“缺少.sty”文件的报错,比如:
1 ]0 K5 `5 j7 |) @“1 }3 H. g8 f" r5 Q! p& H: V$ v+ ]
! 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 `' R, h5 A C) M
$ _% q! w# i4 U! C6 E4 q. A然后我从ctan上下载了booktabs文件夹,里面有这么几个文件:
2 R* g y* V+ Y6 K+ K9 sbooktabs.dtx, booktabs.sty, booktabs.pdf, booktabs.ins, copying, readme
' _5 p- H' m# E5 ? }其中readme里面有文件列表和安装方法:
3 ^; I H. J& Z- ~- L+ r: C“; ?( l8 }. G/ |4 }; A
FILES IN DISTRIBUTION
) x9 z) v) n9 s4 `0 f, r; E3 \7 Y=====================$ n4 i( z* h" J$ H' k
BASE DISTRIBUTION:
9 X" I& N7 G# X" H6 `( J README This file.+ p' L3 P; _0 d' t3 V' e1 h- N
booktabs.ins Package installation file.) r' A+ I' \& [, q7 v
booktabs.dtx Package source file.9 f, M" o1 W B2 L" z
COPYING GPL license file.) ~; A' R+ z1 @! |+ L
booktabs.sty Package style file. It was produced by executing "latex booktabs.ins".: n" B! q& Z% c4 M* M5 d
DOCUMENTATION:
& P* ?7 h% y) s! p. K: A booktabs.pdf User manual for booktabs package. It was produced by executing:2 \" o; O9 e z/ C k
pdflatex booktabs.dtx- B: {4 L: q3 a* j1 v
pdflatex booktabs.dtx6 V8 o* n* B; T/ k, k1 k
makeindex -s gglo.ist -o booktabs.gls booktabs.glo
W- i5 H" \" B. l! w/ e. q makeindex -s gind.ist -o booktabs.ind booktabs.idx0 |+ b/ V/ S3 Q# E: p, y6 d
pdflatex booktabs.dtx
3 U* r. Z1 }! h6 d; M3 v4 _ pdflatex booktabs.dtx3 e% M0 g1 X: b
BASIC INSTALLATION
0 I3 G+ a4 e* l. R====================# @# l! j9 |9 p3 z$ O4 M2 i
The minimum requirement to use the package is the to have booktabs.sty in a directory where TeX can find it.
7 ~) {, M# o& Z, y1 X; Q# p For a basic installation on a TDS compliant system, move the following files to the following directories:4 q6 k; U- W9 ?6 o; c. ?( k0 ]
<texmf>/tex/latex/booktabs/0 S. X4 a% y6 `* O o* r7 m' {
booktabs.sty0 l* t2 v' |! x# V t8 k3 U5 J A( J* w
<texmf>/source/latex/booktabs/
) F6 S5 U! a1 { F4 c) n% H Y booktabs.ins" m! p9 V/ t$ |, x( \! Q
booktabs.dtx
( C1 w& ~" J: w% S COPY5 u. E; Z6 ]7 o0 Y' w
<texmf>/doc/latex/booktabs/
0 t1 P% R# Y6 S* N README
4 v& r' F: l( ?" `- v5 b booktabs.pdf
6 c7 e. |4 t% k' b- ^) c”
0 u: N9 t: ~3 t
9 P3 D! r j( B" j我按上面的要求把各个文件放在了相应的位置(红字部分没有操作,因为不知道怎么操作),但是运行模版后仍然报错说找不到,怎么办呢?请大家帮忙! |