本帖最后由 zyzx 于 2014-1-24 09:50 编辑 $ g9 h; L+ q' ~5 k# ^/ b
& r" M) R$ i3 P( O
在texworks里编译一些模版,总是出现“缺少.sty”文件的报错,比如:
4 W M( V# T5 h“
3 \# ]1 K+ l) |6 N" k! 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: ”. D; J3 }& K, V; b+ Z/ _
" r% B0 o) S; }3 d$ s5 T0 y
然后我从ctan上下载了booktabs文件夹,里面有这么几个文件:
; D: ] J* ?/ r X5 S4 dbooktabs.dtx, booktabs.sty, booktabs.pdf, booktabs.ins, copying, readme
0 D* z$ J/ O" k% ^' S" ~6 m其中readme里面有文件列表和安装方法:$ k( F# A. e) Q
“! B+ d6 O0 r& o! X1 Z2 D
FILES IN DISTRIBUTION
. f; {( o. N, j/ J# T=====================$ R4 V, B4 B: U: M7 O3 `" `) ]
BASE DISTRIBUTION:
5 v" L' k! @' i0 H* ^! b README This file.7 Y/ N0 Z5 F+ d
booktabs.ins Package installation file.
7 A J* m3 b$ K) d* [* L# g) W2 @! ^- ` booktabs.dtx Package source file.' r3 w# |- t) U& N) b
COPYING GPL license file., S" o2 Y5 I/ Z3 {/ N: T/ G$ I
booktabs.sty Package style file. It was produced by executing "latex booktabs.ins".3 Y/ k+ j8 a0 O9 z4 F9 n
DOCUMENTATION:1 ]- k) m% N" K9 N7 \7 V* m
booktabs.pdf User manual for booktabs package. It was produced by executing:# C) J* K- _* c1 B
pdflatex booktabs.dtx
+ x+ q* r9 @" o pdflatex booktabs.dtx* m2 G& B: t& @5 L) {% ^. ]
makeindex -s gglo.ist -o booktabs.gls booktabs.glo# Y+ s1 I Y* }" i& h
makeindex -s gind.ist -o booktabs.ind booktabs.idx
8 t! A$ m9 P$ N M2 J pdflatex booktabs.dtx0 W0 ^2 r3 |2 x* O5 v+ s! S$ t: X% Y
pdflatex booktabs.dtx
2 P7 ]* k+ }/ _# g0 jBASIC INSTALLATION
/ t8 Y+ C( h: ?! S====================
( N- i+ J. ?9 K/ y7 F! {5 K The minimum requirement to use the package is the to have booktabs.sty in a directory where TeX can find it.
: N- _% r( P- }5 k# E" s/ f' I For a basic installation on a TDS compliant system, move the following files to the following directories:. J( }# J( W* B
<texmf>/tex/latex/booktabs/: N2 l6 y% n! ]+ c7 L
booktabs.sty% y5 ~* X s$ l9 X3 s$ Y
<texmf>/source/latex/booktabs/
8 c' t4 P" v) b$ H6 F booktabs.ins
- Z+ U& ?& Q- f! Q3 D p booktabs.dtx J! R$ \. r5 X2 Z' l
COPY
1 @( g/ {" I( P" D# a, g8 F <texmf>/doc/latex/booktabs/
/ E3 L0 {+ L, C2 d7 |- Y2 ~ README' U& N. `# u ]( E' M
booktabs.pdf
' d- X# y/ E& I* ?”
' q+ J& p/ v/ k7 {( w( a6 K1 b6 p6 ?' O z
我按上面的要求把各个文件放在了相应的位置(红字部分没有操作,因为不知道怎么操作),但是运行模版后仍然报错说找不到,怎么办呢?请大家帮忙! |